File:  [cvs.NetBSD.org] / pkgsrc / sysutils / cdrtools / Makefile
Revision 1.128: download - view: text, annotated - select for diffs
Wed Nov 2 11:38:27 2022 UTC (2 years, 5 months ago) by micha
Branches: MAIN
CVS tags: pkgsrc-2022Q4-base, pkgsrc-2022Q4, HEAD
sysutils/cdtools: Update to 3.02a10nb2

Changelog from AN-2022-10-16:

UPDATING:

- Various man pages have been renamed to follow BSD conventions.
  Users may need to manually remove the following old man pages on
  update: streamarchive.4, makefiles.4, makerules.4, changeset.4,
  sccschangeset.4, sccsfile.4, and star.4.

NEW FEATURES:

- libfind/sfind: Fix incorrect error handling of -exec ... {} +
  primaries.  Previously in some cases the primary returned an
  error even though it should always return true and in other
  cases it completely disregarded the exit code.  Now the primary
  always returns true and sets the exit code of libfind and sfind
  to a non-zero value in case one of the commands returned with a
  non-zero exit code.
  Reported by Tavian Barnes.  Submitted by Nico Sonack.

- libfind/sfind: Report failures to query the password/group
  database for -nouser/-nogroup.  Previously failure to query
  these databases was treated as if the user id/group id was not
  found.  We now print a diagnostic message and return a non-zero
  value if the getpwuid() or getgrgid() call failed.
  Reported by Tavian Barnes.

- libfind/sfind: Report presence of directory loops.  Previously,
  such directory loops were silently ignored.  Now, upon
  encountering a directory loop, sfind prints a diagnostic message
  to standard error.  The search is continued but sfind will
  terminate with a nonzero exit status.  This change improves
  compatibility with POSIX (cf. PASC interpretation request 1606).
  All libfind consumers calling the treewalk() function (mkisofs,
  sccs, and star) are affected.
  Reported by Tavian Barnes.  Submitted by Nico Sonack.

- mkisofs/mkisofs.8: adjust reference of magic(4) to magic(5)
  Submitted by Martin Rehak.

- *: With the switch of Solaris from SysV man page sections to BSD
  man page sections, man pages are now installed according to BSD
  conventions instead of SysV conventions.  This affects the man
  pages makefiles(4), makerules(4), streamarchive(4),
  changeset(4), sccsfile(4), sccschangeset(4), and star(4).
  Reported by Friedhelm Mehnert.

- *: All references to Solaris man pages have been adjusted to BSD
  man page sections as used in Solaris 11.4.

- libschily/getargs.3: document surprising behaviour that the
  the argument to a foo= parameter may be in the following
  argument.  Thus, shell scripts should write foo= "$bar" instead
  of foo=$bar if $bar could possibly be empty.
  Submitted by Nico Sonack.

- libschily/getargs.3: improve spelling and grammar.

# $NetBSD: Makefile,v 1.128 2022/11/02 11:38:27 micha Exp $

DISTNAME=	2022-10-16
PKGNAME=	cdrtools-3.02a10
PKGREVISION=	2
CATEGORIES=	sysutils
MASTER_SITES=	https://codeberg.org/schilytools/schilytools/archive/
DIST_SUBDIR=	schilytools

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://codeberg.org/schilytools/schilytools/
COMMENT=	Software for creating ISO9660 images and writing CD/DVD/Blu-ray
LICENSE=	cddl-1.0 AND gnu-gpl-v2 AND gnu-lgpl-v2.1 AND 2-clause-bsd

LDFLAGS.Darwin+=	-liconv

.include "../../mk/bsd.prefs.mk"

TOOL_DEPENDS+=	smake>=1.6nb2:../../devel/smake
SMAKE=		MAKEFLAGS= smake
MAKE_FLAGS+=	DESTDIR=${DESTDIR} INS_BASE=${PREFIX} DEFMANBASE=. MANDIR=${PKGMANDIR}
# Honor CPPFLAGS, CFLAGS and LDFLAGS
MAKE_FLAGS+=	CPPOPTX=${CPPFLAGS:Q} COPTX=${CFLAGS:Q} LDOPTX=${LDFLAGS:Q}

# The default location is /etc/default/cdrecord
# We patch the documentation appropriately. Additionally, we also install
# INSTALL.pkgsrc stating the reasons we do this, as required by the license.
CONF_FILES=	${PREFIX}/share/examples/cdrtools/cdrecord ${PKG_SYSCONFDIR}/cdrecord
SPECIAL_PERMS+=	${PREFIX}/share/examples/cdrtools/cdrecord ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0644
AUTO_MKDIRS=	yes

# Configure config file location
SUBST_CLASSES+=		fix
SUBST_STAGE.fix=	pre-configure
SUBST_FILES.fix+=	cdrecord/cdrecord.1
SUBST_FILES.fix+=	cdrecord/cdrecord.dfl
SUBST_SED.fix=		-e "s,/etc/default/cdrecord,${PKG_SYSCONFDIR}/cdrecord,g"
SUBST_MESSAGE.fix=	Replace defaults file paths.

# Configure INSTALL.pkgsrc (formerly displayed as MESSAGE)
SUBST_CLASSES+=		install
SUBST_STAGE.install=	post-configure
SUBST_MESSAGE.install=	Preparing INSTALL.pkgsrc file ...
SUBST_FILES.install=	${WRKDIR}/INSTALL.pkgsrc
SUBST_VARS.install=	PKGNAME_NOREV
SUBST_VARS.install+=	PKG_SYSCONFDIR
SUBST_VARS.install+=	LOCALBASE

# Shared platform specific code for schilytools (provided by smake package)
.include "../../devel/smake/Makefile.common"

do-configure:
	${CP} ${FILESDIR}/INSTALL.pkgsrc ${WRKDIR}
	cd ${WRKSRC}/inc && ${SMAKE} ${MAKE_FLAGS}

do-build:
	cd ${WRKSRC} && 						\
	for library in libschily libdeflt libcdrdeflt libedc libfile	\
	    libfind libhfs_iso libmdigest libscg libscgcmd librscg	\
	    libparanoia libsiconv;					\
	do								\
		cd ${WRKSRC}/$${library} && ${SMAKE} ${MAKE_FLAGS};	\
	done
	cd ${WRKSRC}/btcflash && ${SMAKE} ${MAKE_FLAGS}
	cd ${WRKSRC}/cdda2wav && ${SMAKE} ${MAKE_FLAGS}
	cd ${WRKSRC}/cdrecord && ${SMAKE} ${MAKE_FLAGS}
	cd ${WRKSRC}/mkisofs && ${SMAKE} ${MAKE_FLAGS}
	cd ${WRKSRC}/mkisofs/diag && ${SMAKE} ${MAKE_FLAGS}
	cd ${WRKSRC}/readcd && ${SMAKE} ${MAKE_FLAGS}
	cd ${WRKSRC}/scgcheck && ${SMAKE} ${MAKE_FLAGS}
	cd ${WRKSRC}/scgskeleton && ${SMAKE} ${MAKE_FLAGS}

# Process tables in manpage
.if !empty(USE_TOOLS:Mtbl)
post-build:
	cd ${WRKSRC} && if ${TEST} -f star/pkgsrc_tbl.done; then :;	\
	else								\
		${TBL} cdda2wav/cdda2wav.1 >cdda2wav/cdda2wav.1.tmp &&	\
		${MV} -f cdda2wav/cdda2wav.1.tmp cdda2wav/cdda2wav.1 &&	\
		${TBL} mkisofs/mkisofs.8 >mkisofs/mkisofs.8.tmp &&	\
		${MV} -f mkisofs/mkisofs.8.tmp mkisofs/mkisofs.8 &&	\
		${TOUCH} star/pkgsrc_tbl.done;				\
	fi
.endif

do-install:
	for program in btcflash cdda2wav cdrecord mkisofs		\
		readcd scgcheck scgskeleton; do				\
	cd ${WRKSRC}/$${program};					\
		${INSTALL_PROGRAM} OBJ/*/$${program} 			\
			${DESTDIR}${PREFIX}/bin;			\
	done
	for program in cdda2mp3 cdda2ogg; do				\
		${INSTALL_SCRIPT} ${WRKSRC}/cdda2wav/$${program} 	\
			${DESTDIR}${PREFIX}/bin;			\
		${INSTALL_MAN} ${WRKSRC}/cdda2wav/$${program}.1 	\
			${DESTDIR}${PREFIX}/${PKGMANDIR}/man1;		\
	done
	for program in btcflash cdda2wav cdrecord			\
		readcd scgcheck; do					\
		${INSTALL_MAN} ${WRKSRC}/$${program}/$${program}.1 	\
			${DESTDIR}${PREFIX}/${PKGMANDIR}/man1;		\
	done
	for program in mkisofs; do					\
		${INSTALL_MAN} ${WRKSRC}/$${program}/$${program}.8 	\
			${DESTDIR}${PREFIX}/${PKGMANDIR}/man8;		\
	done
	cd ${WRKSRC}/mkisofs/diag;					\
		for f in devdump isodebug isodump isoinfo isovfy; do	\
			${INSTALL_PROGRAM} OBJ/*/$$f ${DESTDIR}${PREFIX}/bin; \
			${INSTALL_MAN} $$f.8 \
				${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/$$f.8; \
		done
	${INSTALL_DATA} ${WRKSRC}/libsiconv/tables/[cik]*		\
		${DESTDIR}${PREFIX}/lib/siconv
	${RM} ${DESTDIR}${PREFIX}/lib/siconv/*mk
	${INSTALL_DATA} ${WRKSRC}/cdda2wav/README*			\
		${DESTDIR}${PREFIX}/share/doc/cdrtools/cdda2wav
	${INSTALL_DATA} ${WRKSRC}/cdrecord/README*			\
		${DESTDIR}${PREFIX}/share/doc/cdrtools/cdrecord
	${INSTALL_DATA} ${WRKSRC}/mkisofs/README*			\
		${DESTDIR}${PREFIX}/share/doc/cdrtools/mkisofs
	${INSTALL_DATA} ${WRKSRC}/cdrecord/cdrecord.dfl			\
		${DESTDIR}${PREFIX}/share/examples/cdrtools/cdrecord
	${INSTALL_DATA} ${WRKDIR}/INSTALL.pkgsrc			\
		${DESTDIR}${PREFIX}/share/doc/cdrtools/INSTALL.pkgsrc

.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../mk/oss.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>