1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-04 06:15:24 +00:00
freebsd-ports/net-p2p/uhub/Makefile
Michael Scheidell e78467637d - Update to 0.4.0
- Honour CC and CFLAGS
- Convert to OPTIONSNG
- Add SQLite dependency
- Add DEBUG OPTION
- Use DISTFILES over DISTNAME/WRKSRC override
- Add LICENSE
- Use USE_OPENSSL
- Fix PORTLINT warnings

PR:		ports/168855
Submitted by:	koobs <koobs.freebsd@gmail.com>
Approved by:	maintainer (timeout, 58 days)
2012-08-06 10:28:27 +00:00

72 lines
1.7 KiB
Makefile

# New ports collection makefile for: uhub
# Date created: 16 Oct 2009
# Whom: Yashin Dmitry <yashin.dm@gmail.com>
#
# $FreeBSD$
#
PORTNAME= uhub
PORTVERSION= 0.4.0
CATEGORIES= net-p2p
MASTER_SITES= http://www.extatic.org/downloads/uhub/
DISTFILES= ${PORTNAME}-${PORTVERSION}-src${EXTRACT_SUFX}
MAINTAINER= yashin.dm@gmail.com
COMMENT= High performance peer-to-peer hub for the ADC network
LICENSE= GPLv3
USE_PERL5_BUILD=yes
USE_GMAKE= yes
USE_SQLITE= yes
USE_RC_SUBR= uhub
USERS= uhub
GROUPS= uhub
SHAREGRP= uhub
SHAREMODE= 640
MAKEFILE= ${WRKSRC}/GNUmakefile
OPTIONS_DEFINE= DEBUG OPENSSL
OPENSSL_DESC= Enable OpenSSL Support (experimental)
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MOPENSSL}
USE_OPENSSL= yes
MAKE_ARGS+= USE_SSL=YES
.else
MAKE_ARGS+= USE_SSL=NO
.endif
.if ${PORT_OPTIONS:MDEBUG}
CFLAGS+= -ggdb -DDEBUG
.else
CFLAGS+= -DNDEBUG
.endif
.include <bsd.port.pre.mk>
CFLAGS+= -I./src/ -I${LOCALBASE}/include
MAKE_ARGS+= UHUB_PREFIX="${PREFIX}" UHUB_CONF_DIR="${PREFIX}/etc/uhub" \
SILENT=NO CC="${CC}" CFLAGS="${CFLAGS}"
post-patch:
@${REINPLACE_CMD} -e 's|/etc/uhub/|${PREFIX}&|' ${WRKSRC}/doc/uhub.conf
@${REINPLACE_CMD} -e 's|/etc/uhub/|${PREFIX}&|' ${WRKSRC}/src/uhub.h
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/uhub ${PREFIX}/bin/uhub
@${MKDIR} ${PREFIX}/etc/uhub
@${INSTALL_DATA} ${WRKSRC}/doc/uhub.conf ${PREFIX}/etc/uhub/uhub.conf.sample
@${INSTALL_DATA} ${WRKSRC}/doc/users.conf ${PREFIX}/etc/uhub/users.conf.sample
@${INSTALL_DATA} /dev/null ${PREFIX}/etc/uhub/motd.txt.sample
@${INSTALL_DATA} /dev/null ${PREFIX}/etc/uhub/rules.txt.sample
.for i in uhub.conf users.conf motd.txt rules.txt
@[ ! -f ${PREFIX}/etc/uhub/${i} ] \
&& ${CP} -p ${PREFIX}/etc/uhub/${i}.sample ${PREFIX}/etc/uhub/${i}
.endfor
.include <bsd.port.post.mk>