Merge from vendor branch TNF:
[pkgsrcv2.git] / net / tsocks / Makefile
1 # $NetBSD: Makefile,v 1.14 2010/01/21 23:32:10 heinz Exp $
2 #
3
4 DISTNAME=       tsocks-1.8beta5
5 PKGREVISION=    3
6 CATEGORIES=     net
7 MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE:=tsocks/}
8
9 MAINTAINER=     pkgsrc-users@NetBSD.org
10 HOMEPAGE=       http://tsocks.sourceforge.net/
11 COMMENT=        Transparent SOCKS proxying library
12 LICENSE=        gnu-gpl-v2
13
14 PKG_DESTDIR_SUPPORT=    user-destdir
15
16 MAKE_JOBS_SAFE=         no
17
18 WRKSRC=         ${WRKDIR}/tsocks-1.8
19 GNU_CONFIGURE=          YES
20 USE_TOOLS+=             gmake
21 USE_LIBTOOL=            yes
22
23 CONFIGURE_ARGS+=        --with-conf=${PKG_SYSCONFDIR}/tsocks.conf
24
25 EGDIR=                  ${PREFIX}/share/examples/tsocks
26
27 SUBST_CLASSES+=         tsocks
28 SUBST_STAGE.tsocks=     post-configure
29 SUBST_MESSAGE.tsocks=   Generating tsocks wrapper script.
30 SUBST_FILES.tsocks=     tsocks
31 SUBST_SED.tsocks=       -e "s|@SH@|${SH}|g" -e "s|@PREFIX@|${PREFIX}|g"
32
33 INSTALLATION_DIRS+=     ${EGDIR}
34
35 post-extract:
36         ${RM} -f ${WRKSRC}/config.cache
37         ${CP} ${FILESDIR}/tsocks.sh ${WRKSRC}/tsocks
38
39 post-install:
40         ${INSTALL_SCRIPT} ${WRKSRC}/tsocks ${DESTDIR}${PREFIX}/bin
41         ${INSTALL_DATA} ${WRKSRC}/tsocks.conf.complex.example \
42                 ${DESTDIR}${EGDIR}/tsocks.conf.complex
43         ${INSTALL_DATA} ${WRKSRC}/tsocks.conf.simple.example \
44                 ${DESTDIR}${EGDIR}/tsocks.conf.simple
45
46 .include "../../mk/bsd.pkg.mk"