aboutsummaryrefslogtreecommitdiffstats
path: root/audio/coverhunter/Makefile
blob: 6490de9dde1eb9febebfeb1203e2d3c253174b98 (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
# New ports collection makefile for:    coverhunter
# Date created:         14 Jul 2004
# Whom:             Jean-Yves Lefort <jylefort@brutele.be>
#
# $FreeBSD$
#

PORTNAME=       coverhunter
PORTVERSION=        0.3
PORTREVISION=   2
CATEGORIES=     audio graphics
MASTER_SITES=       ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

MAINTAINER=     jylefort@FreeBSD.org
COMMENT=        A program fetching the covers of your digital music albums

RUN_DEPENDS=        ${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging

USE_X_PREFIX=       yes
USE_GNOME=      pygtk2
USE_PYTHON=     2.3+
USE_REINPLACE=      yes
NO_BUILD=       yes

PYC=            PYTHON="${PYTHON_CMD}" ${SH} ${SCRIPTDIR}/py-compile

BINDIR=         ${PREFIX}/bin
PKGLIBDIR=      ${PREFIX}/lib/coverhunter

MODULES=        __init__.py \
            album.py \
            amazon.py \
            config.py \
            libhunter.py \
            musicfile.py \
            source.py

post-patch:
    @${REINPLACE_CMD} -e \
        's|@PYTHON_CMD@|${PYTHON_CMD}|; \
         s|@PKGLIBDIR@|${PKGLIBDIR}|; \
         s|@DATADIR@|${DATADIR}|' ${WRKSRC}/bin/coverhunter

do-install:
    ${MKDIR} ${BINDIR}
    ${INSTALL_SCRIPT} ${WRKSRC}/bin/coverhunter ${BINDIR}
    ${MKDIR} ${PKGLIBDIR}
.for module in ${MODULES}
    ${INSTALL_DATA} ${WRKSRC}/lib/${module} ${PKGLIBDIR}
    ${PYC} --basedir ${PKGLIBDIR} ${PKGLIBDIR}/${module}
.endfor
    ${MKDIR} ${DATADIR}
    ${INSTALL_DATA} \
        ${WRKSRC}/data/CoverHunter.glade \
        ${WRKSRC}/data/fetch_all.png \
        ${WRKSRC}/data/nocover.gif \
        ${WRKSRC}/data/picture.png \
        ${WRKSRC}/data/searching.png \
        ${DATADIR}

post-install:
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>