aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/verlihub-plugins/Makefile.plugins
blob: 11bb8cd016fe28ffa652d24086f8484e1c03a624 (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
# $FreeBSD$

# common bits for verlihub plugins

# this controls DISTNAME
PLUGIN_NAME?=   ${PORTNAME}

PKGNAMEPREFIX=  verlihub-plugins-
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= verlihub
DISTNAME=   ${PLUGIN_NAME}

COMMENT?=   ${PLUGIN_DESC} plugin for the VerliHub - a Direct Connect protocol server

BUILD_DEPENDS+= ${LOCALBASE}/bin/verlihub:${PORTSDIR}/net-p2p/verlihub
RUN_DEPENDS+=   ${LOCALBASE}/bin/verlihub:${PORTSDIR}/net-p2p/verlihub

GNU_CONFIGURE=  yes

PLIST_FILES+=   lib/lib${PLUGIN_NAME}_pi.a \
        lib/lib${PLUGIN_NAME}_pi.la \
        lib/lib${PLUGIN_NAME}_pi.so \
        lib/lib${PLUGIN_NAME}_pi.so.0 \
        etc/verlihub/plugins/lib${PLUGIN_NAME}_pi.so

PKGMESSAGE= ${WRKDIR}/pkg-message
PKGMESSAGE_TEMPLATE=    ${PORTSDIR}/net-p2p/verlihub-plugins/pkg-message.plugins

post-build::
    @${SED} -e 's,%%PLUGIN_DESC%%,${PLUGIN_DESC},' < ${PKGMESSAGE_TEMPLATE} \
        > ${PKGMESSAGE}

post-install::
    @${MKDIR} ${PREFIX}/etc/verlihub/plugins
    @${LN} -sf ${PREFIX}/lib/lib${PLUGIN_NAME}_pi.so \
        ${PREFIX}/etc/verlihub/plugins/lib${PLUGIN_NAME}_pi.so
    @if [ -f ${PKGMESSAGE} ]; then \
       ${CAT} ${PKGMESSAGE}; \
     fi
    @${ECHO_CMD} '@unexec rmdir %D/etc/verlihub/plugins 2>/dev/null || true' >> ${TMPPLIST}
    @${ECHO_CMD} '@unexec rmdir %D/etc/verlihub 2>/dev/null || true' >> ${TMPPLIST}