diff options
Diffstat (limited to 'misc/dnetc')
-rw-r--r-- | misc/dnetc/Makefile | 70 | ||||
-rw-r--r-- | misc/dnetc/distinfo.amd64 | 2 | ||||
-rw-r--r-- | misc/dnetc/distinfo.i386 | 2 | ||||
-rw-r--r-- | misc/dnetc/distinfo.sparc64 | 2 | ||||
-rw-r--r-- | misc/dnetc/files/pkg-deinstall.in | 30 | ||||
-rw-r--r-- | misc/dnetc/files/pkg-install.in | 35 | ||||
-rw-r--r-- | misc/dnetc/files/pkg-message.in | 4 | ||||
-rw-r--r-- | misc/dnetc/pkg-plist | 15 |
8 files changed, 22 insertions, 138 deletions
diff --git a/misc/dnetc/Makefile b/misc/dnetc/Makefile index 183d6d13da82..bcaeb0469c1a 100644 --- a/misc/dnetc/Makefile +++ b/misc/dnetc/Makefile @@ -3,7 +3,7 @@ PORTNAME= dnetc PORTVERSION= ${VERSION} -PORTREVISION= $(REVISION} +PORTREVISION= ${REVISION} PORTEPOCH= 1 CATEGORIES= misc MASTER_SITES= http://http.distributed.net/pub/dcti/%SUBDIR%/ \ @@ -26,97 +26,45 @@ NO_BUILD= yes BINDIR= ${PREFIX}/distributed.net -CLIENTUSER= dnetc -CLIENTGROUP= ${CLIENTUSER} -CLIENTUID= 105 +USERS= dnetc +GROUPS= dnetc -PKGINSTALL= ${WRKDIR}/pkg-install -PKGDEINSTALL= ${WRKDIR}/pkg-deinstall PKGMESSAGE= ${WRKDIR}/pkg-message -MAN1= dnetc.1 +SUB_FILES= pkg-message +SUB_LIST= BINDIR="${BINDIR}" -SUB_FILES= pkg-install pkg-deinstall pkg-message -SUB_LIST= BINDIR="${BINDIR}" \ - CLIENTUSER="${CLIENTUSER}" \ - CLIENTGROUP="${CLIENTGROUP}" \ - CLIENTUID="${CLIENTUID}" - -NO_STAGE= yes .include <bsd.port.pre.mk> .if ${ARCH} == i386 VERSION= 2.9110.519 REVISION= 0 -.if ${OSVERSION} >= 800107 DISTNAME= dnetc${PORTVERSION:E}-freebsd8-${ARCH:S/i386/x86/} WRKSRC= ${WRKDIR}/dnetc${PORTVERSION:E}-freebsd8-${ARCH:S/i386/x86/} -.else -DISTNAME= dnetc${PORTVERSION:E}-freebsd7-${ARCH:S/i386/x86/} -WRKSRC= ${WRKDIR}/dnetc${PORTVERSION:E}-freebsd7-${ARCH:S/i386/x86/} -.endif .elif ${ARCH} == amd64 VERSION= 2.9110.519 REVISION= 0 -.if ${OSVERSION} >= 800107 DISTNAME= dnetc${PORTVERSION:E}-freebsd8-${ARCH} WRKSRC= ${WRKDIR}/dnetc${PORTVERSION:E}-freebsd8-${ARCH} -.else -DISTNAME= dnetc${PORTVERSION:E}-freebsd7-${ARCH} -WRKSRC= ${WRKDIR}/dnetc${PORTVERSION:E:S/b$//}-freebsd7-${ARCH} -.endif .elif ${ARCH} == sparc64 -.if ${OSVERSION} >= 800107 VERSION= 2.9109.518 REVISION= 0 DISTNAME= dnetc${PORTVERSION:E}-freebsd8-${ARCH} WRKSRC= ${WRKDIR}/dnetc${PORTVERSION:E}-freebsd8-${ARCH} -.else -VERSION= 2.9103.509 -REVISION= 1 -DISTNAME= dnetc${PORTVERSION:E}-freebsd7-${ARCH}-elf -WRKSRC= ${WRKDIR}/dnetc${PORTVERSION:E}-freebsd7-${ARCH}-elf -.endif .elif ${ARCH} == powerpc -.if ${OSVERSION} >= 800107 VERSION= 2.9109.518 REVISION= 0 DISTNAME= dnetc${PORTVERSION:E}-freebsd8-${ARCH} WRKSRC= ${WRKDIR}/dnetc${PORTVERSION:E}-freebsd8-${ARCH} -.else -BROKEN= works on FreeBSD 8+ only in powerpc -VERSION= 0 -REVISION= 0 -.endif .endif -do-configure: - @if [ ! -f ${PREFIX}/dnetc.ini ]; then \ - ${INSTALL} -c -m 644 ${FILESDIR}/dnetc.ini ${WRKSRC}; \ - fi - -pre-install: - @${ECHO} "==> Creating custom user to run dnetc..." - @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - do-install: - if [ ! -d ${BINDIR} ]; then \ - ${MKDIR} ${BINDIR}; \ - fi - ${CHOWN} ${CLIENTUSER}:${CLIENTGROUP} ${BINDIR} - ${CHMOD} 775 ${BINDIR} - - ${INSTALL} -c -m 755 -o ${CLIENTUSER} -g ${CLIENTGROUP} ${WRKSRC}/dnetc ${BINDIR} - - ${INSTALL_MAN} ${WRKSRC}/${MAN1} ${PREFIX}/man/man1 - - ${INSTALL} -c -m 644 -o ${CLIENTUSER} -g ${CLIENTGROUP} ${WRKSRC}/dnetc.ini ${BINDIR}/dnetc.ini.sample -.if !exists(${BINDIR}/dnetc.ini) - ${INSTALL} -c -m 644 -o ${CLIENTUSER} -g ${CLIENTGROUP} ${WRKSRC}/dnetc.ini ${BINDIR}/dnetc.ini - @${CAT} ${PKGMESSAGE} -.endif + ${MKDIR} ${STAGEDIR}${BINDIR} + ${INSTALL_PROGRAM} ${WRKSRC}/dnetc ${STAGEDIR}${BINDIR} + ${INSTALL_MAN} ${WRKSRC}/dnetc.1 ${STAGEDIR}${PREFIX}/man/man1 + ${INSTALL} -c -m 644 ${FILESDIR}/dnetc.ini ${STAGEDIR}${BINDIR}/dnetc.ini.sample .include <bsd.port.post.mk> diff --git a/misc/dnetc/distinfo.amd64 b/misc/dnetc/distinfo.amd64 index 106c2e174806..1f111534db00 100644 --- a/misc/dnetc/distinfo.amd64 +++ b/misc/dnetc/distinfo.amd64 @@ -1,4 +1,2 @@ -SHA256 (dnetc519-freebsd7-amd64.tar.gz) = 1eea3b562f768cac6073b94472b8a5438414bc8f95cee5520adb1cc1d7159265 -SIZE (dnetc519-freebsd7-amd64.tar.gz) = 947717 SHA256 (dnetc519-freebsd8-amd64.tar.gz) = bb30f76586be582637554467bc62c9f7f8cfe0fe781ab5ddcccbafc5b0998ca3 SIZE (dnetc519-freebsd8-amd64.tar.gz) = 902150 diff --git a/misc/dnetc/distinfo.i386 b/misc/dnetc/distinfo.i386 index 3a722677b3b7..4b612798ea3e 100644 --- a/misc/dnetc/distinfo.i386 +++ b/misc/dnetc/distinfo.i386 @@ -1,4 +1,2 @@ -SHA256 (dnetc519-freebsd7-x86.tar.gz) = 9c9a0bb7be82ed18ddf83ae38e1010a7f9766e10e9deee54336d29f8768d43ea -SIZE (dnetc519-freebsd7-x86.tar.gz) = 887747 SHA256 (dnetc519-freebsd8-x86.tar.gz) = 7f79fa206e43fbf17637124802993909d198c1150c9bfaf3f4c82eefd408fffb SIZE (dnetc519-freebsd8-x86.tar.gz) = 897231 diff --git a/misc/dnetc/distinfo.sparc64 b/misc/dnetc/distinfo.sparc64 index 633166f2daf0..5aa03ede6906 100644 --- a/misc/dnetc/distinfo.sparc64 +++ b/misc/dnetc/distinfo.sparc64 @@ -1,4 +1,2 @@ -SHA256 (dnetc509-freebsd7-sparc64-elf.tar.gz) = 6b1d000943cdc2d63f5f1e78e3014b6218317d574850ad6d4b2fff11d67066c8 -SIZE (dnetc509-freebsd7-sparc64-elf.tar.gz) = 928361 SHA256 (dnetc518-freebsd8-sparc64.tar.gz) = c048f0599590aee57e4b1a19b7d759625aa18f51dc4d86bae1072d412678ab58 SIZE (dnetc518-freebsd8-sparc64.tar.gz) = 948215 diff --git a/misc/dnetc/files/pkg-deinstall.in b/misc/dnetc/files/pkg-deinstall.in deleted file mode 100644 index 21e38513323c..000000000000 --- a/misc/dnetc/files/pkg-deinstall.in +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ - -if [ "$2" != "POST-DEINSTALL" ]; then - exit 0 -fi - -CLIENTUSER=%%CLIENTUSER%% -CLIENTGROUP=%%CLIENTGROUP%% - -if /usr/sbin/pw usershow "$CLIENTUSER" 2>/dev/null 1>&2; then - if /usr/sbin/pw userdel -n $CLIENTUSER; then - echo "=> Removed user \"$CLIENTUSER\"." - else - echo "=> Removing user \"$CLIENTUSER\" failed." - exit 1 - fi -fi - -if /usr/sbin/pw groupshow "$CLIENTGROUP" 2>/dev/null 1>&2; then - if /usr/sbin/pw groupdel -n $CLIENTGROUP; then - echo "=> Removed group \"$CLIENTGROUP\"." - else - echo "=> Removing group \"$CLIENTGROUP\" failed." - exit 1 - fi -fi - -exit 0 diff --git a/misc/dnetc/files/pkg-install.in b/misc/dnetc/files/pkg-install.in deleted file mode 100644 index f93546ef53b8..000000000000 --- a/misc/dnetc/files/pkg-install.in +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ - -if [ "$2" != "PRE-INSTALL" ]; then - exit 0 -fi - -CLIENTUSER=%%CLIENTUSER%% -CLIENTGROUP=%%CLIENTGROUP%% -UID=%%CLIENTUID%% -GID=$UID - -if ! /usr/sbin/pw groupshow "$CLIENTGROUP" 2>/dev/null 1>&2; then - if /usr/sbin/pw groupadd $CLIENTGROUP -g $GID; then - echo "=> Added group \"$CLIENTGROUP\"." - else - echo "=> Adding group \"$CLIENTGROUP\" failed." - exit 1 - fi -fi - -if ! /usr/sbin/pw usershow "$CLIENTUSER" 2>/dev/null 1>&2; then - if /usr/sbin/pw useradd $CLIENTUSER -u $UID -g $CLIENTGROUP -h - \ - -s "/sbin/nologin" -d "/nonexistent" \ - -c "distributed.net client and proxy pseudo-user"; \ - then - echo "=> Added user \"$CLIENTUSER\"." - else - echo "=> Adding user \"$CLIENTUSER\" failed." - exit 1 - fi -fi - -exit 0 diff --git a/misc/dnetc/files/pkg-message.in b/misc/dnetc/files/pkg-message.in index 220c11cf62e0..41c2b1ad645e 100644 --- a/misc/dnetc/files/pkg-message.in +++ b/misc/dnetc/files/pkg-message.in @@ -1,8 +1,6 @@ *************************************************************************** -Note: dnetc has been installed with a sample configuration. - -To change this run: +To change the dnetc configuration run: %%BINDIR%%/dnetc -config diff --git a/misc/dnetc/pkg-plist b/misc/dnetc/pkg-plist index 20e11382d2ab..1a2767a1c659 100644 --- a/misc/dnetc/pkg-plist +++ b/misc/dnetc/pkg-plist @@ -1,5 +1,14 @@ +@owner dnetc +@group dnetc distributed.net/dnetc -@unexec if cmp -s %D/distributed.net/dnetc.ini %D/distributed.net/dnetc.ini.sample; then rm -f %D/distributed.net/dnetc.ini; fi -distributed.net/dnetc.ini.sample -@exec [ -f %B/dnetc.ini ] || cp %B/%f %B/dnetc.ini +@sample distributed.net/dnetc.ini.sample +@group +@owner +man/man1/dnetc.1.gz +@owner dnetc +@group dnetc +@mode 0775 @dirrm distributed.net +@mode +@group +@owner |