blob: c174e844a089fc962b14321feaf97ff8f28dbd02 (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# Created by: Yashin Dmitry <yashin.dm@gmail.com>
# $FreeBSD$
PORTNAME= uhub
PORTVERSION= 0.5.0
DISTVERSIONSUFFIX= -src
CATEGORIES= net-p2p
MASTER_SITES= http://www.extatic.org/downloads/uhub/
MAINTAINER= ports@FreeBSD.org
COMMENT= High performance peer-to-peer hub for the ADC network
LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/COPYING
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
BROKEN_aarch64= fails to compile: CPUINFO not defined
BROKEN_mips64= fails to compile: strndup not found
USES= cmake perl5 sqlite
USE_RC_SUBR= uhub
USE_PERL5= build
USERS= uhub
GROUPS= uhub
CFLAGS+= -fPIC
OPTIONS_DEFINE= OPENSSL
OPTIONS_DEFAULT= OPENSSL SQLITE
OPTIONS_SUB= yes
OPENSSL_USES= ssl
OPENSSL_CMAKE_BOOL= SSL_SUPPORT
post-patch:
@${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 ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/uhub-passwd ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/uhub
${INSTALL_LIB} ${WRKSRC}/mod_*.so ${STAGEDIR}${PREFIX}/lib/uhub
@${MKDIR} ${STAGEDIR}${ETCDIR}
.for i in uhub.conf users.conf
${INSTALL_DATA} ${WRKSRC}/doc/${i} ${STAGEDIR}${ETCDIR}/${i}.sample
.endfor
.for i in motd.txt rules.txt
@${ECHO_CMD} -n > ${STAGEDIR}${ETCDIR}/${i}.sample
.endfor
.include <bsd.port.mk>
|