aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/ccnet/Makefile
blob: 3297feecd91c3d75a32d2d3ea83527dbd421a8bd (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# $FreeBSD$

PORTNAME=   ccnet
PORTVERSION=    4.0.6
DISTVERSIONPREFIX=  v
DISTVERSIONSUFFIX=  -server
PORTREVISION=   6
CATEGORIES= net-mgmt devel

MAINTAINER= ultima1252@gmail.com
COMMENT=    Framework for writing networked applications

LICENSE=    GPLv3

BUILD_DEPENDS=  valac:lang/vala
LIB_DEPENDS=    libsearpc.so:devel/libsearpc \
        libglib-2.0.so:devel/glib20 \
        libgobject-2.0.so:devel/glib20 \
        libsqlite3.so:databases/sqlite3 \
        libzdb.so:databases/libzdb \
        libuuid.so:misc/e2fsprogs-libuuid \
        libevent.so:devel/libevent2 \
        libjansson.so:devel/jansson \
        libldap.so:net/openldap24-client

USE_GITHUB= yes
GH_ACCOUNT= haiwen

USES=       autoreconf libtool pkgconfig pathfix python:2
PATHFIX_MAKEFILEIN= Makefile.am
USE_LDCONFIG=   yes

CPPFLAGS+=  -I${LOCALBASE}/include -I${LOCALBASE}/include/event2
LDFLAGS+=   -L${LOCALBASE}/lib -L${LOCALBASE}/lib/event2
CONFIGURE_ENV=  SSL_CFLAGS="${OPENSSLINC}" SSL_LIBS="-L${OPENSSLLIB} -lssl -lcrypto"
GNU_CONFIGURE=  yes
CONFIGURE_ARGS+=--enable-server --enable-ldap
INSTALL_TARGET= install-strip

USE_OPENSSL=    yes

HAIWENDIR=  www/haiwen
SEAFILE_SERVER= ${HAIWENDIR}/seafile-server
SEABIN=     ${SEAFILE_SERVER}/seafile/bin
SEALIB=     ${SEAFILE_SERVER}/seafile/lib

SEAFILE_USERNAME?=  www
SEAFILE_GROUPNAME?= ${SEAFILE_USERNAME}

PLIST_SUB=  SEAFILE_USERNAME=${SEAFILE_USERNAME} \
        SEAFILE_GROUPNAME=${SEAFILE_GROUPNAME} \
        SEAFILE_SERVER=${SEAFILE_SERVER} \
        HAIWENDIR=${HAIWENDIR}

.include <bsd.port.options.mk>

.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000
WITH_OPENSSL_PORT=  yes
.endif

post-install:
    @${MKDIR} ${STAGEDIR}${PREFIX}/${SEABIN} ${STAGEDIR}${PREFIX}/${SEALIB}
    ${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/ccnet-init ${STAGEDIR}${PREFIX}/${SEABIN}
    ${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/ccnet-server ${STAGEDIR}${PREFIX}/${SEABIN}
    ${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/ccnet-servtool ${STAGEDIR}${PREFIX}/${SEABIN}
    ${RM} ${STAGEDIR}${PREFIX}/bin/ccnet-init \
        ${STAGEDIR}${PREFIX}/bin/ccnet-server \
        ${STAGEDIR}${PREFIX}/bin/ccnet-servtool
    (cd ${STAGEDIR}${PREFIX}/lib && \
        ${COPYTREE_SHARE} ${PYTHON_VERSION} ${STAGEDIR}${PREFIX}/${SEALIB})
    @${RM} -rf ${STAGEDIR}${PREFIX}/lib/${PYTHON_VERSION}

.include <bsd.port.mk>