openbsd-ports/audio/abcde/Makefile
david f85600afe0 move any perl or sed substitutions from post-patch to pre-configure
(fixes make update-patches)
ok sturm@; "looks reasonable" steven@
2006-02-08 04:54:48 +00:00

73 lines
1.9 KiB
Makefile

# $OpenBSD: Makefile,v 1.11 2006/02/08 04:54:48 david Exp $
COMMENT= "command-line utility to rip and encode audio cds"
V= 2.2.0
# cd-diskid version number
V2= 0.9
DISTNAME= abcde_$V.orig
PKGNAME= abcde-$V
CATEGORIES= audio
HOMEPAGE= http://www.hispalinux.es/~data/abcde.php
# Artistic and GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c
MS= http://www.hispalinux.es/~data/files/
MASTER_SITES= ${MS}
MASTER_SITES0= ${MS}cd-discid/
MASTER_SITES1= http://lly.org/~rcw/id3/
DISTFILES= ${DISTNAME}.tar.gz \
cd-discid_${V2}.orig.tar.gz:0
RUN_DEPENDS= :cdparanoia-*:audio/cdparanoia
FLAVORS= lame
FLAVOR?=
NO_REGRESS= Yes
WRKDIST= ${WRKDIR}/${PKGNAME}
.if ${FLAVOR:L:Mlame}
DISTFILES+= id3_0.12.orig.tar.gz:1
RUN_DEPENDS+= :lame-*:audio/lame
.else
RUN_DEPENDS+= :vorbis-tools-*:audio/vorbis-tools
.endif
SUPDISTFILES= id3_0.12.orig.tar.gz:1
pre-configure:
.if ${FLAVOR:L:Mlame}
perl -pi -e 's,OUTPUTTYPE=ogg,OUTPUTTYPE=mp3,g' ${WRKSRC}/abcde
.endif
do-build:
cd ${WRKDIR}/cd-discid-${V2} && \
${CC} ${CFLAGS} -o cd-discid cd-discid.c
.if ${FLAVOR:L:Mlame}
cd ${WRKDIR}/id3-0.12 && \
perl -pi -e 's,#include <getopt.h>,/*#include <getopt.h>*/,g' id3.c && \
${CC} ${CFLAGS} -o id3 id3.c
.endif
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/abcde ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/cddb-tool ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKDIR}/cd-discid-${V2}/cd-discid ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/abcde.1 ${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/cddb-tool.1 ${PREFIX}/man/man1
${INSTALL_MAN} ${WRKDIR}/cd-discid-${V2}/cd-discid.1 ${PREFIX}/man/man1
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/abcde
${INSTALL_DATA} ${WRKSRC}/abcde.conf ${PREFIX}/share/examples/abcde
.if ${FLAVOR:L:Mlame}
${INSTALL_PROGRAM} ${WRKDIR}/id3-0.12/id3 ${PREFIX}/bin
${INSTALL_MAN} ${WRKDIR}/id3-0.12/id3.1 ${PREFIX}/man/man1
.endif
.include <bsd.port.mk>