aboutsummaryrefslogtreecommitdiffstats
path: root/audio/abcde/Makefile
blob: a71c8593a9ebb04764584db970a91f0312b68f62 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# New ports collection makefile for:    abcde
# Date created:         July 29, 2002
# Whom:             Munish Chopra <mchopra@engmail.uwaterloo.ca>
#
# $FreeBSD$
#

PORTNAME=   abcde
PORTVERSION=    2.1.5
CATEGORIES= audio
MASTER_SITES=   http://www.hispalinux.es/~data/files/
DISTNAME=   abcde_${PORTVERSION}.orig

MAINTAINER= chopra@soulwax.net
COMMENT=    Front-end shell script to encode CDs in ogg, mp3 or flac format

RUN_DEPENDS=    cd-discid:${PORTSDIR}/audio/cd-discid \
        cdparanoia:${PORTSDIR}/audio/cdparanoia \
        id3v2:${PORTSDIR}/audio/id3v2 \
        lame:${PORTSDIR}/audio/lame \
        oggenc:${PORTSDIR}/audio/vorbis-tools

USE_REINPLACE=  yes
NO_BUILD=   yes
WRKSRC=     ${WRKDIR}/${PORTNAME}-${PORTVERSION}
MAN1=       abcde.1 cddb-tool.1

.if defined(WITH_CDDA2WAV)
RUN_DEPENDS+=   cdda2wav:${PORTSDIR}/sysutils/cdrtools
.else
CDDA2WAV_MSG=   "Define WITH_CDDA2WAV to enable cdda2wav support."
.endif

.if defined(WITH_DAGRAB)
RUN_DEPENDS+=   dagrab:${PORTSDIR}/audio/dagrab
.else
DAGRAB_MSG= "Define WITH_DAGRAB to enable dagrab support."
.endif

.if defined(WITH_EJECT)
RUN_DEPENDS+=   eject:${PORTSDIR}/sysutils/eject
.else
EJECT_MSG=  "Define WITH_EJECT to enable auto-eject support."
.endif

.if defined(WITH_FLAC)
RUN_DEPENDS+=   flac:${PORTSDIR}/audio/flac
.else
FLAC_MSG=   "Define WITH_FLAC to enable FLAC support."
.endif

.if defined(WITH_NORMALIZE)
RUN_DEPENDS+=   normalize:${PORTSDIR}/audio/normalize
.else
NORMALIZE_MSG=  "Define WITH_NORMALIZE to enable normalize support."
.endif

.if defined(WITH_SPEEX)
RUN_DEPENDS+=   speexenc:${PORTSDIR}/audio/speex
.else
SPEEX_MSG=  "Define WITH_SPEEX to enable Speex support."
.endif

pre-fetch:
.if defined(CDDA2WAV_MSG)
    @${ECHO_MSG} ${CDDA2WAV_MSG}
    @${ECHO_MSG} ""
.endif
.if defined(DAGRAB_MSG)
    @${ECHO_MSG} ${DAGRAB_MSG}
    @${ECHO_MSG} ""
.endif
.if defined(EJECT_MSG)
    @${ECHO_MSG} ${EJECT_MSG}
    @${ECHO_MSG} ""
.endif
.if defined(FLAC_MSG)
    @${ECHO_MSG} ${FLAC_MSG}
    @${ECHO_MSG} ""
.endif
.if defined(NORMALIZE_MSG)
    @${ECHO_MSG} ${NORMALIZE_MSG}
    @${ECHO_MSG} ""
.endif
.if defined(SPEEX_MSG)
    @${ECHO_MSG} ${SPEEX_MSG}
    @${ECHO_MSG} ""
.endif

post-patch:
    @${REINPLACE_CMD} -e 's#/etc/#${PREFIX}/etc/#g' \
        ${WRKSRC}/abcde.1
    @${REINPLACE_CMD} -e 's#/etc/#${PREFIX}/etc/#g' \
        ${WRKSRC}/abcde

do-install:
    ${INSTALL_SCRIPT} ${WRKSRC}/abcde ${PREFIX}/bin
    ${INSTALL_SCRIPT} ${WRKSRC}/cddb-tool ${PREFIX}/bin
    ${INSTALL_DATA} ${WRKSRC}/abcde.conf ${PREFIX}/etc
    ${INSTALL_MAN} ${WRKSRC}/abcde.1 ${PREFIX}/man/man1
    ${INSTALL_MAN} ${WRKSRC}/cddb-tool.1 ${PREFIX}/man/man1

post-install:
    @${ECHO_MSG} ""
    @${ECHO_MSG} "Please copy ${PREFIX}/etc/abcde.conf to ~/.abcde.conf"
    @${ECHO_MSG} "and edit as necessary. Sane defaults have been set."
    @${ECHO_MSG} ""
    @${ECHO_MSG} "NOTE: If you have been using ${PORTNAME}-2.1.4 or older,"
    @${ECHO_MSG} "you must start with a fresh ~/.abcde.conf."
    @${ECHO_MSG} ""

.include <bsd.port.mk>