aboutsummaryrefslogtreecommitdiffstats
path: root/audio/abcde/Makefile
blob: 85db974d28d50c4376fb77a29373813e5815e7dd (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
# Created by: Munish Chopra <mchopra@engmail.uwaterloo.ca>
# $FreeBSD$

PORTNAME=   abcde
PORTVERSION=    2.5.4
PORTREVISION=   2
CATEGORIES= audio
MASTER_SITES=   GOOGLE_CODE

MAINTAINER= gblach@FreeBSD.org
COMMENT=    Front-end shell script to encode CDs in flac/mp3/ogg/speex format

LICENSE=    GPLv2

RUN_DEPENDS=    cd-discid:${PORTSDIR}/audio/cd-discid \
        cdparanoia:${PORTSDIR}/audio/cdparanoia \
        eyeD3:${PORTSDIR}/audio/py-eyed3 \
        lame:${PORTSDIR}/audio/lame \
        oggenc:${PORTSDIR}/audio/vorbis-tools \
        bash:${PORTSDIR}/shells/bash

NO_BUILD=   yes

OPTIONS_DEFINE= CDDA2WAV DAGRAB EJECT FLAC MPP NORMALIZE REPLAYGAIN SPEEX

EJECT_DESC?=    Enable auto-eject support
NORMALIZE_DESC?=    Enable normalize support
REPLAYGAIN_DESC?=   Enable (vorbis|mp3)gain support

USES=       shebangfix
SHEBANG_FILES=  ${PORTNAME} cddb-tool

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MCDDA2WAV}
RUN_DEPENDS+=   cdda2wav:${PORTSDIR}/sysutils/cdrtools
.endif

.if ${PORT_OPTIONS:MDAGRAB}
RUN_DEPENDS+=   dagrab:${PORTSDIR}/audio/dagrab
.endif

.if ${PORT_OPTIONS:MEJECT}
RUN_DEPENDS+=   eject:${PORTSDIR}/sysutils/eject
.endif

.if ${PORT_OPTIONS:MFLAC}
RUN_DEPENDS+=   flac:${PORTSDIR}/audio/flac
.endif

.if ${PORT_OPTIONS:MNORMALIZE}
RUN_DEPENDS+=   normalize:${PORTSDIR}/audio/normalize
.endif

.if ${PORT_OPTIONS:MSPEEX}
RUN_DEPENDS+=   speexenc:${PORTSDIR}/audio/speex
.endif

.if ${PORT_OPTIONS:MAAC}
RUN_DEPENDS+=   faac:${PORTSDIR}/audio/faac
.endif

.if ${PORT_OPTIONS:MMPP}
RUN_DEPENDS+=   mpcenc:${PORTSDIR}/audio/musepack
.endif

.if ${PORT_OPTIONS:MREPLAYGAIN}
RUN_DEPENDS+=   mp3gain:${PORTSDIR}/audio/mp3gain \
        vorbisgain:${PORTSDIR}/audio/vorbisgain
.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 ${STAGEDIR}${PREFIX}/bin
    ${INSTALL_SCRIPT} ${WRKSRC}/cddb-tool ${STAGEDIR}${PREFIX}/bin
    ${INSTALL_DATA} ${WRKSRC}/abcde.conf \
        ${STAGEDIR}${PREFIX}/etc/abcde.conf.sample
    ${INSTALL_MAN} ${WRKSRC}/abcde.1 ${STAGEDIR}${PREFIX}/man/man1
    ${INSTALL_MAN} ${WRKSRC}/cddb-tool.1 ${STAGEDIR}${PREFIX}/man/man1

post-install:
    @${ECHO_MSG} ""
    @${ECHO_MSG} "Please copy ${PREFIX}/etc/abcde.conf.sample 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>