aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/cbsd/Makefile
blob: 857f61e492ee5325c801b3a30a597e2dca38c7ed (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
# $FreeBSD$

PORTNAME=   cbsd
PORTVERSION=    11.0.14
CATEGORIES= sysutils

MAINTAINER= olevole@olevole.ru
COMMENT=    Yet another FreeBSD Jail and Bhyve Management Utility

LICENSE=    BSD2CLAUSE

RUN_DEPENDS=    rsync:net/rsync \
        sudo:security/sudo \
        sqlite3:databases/sqlite3 \
        ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
LIB_DEPENDS=    libssh2.so:security/libssh2 \
        libsqlite3.so:databases/sqlite3

USE_GITHUB= yes

USES=   libedit
USE_RC_SUBR=    cbsdd cbsdrsyncd

SUB_FILES=  pkg-message
PLIST_FILES+=   man/man8/cbsd.8.gz

CBSD_HOME?= ${PREFIX}/cbsd

USERS=  ${PORTNAME}
GROUPS= ${PORTNAME}

do-install:
    @${ECHO} "Installing in ${CBSD_HOME}"
    ${MKDIR} ${STAGEDIR}${CBSD_HOME}
    ${CP} -a ${WRKSRC}/ ${STAGEDIR}${CBSD_HOME}
    ${INSTALL_MAN} ${WRKSRC}/man/cbsd.8 ${STAGEDIR}${PREFIX}/man/man8/cbsd.8
    ${INSTALL_PROGRAM} ${WRKSRC}/bin/cbsdsh/cbsd ${STAGEDIR}${PREFIX}/bin

post-install:
    ${CAT} ${PKGDIR}/pkg-plist-chunk > ${TMPPLIST} ;
    @${FIND} -s ${STAGEDIR}${CBSD_HOME} -not -type d | ${SORT} | \
    ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}
    @${MKDIR} ${STAGEDIR}${PREFIX}/libexec/bsdconfig
    @${LN} -sf ${CBSD_HOME}/share/bsdconfig/cbsd ${STAGEDIR}${PREFIX}/libexec/bsdconfig/cbsd

.include <bsd.port.mk>