aboutsummaryrefslogtreecommitdiffstats
path: root/net/py-avahi/Makefile
blob: 4c28a486519101d9780510fc1660eff4cf5a0a76 (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
# Created by: Joe Marcus Clarke <marcus@FreeBSD.org>
# $FreeBSD$
#   $MCom: ports/net/py-avahi/Makefile,v 1.4 2007/07/31 18:24:13 ahze Exp $

PORTREVISION=   7
CATEGORIES= net gnome python
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
PKGNAMESUFFIX=  # empty

MAINTAINER= gnome@FreeBSD.org
COMMENT=    Python interface to the Avahi mDNS system

BUILD_DEPENDS=  ${PYTHON_PKGNAMEPREFIX}gdbm>0:${PORTSDIR}/databases/py-gdbm \
        ${PYTHON_SITELIBDIR}/dbus/_dbus.py:${PORTSDIR}/devel/py-dbus
LIB_DEPENDS=    libavahi-client.so:${PORTSDIR}/net/avahi-app
RUN_DEPENDS=    ${PYTHON_PKGNAMEPREFIX}gdbm>0:${PORTSDIR}/databases/py-gdbm \
        ${PYTHON_SITELIBDIR}/dbus/_dbus.py:${PORTSDIR}/devel/py-dbus

MASTERDIR=  ${.CURDIR}/../avahi-app
BUILD_WRKSRC=   ${WRKSRC}/avahi-python
INSTALL_WRKSRC= ${BUILD_WRKSRC}
DESCR=      ${.CURDIR}/pkg-descr
PLIST=      ${.CURDIR}/pkg-plist

AVAHI_SLAVE=    python

USE_GNOME=  pygtk2
USE_PYTHON= yes
MANPAGES=   avahi-bookmarks.1 avahi-discover.1

post-patch:
    @${REINPLACE_CMD} -e 's|@pkglibdir@|${DATADIR}|' \
            ${WRKSRC}/avahi-python/avahi/ServiceTypeDatabase.py.in

pre-build:
    @cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
            Makefile ${MAKE_ARGS} clean

post-build:
    @cd ${WRKSRC}/service-type-database && ${SETENV} ${MAKE_ENV} ${GMAKE} \
        ${MAKE_FLAGS} Makefile ${MAKE_ARGS} ${ALL_TARGET}

post-install:
    @cd ${WRKSRC}/service-type-database && ${SETENV} ${MAKE_ENV} ${GMAKE} \
        ${MAKE_FLAGS} Makefile ${MAKE_ARGS} install
    (cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
        -d ${PREFIX} -f ${PYTHONPREFIX_SITELIBDIR:S,${PREFIX}/,,})
    (cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
        -d ${PREFIX} -f ${PYTHONPREFIX_SITELIBDIR:S,${PREFIX}/,,})

.include "${MASTERDIR}/Makefile"