mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
net-p2p/uhub: update to 0.4.1
- Support stage - Use options helpers PR: 192213 Submitted by: tkato432 yahoo com
This commit is contained in:
parent
d377e2ab58
commit
b0ec9d0065
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=363487
@ -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
|
||||
USES= cmake perl5
|
||||
USE_RC_SUBR= uhub
|
||||
USE_PERL5= build
|
||||
|
||||
OPTIONS_DEFINE= DEBUG OPENSSL
|
||||
OPENSSL_DESC= Enable OpenSSL Support (experimental)
|
||||
CFLAGS+= -fPIC -I${LOCALBASE}/include
|
||||
LDFLAGS+= -L${LOCALBASE}/lib
|
||||
|
||||
OPTIONS_DEFINE= OPENSSL SQLITE
|
||||
OPTIONS_DEFAULT= OPENSSL SQLITE
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
OPENSSL_USE= openssl=yes
|
||||
OPENSSL_CMAKE_OFF= -DSSL_SUPPORT:BOOL=OFF
|
||||
SQLITE_USE= sqlite=yes
|
||||
SQLITE_CMAKE_OFF= -DSQLITE_SUPPORT:BOOL=OFF
|
||||
|
||||
NO_STAGE= yes
|
||||
.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
|
||||
@${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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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%%
|
||||
|
Loading…
Reference in New Issue
Block a user