aboutsummaryrefslogtreecommitdiff
path: root/net-p2p/uhub
diff options
context:
space:
mode:
authorWilliam Grzybowski <wg@FreeBSD.org>2014-07-30 15:32:51 +0000
committerWilliam Grzybowski <wg@FreeBSD.org>2014-07-30 15:32:51 +0000
commitb0ec9d0065c04b34072329eeb6f1711f5657906d (patch)
treecc90e2dda806f268839bd9af5774d05d4b9f36f4 /net-p2p/uhub
parentd377e2ab58e5589bd9c26369180700368971c1fb (diff)
downloadports-b0ec9d0065c04b34072329eeb6f1711f5657906d.tar.gz
ports-b0ec9d0065c04b34072329eeb6f1711f5657906d.zip
net-p2p/uhub: update to 0.4.1
- Support stage - Use options helpers PR: 192213 Submitted by: tkato432 yahoo com
Notes
Notes: svn path=/head/; revision=363487
Diffstat (limited to 'net-p2p/uhub')
-rw-r--r--net-p2p/uhub/Makefile83
-rw-r--r--net-p2p/uhub/distinfo4
-rw-r--r--net-p2p/uhub/files/patch-GNUmakefile12
-rw-r--r--net-p2p/uhub/pkg-plist33
4 files changed, 62 insertions, 70 deletions
diff --git a/net-p2p/uhub/Makefile b/net-p2p/uhub/Makefile
index dcb5860db550..081e9b15a185 100644
--- a/net-p2p/uhub/Makefile
+++ b/net-p2p/uhub/Makefile
@@ -2,68 +2,65 @@
# $FreeBSD$
PORTNAME= uhub
-PORTVERSION= 0.4.0
-PORTREVISION= 1
+PORTVERSION= 0.4.1
+DISTVERSIONSUFFIX= -src
CATEGORIES= net-p2p
MASTER_SITES= http://www.extatic.org/downloads/uhub/
-DISTFILES= ${PORTNAME}-${PORTVERSION}-src${EXTRACT_SUFX}
MAINTAINER= ports@FreeBSD.org
COMMENT= High performance peer-to-peer hub for the ADC network
LICENSE= GPLv3
-USES= gmake perl5
-USE_PERL5= build
-USE_SQLITE= yes
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-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)
-
-NO_STAGE= yes
-.include <bsd.port.options.mk>
+USES= cmake perl5
+USE_RC_SUBR= uhub
+USE_PERL5= build
-.if ${PORT_OPTIONS:MOPENSSL}
-USE_OPENSSL= yes
-MAKE_ARGS+= USE_SSL=YES
-.else
-MAKE_ARGS+= USE_SSL=NO
-.endif
+CFLAGS+= -fPIC -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
-.if ${PORT_OPTIONS:MDEBUG}
-CFLAGS+= -ggdb -DDEBUG
-.else
-CFLAGS+= -DNDEBUG
-.endif
+OPTIONS_DEFINE= OPENSSL SQLITE
+OPTIONS_DEFAULT= OPENSSL SQLITE
+OPTIONS_SUB= yes
-.include <bsd.port.pre.mk>
+OPENSSL_USE= openssl=yes
+OPENSSL_CMAKE_OFF= -DSSL_SUPPORT:BOOL=OFF
+SQLITE_USE= sqlite=yes
+SQLITE_CMAKE_OFF= -DSQLITE_SUPPORT:BOOL=OFF
-CFLAGS+= -I./src/ -I${LOCALBASE}/include
-MAKE_ARGS+= UHUB_PREFIX="${PREFIX}" UHUB_CONF_DIR="${PREFIX}/etc/uhub" \
- SILENT=NO CC="${CC}" CFLAGS="${CFLAGS}"
+.include <bsd.port.options.mk>
post-patch:
- @${REINPLACE_CMD} -e 's|/etc/uhub/|${PREFIX}&|' ${WRKSRC}/doc/uhub.conf
- @${REINPLACE_CMD} -e 's|/etc/uhub/|${PREFIX}&|' ${WRKSRC}/src/uhub.h
+ @${REINPLACE_CMD} -e \
+ '/DESTINATION/s|^|#|' ${WRKSRC}/CMakeLists.txt
+ @${REINPLACE_CMD} -e \
+ 's| /usr/lib/| ${PREFIX}/lib/|g ; \
+ s|=/etc/uhub/|=${ETCDIR}/|g' ${WRKSRC}/doc/uhub.conf
+ @${REINPLACE_CMD} -e \
+ 's|"/etc/uhub/|"${ETCDIR}/|' ${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}
+ (cd ${INSTALL_WRKSRC} && ${INSTALL_PROGRAM} uhub \
+ ${STAGEDIR}${PREFIX}/bin)
+.if ${PORT_OPTIONS:MSQLITE}
+ (cd ${INSTALL_WRKSRC} && ${INSTALL_PROGRAM} uhub-passwd \
+ ${STAGEDIR}${PREFIX}/bin)
+.endif
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/uhub
+ (cd ${INSTALL_WRKSRC} && ${INSTALL_LIB} mod_*.so \
+ ${STAGEDIR}${PREFIX}/lib/uhub)
+ @${MKDIR} ${STAGEDIR}${ETCDIR}
+.for i in uhub.conf users.conf
+ (cd ${WRKSRC}/doc && ${INSTALL_DATA} ${i} \
+ ${STAGEDIR}${ETCDIR}/${i}.sample)
+.endfor
+.for i in motd.txt rules.txt
+ @${ECHO_CMD} -n > ${STAGEDIR}${ETCDIR}/${i}.sample
.endfor
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net-p2p/uhub/distinfo b/net-p2p/uhub/distinfo
index 4fce07c46524..ca92034c3d6c 100644
--- a/net-p2p/uhub/distinfo
+++ b/net-p2p/uhub/distinfo
@@ -1,2 +1,2 @@
-SHA256 (uhub-0.4.0-src.tar.gz) = e6f4c35bb5d5ff973ca2428a0432d6545b6f38f08387697cf05b608b5c4525ac
-SIZE (uhub-0.4.0-src.tar.gz) = 194568
+SHA256 (uhub-0.4.1-src.tar.gz) = c2985e4136b2c8e43ddfe10f28545162e94a8ec93d107dd7254478edc79a2eee
+SIZE (uhub-0.4.1-src.tar.gz) = 203394
diff --git a/net-p2p/uhub/files/patch-GNUmakefile b/net-p2p/uhub/files/patch-GNUmakefile
deleted file mode 100644
index e3640182ec54..000000000000
--- a/net-p2p/uhub/files/patch-GNUmakefile
+++ /dev/null
@@ -1,12 +0,0 @@
---- ./GNUmakefile.orig 2012-06-09 00:35:21.000000000 +1000
-+++ ./GNUmakefile 2012-06-09 00:37:17.000000000 +1000
-@@ -365,8 +365,8 @@
- @if [ ! -f $(UHUB_CONF_DIR)/rules.txt ]; then cp doc/rules.txt $(UHUB_CONF_DIR); fi
- @if [ ! -f $(UHUB_CONF_DIR)/plugins.conf ]; then cp doc/plugins.conf $(UHUB_CONF_DIR); fi
- @if [ ! -d $(UHUB_MOD_DIR) ]; then echo Creating $(UHUB_MOD_DIR); mkdir -p $(UHUB_MOD_DIR); fi
-+ @if [ ! -f $(UHUB_CONF_DIR)/motd.txt ]; then touch $(UHUB_CONF_DIR)/motd.txt; fi
- @cp -f mod_*.so $(UHUB_MOD_DIR)
-- @touch $(UHUB_CONF_DIR)/motd.txt
- @echo done.
- endif
-
diff --git a/net-p2p/uhub/pkg-plist b/net-p2p/uhub/pkg-plist
index 10cf99b13958..8c9cd2e47004 100644
--- a/net-p2p/uhub/pkg-plist
+++ b/net-p2p/uhub/pkg-plist
@@ -1,14 +1,21 @@
bin/uhub
-@unexec if cmp -s %D/etc/uhub/uhub.conf.sample %D/etc/uhub/uhub.conf; then rm -f %D/etc/uhub/uhub.conf; fi
-etc/uhub/uhub.conf.sample
-@exec if [ ! -f %D/etc/uhub/uhub.conf ] ; then cp -p %D/%F %B/uhub.conf; fi
-@unexec if cmp -s %D/etc/uhub/users.conf.sample %D/etc/uhub/users.conf; then rm -f %D/etc/uhub/users.conf; fi
-etc/uhub/users.conf.sample
-@exec if [ ! -f %D/etc/uhub/users.conf ] ; then cp -p %D/%F %B/users.conf; fi
-@unexec if cmp -s %D/etc/uhub/motd.txt.sample %D/etc/uhub/motd.txt; then rm -f %D/etc/uhub/motd.txt; fi
-etc/uhub/motd.txt.sample
-@exec if [ ! -f %D/etc/uhub/motd.txt ] ; then cp -p %D/%F %B/motd.txt; fi
-@unexec if cmp -s %D/etc/uhub/rules.txt.sample %D/etc/uhub/rules.txt; then rm -f %D/etc/uhub/rules.txt; fi
-etc/uhub/rules.txt.sample
-@exec if [ ! -f %D/etc/uhub/rules.txt ] ; then cp -p %D/%F %B/rules.txt; fi
-@dirrmtry etc/uhub
+%%SQLITE%%bin/uhub-passwd
+@group uhub
+@mode 640
+@sample %%ETCDIR%%/motd.txt.sample
+@sample %%ETCDIR%%/rules.txt.sample
+@sample %%ETCDIR%%/uhub.conf.sample
+@sample %%ETCDIR%%/users.conf.sample
+@mode
+@group
+lib/uhub/mod_auth_simple.so
+%%SQLITE%%lib/uhub/mod_auth_sqlite.so
+lib/uhub/mod_chat_history.so
+lib/uhub/mod_chat_only.so
+lib/uhub/mod_example.so
+lib/uhub/mod_logging.so
+lib/uhub/mod_no_guest_downloads.so
+lib/uhub/mod_topic.so
+lib/uhub/mod_welcome.so
+@dirrm lib/uhub
+@dirrm %%ETCDIR%%