diff options
author | Yen-Ming Lee <leeym@FreeBSD.org> | 2003-08-10 03:49:48 +0000 |
---|---|---|
committer | Yen-Ming Lee <leeym@FreeBSD.org> | 2003-08-10 03:49:48 +0000 |
commit | 7753a3ffeda3d20abf4eda41a76066ce1ae56c6f (patch) | |
tree | f7c12c9acbcc484d3a580627352afb17f7b70fe5 /devel/distcc | |
parent | Update www/tdiary (maintainer): 1.5.4 --> 1.5.5 (diff) |
devel/distcc 2.7 -> 2.9
Change Log:
http://distcc.samba.org/download.html
Port Change Log:
o Install distccd.sh.sample script
o Create distcc user and group
o Generally bring closer to the packaging guidelines:
http://distcc.samba.org/ftp/unpacked/distcc/README.packaging
PR: 55416
Submitted by: Dominic Marks <dom@wirespeed.org.uk>
Notes
Notes:
svn path=/head/; revision=86695
Diffstat (limited to 'devel/distcc')
-rw-r--r-- | devel/distcc/Makefile | 26 | ||||
-rw-r--r-- | devel/distcc/distinfo | 2 | ||||
-rw-r--r-- | devel/distcc/files/distccd.sh.sample | 25 | ||||
-rw-r--r-- | devel/distcc/files/patch-src::mon-gnome.c | 11 | ||||
-rw-r--r-- | devel/distcc/pkg-install | 69 | ||||
-rw-r--r-- | devel/distcc/pkg-plist | 10 |
6 files changed, 108 insertions, 35 deletions
diff --git a/devel/distcc/Makefile b/devel/distcc/Makefile index 522e8dc79e1d..8c5652f038b9 100644 --- a/devel/distcc/Makefile +++ b/devel/distcc/Makefile @@ -6,7 +6,7 @@ # PORTNAME= distcc -PORTVERSION= 2.7 +PORTVERSION= 2.9 CATEGORIES= devel MASTER_SITES= http://distcc.samba.org/ftp/distcc/ @@ -34,10 +34,8 @@ PLIST_SUB+= WITH_GNOME="@comment " .endif MAN1= distcc.1 distccd.1 -DOC_FILES= AUTHORS COPYING COPYING.FDL DEPENDENCIES INSTALL NEWS README \ - linuxdoc/distcc.sgml doc/protocol-1.txt doc/status-1.txt -HTML_DOC_FILES= distcc.html distcc-1.html distcc-2.html distcc-3.html \ - distcc-4.html distcc-5.html +DOC_FILES= AUTHORS COPYING COPYING.FDL INSTALL NEWS README \ + doc/protocol-1.txt doc/status-1.txt pre-fetch: .if !defined(WITHOUT_GNOME) @@ -49,6 +47,10 @@ pre-fetch: @${ECHO_MSG} "" .endif +pre-install: + @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" \ + ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + do-install: @${INSTALL_PROGRAM} ${WRKSRC}/distcc ${PREFIX}/bin @${INSTALL_PROGRAM} ${WRKSRC}/distccmon-text ${PREFIX}/bin @@ -56,8 +58,12 @@ do-install: @${INSTALL_PROGRAM} ${WRKSRC}/distccmon-gnome ${PREFIX}/bin .endif @${INSTALL_PROGRAM} ${WRKSRC}/distccd ${PREFIX}/sbin + ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/distccd.sh.sample \ + ${PREFIX}/etc/rc.d/distccd.sh.sample -post-install: install-doc install-html-doc install-man +post-install: install-doc install-man + @${TOUCH} /var/run/distccd.pid + @${CHOWN} distcc:distcc /var/run/distccd.pid @${CAT} ${PKGMESSAGE} install-doc: @@ -68,14 +74,6 @@ install-doc: .endfor .endif -install-html-doc: -.if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR}/html -.for file in ${HTML_DOC_FILES} - @${INSTALL_DATA} ${WRKSRC}/linuxdoc/html/${file} ${DOCSDIR}/html -.endfor -.endif - install-man: .for file in ${MAN1} @${INSTALL_MAN} ${WRKSRC}/man/${file} ${MANPREFIX}/man/man1 diff --git a/devel/distcc/distinfo b/devel/distcc/distinfo index 8bbaaf1c14b2..92d82d26766f 100644 --- a/devel/distcc/distinfo +++ b/devel/distcc/distinfo @@ -1 +1 @@ -MD5 (distcc-2.7.tar.bz2) = 7f367102fb645b769368b901ec57e159 +MD5 (distcc-2.9.tar.bz2) = fa4cbb8dbebb0d87b0d1da7d2d34bf57 diff --git a/devel/distcc/files/distccd.sh.sample b/devel/distcc/files/distccd.sh.sample new file mode 100644 index 000000000000..48774c588b14 --- /dev/null +++ b/devel/distcc/files/distccd.sh.sample @@ -0,0 +1,25 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +case "$1" in +start) + [ -x ${PREFIX}/sbin/distccd ] && \ + ${PREFIX}/sbin/distccd -P /var/run/distccd.pid \ + --user distcc --daemon && echo -n ' distcc' + ;; +stop) + kill -TERM `cat /var/run/distccd.pid` && echo -n ' distcc' + ;; +*) + echo "Usage: `basename $0` { start | stop }" >&2 + ;; +esac + +exit 0 diff --git a/devel/distcc/files/patch-src::mon-gnome.c b/devel/distcc/files/patch-src::mon-gnome.c deleted file mode 100644 index 717268ccf456..000000000000 --- a/devel/distcc/files/patch-src::mon-gnome.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/mon-gnome.c.orig Mon Jun 16 13:34:03 2003 -+++ src/mon-gnome.c Mon Jun 16 13:34:12 2003 -@@ -33,8 +33,6 @@ - - #include "config.h" - --#include <stdint.h> -- - #include <stdio.h> - #include <stdlib.h> - #include <string.h> diff --git a/devel/distcc/pkg-install b/devel/distcc/pkg-install new file mode 100644 index 000000000000..f66c434adaf5 --- /dev/null +++ b/devel/distcc/pkg-install @@ -0,0 +1,69 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +PKG_PREFIX=${PKG_PREFIX:=/usr/local} +BATCH=${BATCH:=no} + +ask() { + local question default answer + + question=$1 + default=$2 + if [ -z "${PACKAGE_BUILDING}" -a x${BATCH} = xno ]; then + read -p "${question} [${default}]? " answer + fi + if [ x${answer} = x ]; then + answer=${default} + fi + echo ${answer} +} + +yesno() { + local question default answer + + question=$1 + default=$2 + while :; do + answer=$(ask "${question}" "${default}") + case "${answer}" in + [Yy]*) return 0;; + [Nn]*) return 1;; + esac + echo "Please answer yes or no." + done +} + +if [ x"$2" = xPRE-INSTALL ]; then + USER=distcc + GROUP=distcc + + if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if /usr/sbin/pw groupadd ${GROUP} -h - + then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + echo "Please create it, and try again." + exit 1 + fi + fi + + if /usr/sbin/pw usershow "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + if /usr/sbin/pw useradd ${USER} -g ${GROUP} -h - \ + -s /sbin/nologin \ + -c "Distcc" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + echo "Please create it, and try again." + exit 1 + fi + fi +fi diff --git a/devel/distcc/pkg-plist b/devel/distcc/pkg-plist index cf79849dc380..39ccc6082336 100644 --- a/devel/distcc/pkg-plist +++ b/devel/distcc/pkg-plist @@ -2,21 +2,13 @@ bin/distcc bin/distccmon-text %%WITH_GNOME%%bin/distccmon-gnome sbin/distccd +etc/rc.d/distccd.sh.sample %%PORTDOCS%%%%DOCSDIR%%/AUTHORS %%PORTDOCS%%%%DOCSDIR%%/COPYING %%PORTDOCS%%%%DOCSDIR%%/COPYING.FDL -%%PORTDOCS%%%%DOCSDIR%%/DEPENDENCIES %%PORTDOCS%%%%DOCSDIR%%/INSTALL %%PORTDOCS%%%%DOCSDIR%%/NEWS %%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%%%DOCSDIR%%/distcc.sgml %%PORTDOCS%%%%DOCSDIR%%/protocol-1.txt %%PORTDOCS%%%%DOCSDIR%%/status-1.txt -%%PORTDOCS%%%%DOCSDIR%%/html/distcc.html -%%PORTDOCS%%%%DOCSDIR%%/html/distcc-1.html -%%PORTDOCS%%%%DOCSDIR%%/html/distcc-2.html -%%PORTDOCS%%%%DOCSDIR%%/html/distcc-3.html -%%PORTDOCS%%%%DOCSDIR%%/html/distcc-4.html -%%PORTDOCS%%%%DOCSDIR%%/html/distcc-5.html -%%PORTDOCS%%@dirrm %%DOCSDIR%%/html %%PORTDOCS%%@dirrm %%DOCSDIR%% |