freebsd-ports/misc/e2fsprogs-libuuid/Makefile
Matthias Andree 14e733a6bb sysutils/e2fsprogs: 1/2 rename to -core, strip FLAVORS and /sbin
This is the first commit that renames e2fsprogs to e2fsprogs-core,
makes the necessary changes to Makefiles, strips the FLAVORs that
determined how to link or copy to /sbin.  The latter feature will
be placed into a new e2fsprogs port that just copies two files to /sbin.

A followup 2/2 commit will then add the new e2fsprogs port.

This is done so that Git can properly track the rename.

While here, switch from FreeBSD's dd to GNU coreutils's dd
in an attempt to fix sporadic m_offset self-test failures.
2022-10-01 16:54:55 +02:00

47 lines
1.4 KiB
Makefile

PORTREVISION= 1
CATEGORIES= misc devel
PKGNAMESUFFIX= -libuuid
COMMENT= UUID library from e2fsprogs package
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${INSTALL_WRKSRC}/COPYING
CONFIGURE_ARGS= --enable-elf-shlibs --enable-libuuid
OPTIONS_EXCLUDE= NLS
MASTERDIR= ${.CURDIR}/../../sysutils/e2fsprogs-core
MAKE_ARGS= LIB_SUBDIRS=lib/uuid
USE_LDCONFIG= yes
ALL_TARGET= libs
INSTALL_TARGET= install install-shlibs
INSTALL_WRKSRC= ${WRKSRC}/lib/uuid
FILESDIR= ${.CURDIR}/files
USE_RC_SUBR= uuidd
PKGDIR= ${.CURDIR}
post-patch::
${REINPLACE_CMD} -e 's,/var/lib/libuuid,/var/run/libuuid,g' \
-e 's,/usr/sbin/uuidd,${PREFIX}/sbin/uuidd,' \
${WRKSRC}/lib/uuid/*.[ch]
pre-build:
${MKDIR} ${WRKSRC}/lib/uuid/elfshared
cd ${WRKSRC}/util && ${MAKE_CMD} subst
# ulimit guards against runaway tests
# failure to launch uuidd is fine (one might be running, or we may lack
# privileges); if it works, it'll quit after 50 seconds
post-build:
cd ${WRKSRC}/misc && ${MAKE_CMD} uuidgen uuidgen.1 uuidd uuidd.8
cd ${INSTALL_WRKSRC} && ( ulimit -t 5 && ${MAKE_CMD} check )
post-install:
${INSTALL_PROGRAM} ${WRKSRC}/misc/uuidgen ${STAGEDIR}${PREFIX}/bin/
${INSTALL_MAN} ${WRKSRC}/misc/uuidgen.1 ${STAGEDIR}${MAN8PREFIX}/man/man1/
${INSTALL_PROGRAM} ${WRKSRC}/misc/uuidd ${STAGEDIR}${PREFIX}/sbin/
${INSTALL_MAN} ${WRKSRC}/misc/uuidd.8 ${STAGEDIR}${MAN8PREFIX}/man/man8/
${MKDIR} ${STAGEDIR}/var/run/libuuid
.include "${MASTERDIR}/Makefile"