diff options
author | petef <petef@FreeBSD.org> | 2002-03-03 00:59:30 +0800 |
---|---|---|
committer | petef <petef@FreeBSD.org> | 2002-03-03 00:59:30 +0800 |
commit | 66c7e1a37ad5dc6a67a4a775d5de521db258a06f (patch) | |
tree | 8fed402de8360ed07c0f51bfeae4136d22ad8e9d /net/spread4 | |
parent | 3725b0ed6191aac5d2525bbd47a5362a7302a435 (diff) | |
download | freebsd-ports-gnome-66c7e1a37ad5dc6a67a4a775d5de521db258a06f.tar.gz freebsd-ports-gnome-66c7e1a37ad5dc6a67a4a775d5de521db258a06f.tar.zst freebsd-ports-gnome-66c7e1a37ad5dc6a67a4a775d5de521db258a06f.zip |
- update to 3.16.1
- pass maintainership to submitter
- make the java dependency more flexible
- get rid of NO_PACKAGE and add a pkg-install script to create the
user/group needed
- use DOCSDIR instead of the port-specific DOCDIR
- set PKGMESSAGE to the license file
- sort pkg-plist
- respect PREFIX
PR: 35407
Submitted by: Joshua Goodall <joshua@roughtrade.net> (new maintainer)
Diffstat (limited to 'net/spread4')
-rw-r--r-- | net/spread4/Makefile | 82 | ||||
-rw-r--r-- | net/spread4/distinfo | 2 | ||||
-rw-r--r-- | net/spread4/files/patch-FreeBSD_makefile | 24 | ||||
-rw-r--r-- | net/spread4/pkg-descr | 3 | ||||
-rw-r--r-- | net/spread4/pkg-install | 102 | ||||
-rw-r--r-- | net/spread4/pkg-plist | 23 |
6 files changed, 180 insertions, 56 deletions
diff --git a/net/spread4/Makefile b/net/spread4/Makefile index 5357f79fc52e..cd49299de0c2 100644 --- a/net/spread4/Makefile +++ b/net/spread4/Makefile @@ -6,16 +6,16 @@ # PORTNAME= spread -PORTVERSION= 3.15.2 +PORTVERSION= 3.16.1 CATEGORIES= net perl5 java MASTER_SITES= ${MASTER_SITE_LOCAL} -MASTER_SITE_SUBDIR= sada +MASTER_SITE_SUBDIR= petef DISTNAME= ${PORTNAME}-src-${PORTVERSION} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= joshua@roughtrade.net .if defined(WITH_JAVA_LIB) -BUILD_DEPENDS= ${LOCALBASE}/jdk1.1.8/bin/javac:${PORTSDIR}/java/jdk +BUILD_DEPENDS= ${LOCALBASE}/jdk${JDK_VERSION}/bin/javac:${PORTSDIR}/java/jdk .endif MAKEFILE= FreeBSD_makefile @@ -27,16 +27,16 @@ MAN3= SP_connect.3 SP_disconnect.3 SP_equal_group_ids.3 SP_error.3 \ SP_scat_multicast.3 SP_scat_receive.3 USE_PERL5= yes -NO_PACKAGE= "User and group needs to be created" INSTALLS_SHLIB= yes +PKGMESSAGE= ${WRKSRC}/license.txt -JAVASUBDIR= jdk1.1.8 +JDK_VERSION?= 1.1.8 +JAVASUBDIR= jdk${JDK_VERSION} JAVADIR= ${PREFIX}/${JAVASUBDIR} -JAVALIBDIR= ${JAVADIR}/lib -DOCDIR= ${PREFIX}/share/doc/${PORTNAME} +JAVALIBDIR= ${PREFIX}/share/java/classes .if defined(WITH_JAVA_LIB) -PLIST_SUB+= JAVALIB='' JAVALIBDIR=${JAVASUBDIR}/lib +PLIST_SUB+= JAVALIB='' JAVALIBDIR=share/java/classes .if defined(NOPORTDOCS) PLIST_SUB+= JAVALIB_DOCS='@comment ' .else @@ -50,26 +50,36 @@ MAKE_ARGS+= PTHREAD_CFLAGS=${PTHREAD_CFLAGS} PTHREAD_LIBS=${PTHREAD_LIBS} .include <bsd.port.pre.mk> +post-patch: +.for f in configuration.c auth-ip.c auth-pword.c docs/spread.1 docs/spmonitor.1 + @${PERL} -pi -e 's,/etc/spread,${PREFIX}/etc/spread,g' ${WRKSRC}/${f} +.endfor + post-build: - (cd ${WRKSRC}/perl/Spread-3.15.2-1.03; ${PERL} Makefile.PL; ${MAKE}) + (cd ${WRKSRC}/perl/Spread; ${PERL} Makefile.PL; ${MAKE}) .if defined(WITH_JAVA_LIB) (cd ${WRKSRC}/java; ${JAVADIR}/bin/javac \ splib_src/*.java -d ./) .endif +pre-install: + ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + do-install: - @${SH} ${SCRIPTDIR}/createusergroup ${INSTALL_PROGRAM} ${WRKSRC}/spread ${PREFIX}/sbin - ${INSTALL_PROGRAM} ${WRKSRC}/flooder ${PREFIX}/bin - ${INSTALL_PROGRAM} ${WRKSRC}/monitor ${PREFIX}/bin - ${INSTALL_PROGRAM} ${WRKSRC}/user ${PREFIX}/bin - ${INSTALL_PROGRAM} ${WRKSRC}/tuser ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/spflooder ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/spmonitor ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/spuser ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/sptuser ${PREFIX}/bin ${INSTALL_DATA} ${WRKSRC}/libsp.a ${PREFIX}/lib ${INSTALL_DATA} ${WRKSRC}/libtsp.a ${PREFIX}/lib ${INSTALL_DATA} ${WRKSRC}/sp.h ${PREFIX}/include - ${INSTALL_DATA} ${WRKSRC}/sample.spread.conf ${PREFIX}/etc/spread.conf.example + ${INSTALL_DATA} ${WRKSRC}/sp_func.h ${PREFIX}/include + ${INSTALL_DATA} ${WRKSRC}/sp_events.h ${PREFIX}/include + ${INSTALL_DATA} ${WRKSRC}/sample.spread.conf ${PREFIX}/etc/spread.conf.sample + ${INSTALL_DATA} ${WRKSRC}/sample.spread.access_ip ${PREFIX}/etc/spread.access_ip.sample ${INSTALL_MAN} ${WRKSRC}/docs/spread.1 ${PREFIX}/man/man1 - (cd ${WRKSRC}/perl/Spread-3.15.2-1.03 && ${MAKE} install) + (cd ${WRKSRC}/perl/Spread && ${MAKE} install) ${GZIP_CMD} ${GZIP} ${LOCALBASE}/lib/perl5/${PERL_VERSION}/man/man3/Spread.3 .if defined(WITH_JAVA_LIB) ${INSTALL} -d -o root -g wheel -m 0755 ${JAVALIBDIR}/${PORTNAME} @@ -79,26 +89,28 @@ do-install: ${INSTALL_MAN} ${WRKSRC}/docs/${f} ${PREFIX}/man/man3 .endfor .if !defined(NOPORTDOCS) - ${INSTALL} -d -o root -g wheel -m 0755 ${DOCDIR} - ${INSTALL_DATA} ${WRKSRC}/Readme.txt ${DOCDIR} - ${INSTALL} -d -o root -g wheel -m 0755 ${DOCDIR}/perl - ${INSTALL_DATA} ${WRKSRC}/perl/Spread-3.15.2-1.03/README ${DOCDIR}/perl - ${INSTALL_DATA} ${WRKSRC}/perl/Spread-3.15.2-1.03/test.pl ${DOCDIR}/perl + ${INSTALL} -d -o root -g wheel -m 0755 ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/Readme.txt ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/license.txt ${DOCSDIR}/LICENSE + ${INSTALL} -d -o root -g wheel -m 0755 ${DOCSDIR}/perl + ${INSTALL_DATA} ${WRKSRC}/perl/Spread/README ${DOCSDIR}/perl + ${INSTALL_DATA} ${WRKSRC}/perl/Spread/test.pl ${DOCSDIR}/perl .if defined(WITH_JAVA_LIB) - ${INSTALL} -d -o root -g wheel -m 0755 ${DOCDIR}/java - ${INSTALL_DATA} ${WRKSRC}/java/readme.txt ${DOCDIR}/java - ${INSTALL_DATA} ${WRKSRC}/java/Flooder.java ${DOCDIR}/java - ${INSTALL_DATA} ${WRKSRC}/java/User.java ${DOCDIR}/java - ${INSTALL} -d -o root -g wheel -m 0755 ${DOCDIR}/java/html - ${INSTALL} -d -o root -g wheel -m 0755 ${DOCDIR}/java/html/spread - ${INSTALL_DATA} ${WRKSRC}/java/docs/*.html ${DOCDIR}/java/html - ${INSTALL_DATA} ${WRKSRC}/java/docs/stylesheet.css ${DOCDIR}/java/html - ${INSTALL_DATA} ${WRKSRC}/java/docs/spread/*.html ${DOCDIR}/java/html/spread + ${INSTALL} -d -o root -g wheel -m 0755 ${DOCSDIR}/java + ${INSTALL_DATA} ${WRKSRC}/java/readme.txt ${DOCSDIR}/java + ${INSTALL_DATA} ${WRKSRC}/java/recThread.java ${DOCSDIR}/java + ${INSTALL_DATA} ${WRKSRC}/java/Flooder.java ${DOCSDIR}/java + ${INSTALL_DATA} ${WRKSRC}/java/User.java ${DOCSDIR}/java + ${INSTALL} -d -o root -g wheel -m 0755 ${DOCSDIR}/java/html + ${INSTALL} -d -o root -g wheel -m 0755 ${DOCSDIR}/java/html/spread + ${INSTALL_DATA} ${WRKSRC}/java/docs/*.html ${DOCSDIR}/java/html + ${INSTALL_DATA} ${WRKSRC}/java/docs/stylesheet.css ${DOCSDIR}/java/html + ${INSTALL_DATA} ${WRKSRC}/java/docs/spread/*.html ${DOCSDIR}/java/html/spread .endif .endif - @${ECHO} "================================================================================" - @${ECHO} "NB: Create the directory /var/run/spread, with write permissions for the spread" - @${ECHO} "user/group. The spread daemon will chroot there, and fail if it can't." - @${ECHO} "================================================================================" + @${CAT} ${PKGMESSAGE} + +post-install: + ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include <bsd.port.post.mk> diff --git a/net/spread4/distinfo b/net/spread4/distinfo index 7495d08cb6ce..9ecb870013ad 100644 --- a/net/spread4/distinfo +++ b/net/spread4/distinfo @@ -1 +1 @@ -MD5 (spread-src-3.15.2.tar.gz) = 41a974ba00496362ce3bc733af41dc46 +MD5 (spread-src-3.16.1.tar.gz) = 198a3eeac1a4b66800f4c857f8f40faa diff --git a/net/spread4/files/patch-FreeBSD_makefile b/net/spread4/files/patch-FreeBSD_makefile index 99a446859799..cbc4f76a9964 100644 --- a/net/spread4/files/patch-FreeBSD_makefile +++ b/net/spread4/files/patch-FreeBSD_makefile @@ -1,5 +1,5 @@ ---- FreeBSD_makefile.orig Mon Oct 2 16:09:34 2000 -+++ FreeBSD_makefile Mon Jun 11 02:10:13 2001 +--- FreeBSD_makefile.orig Wed Aug 22 00:28:21 2001 ++++ FreeBSD_makefile Thu Feb 28 23:27:26 2002 @@ -1,4 +1,3 @@ -CC=gcc MAKEFILE=FreeBSD_makefile @@ -11,22 +11,22 @@ #CFLAGS = -O does not always work on BSDI pc -CFLAGS = -ansi -c -Wall -O3 -TCFLAGS = $(CFLAGS) -pthread -+CFLAGS+= -ansi -c ++CFLAGS += -ansi -c +TCFLAGS = $(CFLAGS) $(PTHREAD_LIBS) - COBJS = lex.yy.o y.tab.o configuration.o skiplist.o - OBJS = alarm.o events.o memory.o membership.o data_link.o network.o status.o log.o flow_control.o message.o -@@ -28,7 +27,7 @@ - $(CC) -o user user.o libsp.a + COBJS = lex.yy.o y.tab.o configuration.o skiplist.o acm.o + OBJS = alarm.o events.o memory.o membership.o data_link.o network.o status.o log.o flow_control.o message.o acp-permit.o auth-null.o auth-ip.o +@@ -30,7 +29,7 @@ + $(CC) -o spuser user.o libsp.a - tuser : user.to libtsp.a -- $(CC) -pthread -o tuser user.to libtsp.a -+ $(CC) $(PTHREAD_LIBS) -o tuser user.to libtsp.a + sptuser : user.to libtsp.a +- $(CC) -pthread -o sptuser user.to libtsp.a ++ $(CC) $(PTHREAD_LIBS) -o sptuser user.to libtsp.a simple_user : simple_user.o libsp.a $(CC) -o simple_user simple_user.o libsp.a -@@ -64,7 +63,7 @@ - $(CC) $(CFLAGS) $*.c +@@ -78,7 +77,7 @@ + $(CC) $(TCFLAGS) -fPIC -D_REENTRANT $*.c -o $*.tlo .c.to: - $(CC) $(TCFLAGS) -D_THREAD_SAFE -D_REENTRANT $*.c -o $*.to diff --git a/net/spread4/pkg-descr b/net/spread4/pkg-descr index eac0080659cd..1408d4e03b4a 100644 --- a/net/spread4/pkg-descr +++ b/net/spread4/pkg-descr @@ -13,4 +13,5 @@ various utility and demonstration programs. WWW: http://www.spread.org/ -- Anders Nordby <anders@fix.no> +- Joshua +joshua@roughtrade.net diff --git a/net/spread4/pkg-install b/net/spread4/pkg-install new file mode 100644 index 000000000000..52ce661bb46e --- /dev/null +++ b/net/spread4/pkg-install @@ -0,0 +1,102 @@ +#!/bin/sh + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +USER=spread +USER_HOMEDIR=/nonexistent +GROUP=spread +RUNDIR=/var/run/spread +NOLOGIN=/sbin/nologin + +case $2 in +PRE-INSTALL) + if pw group show "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if pw groupadd ${GROUP}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + + if pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + if pw usermod ${USER} -d ${USER_HOMEDIR} + then + echo "Changed home directory of \"${USER}\" to \"${USER_HOMEDIR}\"." + else + echo "Changing home directory of \"${USER}\" to \"${USER_HOMEDIR}\" failed." + exit 1 + fi + else + if pw useradd ${USER} -g ${GROUP} -h - \ + -d ${USER_HOMEDIR} -s ${NOLOGIN} -c "Spread User" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi + ;; +POST-INSTALL) + if [ ! -d ${RUNDIR} ]; then + install -d -o ${USER} -g ${GROUP} -m 0750 ${RUNDIR} + fi + ;; +*) + echo 'unexpect argument to pkg-install' + ;; +esac +#!/bin/sh + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +USER=spread +USER_HOMEDIR=/nonexistent +GROUP=spread +RUNDIR=/var/run/spread +NOLOGIN=/sbin/nologin + +case $2 in +PRE-INSTALL) + if pw group show "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if pw groupadd ${GROUP}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + + if pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + if pw usermod ${USER} -d ${USER_HOMEDIR} + then + echo "Changed home directory of \"${USER}\" to \"${USER_HOMEDIR}\"." + else + echo "Changing home directory of \"${USER}\" to \"${USER_HOMEDIR}\" failed." + exit 1 + fi + else + if pw useradd ${USER} -g ${GROUP} -h - \ + -d ${USER_HOMEDIR} -s ${NOLOGIN} -c "Spread User" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi + ;; +POST-INSTALL) + if [ ! -d ${RUNDIR} ]; then + install -d -o ${USER} -g ${GROUP} -m 0750 ${RUNDIR} + fi + ;; +*) + echo 'unexpect argument to pkg-install' + ;; +esac diff --git a/net/spread4/pkg-plist b/net/spread4/pkg-plist index 2ace5e62ee2f..f6d3a8d273ac 100644 --- a/net/spread4/pkg-plist +++ b/net/spread4/pkg-plist @@ -1,10 +1,13 @@ sbin/spread -bin/flooder -bin/monitor -bin/user -bin/tuser +bin/spflooder +bin/spmonitor +bin/spuser +bin/sptuser include/sp.h -etc/spread.conf.example +include/sp_func.h +include/sp_events.h +etc/spread.conf.sample +etc/spread.access_ip.sample lib/libsp.a lib/libtsp.a lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Spread/Spread.so @@ -12,13 +15,14 @@ lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Spread/Spread.bs lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Spread/autosplit.ix lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Spread/.packlist lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Spread.pm -@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Spread 2>/dev/null || true lib/perl5/%%PERL_VERSION%%/man/man3/Spread.3.gz %%JAVALIB%%%%JAVALIBDIR%%/spread/AdvancedMessageListener.class %%JAVALIB%%%%JAVALIBDIR%%/spread/BasicMessageListener.class %%JAVALIB%%%%JAVALIBDIR%%/spread/GroupID.class %%JAVALIB%%%%JAVALIBDIR%%/spread/MembershipInfo.class %%JAVALIB%%%%JAVALIBDIR%%/spread/MessageFactory.class +%%JAVALIB%%%%JAVALIBDIR%%/spread/NULLAuth.class +%%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadAuthInterface.class %%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadConnection$Listener.class %%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadConnection.class %%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadException.class @@ -27,10 +31,10 @@ lib/perl5/%%PERL_VERSION%%/man/man3/Spread.3.gz %%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadVersion.class %%JAVALIB%%@dirrm %%JAVALIBDIR%%/spread %%JAVALIB_DOCS%%share/doc/spread/java/readme.txt +%%JAVALIB_DOCS%%share/doc/spread/java/recThread.java %%JAVALIB_DOCS%%share/doc/spread/java/Flooder.java %%JAVALIB_DOCS%%share/doc/spread/java/User.java %%JAVALIB_DOCS%%share/doc/spread/java/html/allclasses-frame.html -%%JAVALIB_DOCS%%share/doc/spread/java/html/deprecated-list.html %%JAVALIB_DOCS%%share/doc/spread/java/html/help-doc.html %%JAVALIB_DOCS%%share/doc/spread/java/html/index-all.html %%JAVALIB_DOCS%%share/doc/spread/java/html/index.html @@ -44,6 +48,8 @@ lib/perl5/%%PERL_VERSION%%/man/man3/Spread.3.gz %%JAVALIB_DOCS%%share/doc/spread/java/html/spread/GroupID.html %%JAVALIB_DOCS%%share/doc/spread/java/html/spread/MembershipInfo.html %%JAVALIB_DOCS%%share/doc/spread/java/html/spread/MessageFactory.html +%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/NULLAuth.html +%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/SpreadAuthInterface.html %%JAVALIB_DOCS%%share/doc/spread/java/html/spread/SpreadConnection.html %%JAVALIB_DOCS%%share/doc/spread/java/html/spread/SpreadException.html %%JAVALIB_DOCS%%share/doc/spread/java/html/spread/SpreadGroup.html @@ -54,6 +60,9 @@ lib/perl5/%%PERL_VERSION%%/man/man3/Spread.3.gz %%JAVALIB_DOCS%%@dirrm share/doc/spread/java %%PORTDOCS%%share/doc/spread/perl/README %%PORTDOCS%%share/doc/spread/perl/test.pl +%%PORTDOCS%%share/doc/spread/LICENSE %%PORTDOCS%%share/doc/spread/Readme.txt +@unexec rmdir /var/run/spread 2>/dev/null || true +@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Spread 2>/dev/null || true %%PORTDOCS%%@dirrm share/doc/spread/perl %%PORTDOCS%%@dirrm share/doc/spread |