diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-10-09 01:17:43 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-10-09 01:17:43 +0000 |
commit | 7977c0ecab7e4106489d6e702ccaf3dddbf1edf3 (patch) | |
tree | ebe30432b6414f750c0504108ccbe105150763b2 /databases | |
parent | ab77da40d1bc5b44fbd990c89a9012c5de3f318b (diff) | |
download | ports-7977c0ecab7e4106489d6e702ccaf3dddbf1edf3.tar.gz ports-7977c0ecab7e4106489d6e702ccaf3dddbf1edf3.zip |
Notes
Diffstat (limited to 'databases')
-rw-r--r-- | databases/gnats4/Makefile | 78 | ||||
-rw-r--r-- | databases/gnats4/files/patch-Makefile.in | 11 | ||||
-rw-r--r-- | databases/gnats4/files/patch-gnats::Makefile.in | 69 | ||||
-rw-r--r-- | databases/gnats4/files/patch-gnats::configure | 11 | ||||
-rw-r--r-- | databases/gnats4/files/patch-send-pr::Makefile.in | 11 | ||||
-rw-r--r-- | databases/gnats4/pkg-install | 29 | ||||
-rw-r--r-- | databases/gnats4/pkg-message | 23 | ||||
-rw-r--r-- | databases/gnats4/pkg-plist | 39 |
8 files changed, 225 insertions, 46 deletions
diff --git a/databases/gnats4/Makefile b/databases/gnats4/Makefile index d648d93445a6..4b4f773df1be 100644 --- a/databases/gnats4/Makefile +++ b/databases/gnats4/Makefile @@ -7,61 +7,107 @@ PORTNAME= gnats PORTVERSION= 4.0 -CATEGORIES= databases -MASTER_SITES= http://www.yngve.com/%SUBDIR%/ # ${MASTER_SITE_GNU} +PORTREVISION= 1 +CATEGORIES= databases devel +MASTER_SITES= http://home.pacific.net.au/~meganandaj/ \ + http://www.yngve.com/%SUBDIR%/ \ + # ${MASTER_SITE_GNU} MASTER_SITE_SUBDIR= gnats MAINTAINER= eikemeier@fillmore-labs.com COMMENT= GNATS, the GNU Problem Report Management System GNU_CONFIGURE= yes -CONFIGURE_ARGS= --sharedstatedir=${PREFIX}/share/gnats +USE_GMAKE= yes LATEST_LINK= ${PKGNAMEPREFIX}gnats4${PKGNAMESUFFIX} CONFLICTS= gnats-3.* -USE_GMAKE= yes +PKGMESSAGE= ${WRKDIR}/pkg-message +PKGINSTALL= ${WRKDIR}/pkg-install + +GNATSDBBASE?= /var/db + +CONFIGURE_ARGS= --sharedstatedir=${GNATSDBBASE}/gnats \ + --datadir=${GNATSDBBASE} + +.ifdef WITH_SUBMITTER_ID +CONFIGURE_ARGS+= --with-submitter=${WITH_SUBMITTER_ID} +.endif + +.ifdef WITH_ORGANIZATION +CONFIGURE_ARGS+= --with-organization=${WITH_ORGANIZATION:Q} +.endif + +.ifdef WITH_GNATSD_SERVICE +CONFIGURE_ARGS+= --with-gnats-service=${WITH_GNATSD_SERVICE} +.endif + +PLIST_SUB= GNATSDBDIR=${GNATSDBBASE}/gnats + MAN1= edit-pr.1 query-pr.1 send-pr.1 MAN5= databases.5 dbconfig.5 MAN7= gnats.7 -MAN8= delete-pr.8 file-pr.8 gen-index.8 gnatsd.8 mkcat.8 mkdb.8 pr-edit.8 queue-pr.8 rmcat.8 +MAN8= delete-pr.8 file-pr.8 gen-index.8 gnatsd.8 \ + mkcat.8 mkdb.8 pr-edit.8 queue-pr.8 rmcat.8 INFO= gnats-faq gnats +DOCFILES= NEWS UPGRADING -PKGMESSAGE= ${WRKDIR}/pkg-message - -STRIP= - -BINARIES= bin/getclose bin/query-pr libexec/gnats/gen-index libexec/gnats/gnats-pwconv \ - libexec/gnats/gnatsd libexec/gnats/pr-age libexec/gnats/pr-edit libexec/gnats/queue-pr - -.if defined(WITH_EMACS_PORT) +.ifdef WITH_EMACS_PORT EMACS_PORT_NAME= ${WITH_EMACS_PORT} CONFIGURE_ARGS+= --with-lispdir=${LOCALBASE}/${EMACS_SITE_LISPDIR} .else PLIST_SUB+= EMACS_SITE_LISPDIR="@comment " .endif +.ifdef CLIENT_ONLY +ALL_TARGET= all-tools +INSTALL_TARGET= install-tools +PLIST_SUB+= SERVER="@comment " +PKGNAMESUFFIX= -client +CONFLICTS+= ${PKGNAMEPREFIX}${PORTNAME}-4.* +.else +PLIST_SUB+= SERVER="" +CONFLICTS+= ${PKGNAMEPREFIX}${PORTNAME}-client-4.* +.endif + pre-everything:: @${ECHO} "=============================================================" @${ECHO} @${ECHO} "You can build ${PKGNAME} with the following options:" @${ECHO} + @${ECHO} "WITH_SUBMITTER_ID=unknown default submitter-id" + @${ECHO} "WITH_ORGANIZATION='unknown' default organization" + @${ECHO} "WITH_GNATSD_SERVICE=support default gnatsd port name" @${ECHO} "WITH_EMACS_PORT=emacs with Emacs support" @${ECHO} @${ECHO} "=============================================================" @${ECHO} post-build: - ${SED} -e 's,%%PREFIX%%,${PREFIX},g' ${PKGDIR}/pkg-message >${PKGMESSAGE} + @for doc in pkg-message pkg-install; do \ + ${SED} -e 's,%%PREFIX%%,${PREFIX},g' \ + -e 's,%%GNATSDBDIR%%,${GNATSDBBASE}/gnats,g' \ + ${PKGDIR}/$${doc} >${WRKDIR}/$${doc} ; \ + done pre-install: @${MKDIR} ${PREFIX}/libexec/gnats @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL post-install: - @for binary in ${BINARIES}; do \ - ${STRIP_CMD} ${PREFIX}/$${binary}; \ +.ifndef CLIENT_ONLY + @for conf in databases gnatsd.host_access; do \ + [ -f ${PREFIX}/etc/gnats/$${conf} ] \ + || ${CP} ${PREFIX}/etc/gnats/$${conf}.default ${PREFIX}/etc/gnats/$${conf}; \ done +.endif +.ifndef NOPORTDOCS + @${MKDIR} ${DOCSDIR} + @for doc in ${DOCFILES}; do \ + ${INSTALL_DATA} ${WRKSRC}/$${doc} ${DOCSDIR}; \ + done +.endif @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/databases/gnats4/files/patch-Makefile.in b/databases/gnats4/files/patch-Makefile.in new file mode 100644 index 000000000000..d2dba6605986 --- /dev/null +++ b/databases/gnats4/files/patch-Makefile.in @@ -0,0 +1,11 @@ +--- Makefile.in.orig Mon Sep 22 05:52:58 2003 ++++ Makefile.in Mon Sep 22 05:53:13 2003 +@@ -50,7 +50,7 @@ + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' $@ + + install-tools: $(LIBIBERTY) +- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' $@ ++ for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done + + uninstall: + for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done diff --git a/databases/gnats4/files/patch-gnats::Makefile.in b/databases/gnats4/files/patch-gnats::Makefile.in index ab6fa83805d5..d0bce49b1d86 100644 --- a/databases/gnats4/files/patch-gnats::Makefile.in +++ b/databases/gnats4/files/patch-gnats::Makefile.in @@ -1,5 +1,23 @@ --- gnats/Makefile.in.orig Sun Jul 27 01:23:17 2003 -+++ gnats/Makefile.in Fri Aug 22 18:41:18 2003 ++++ gnats/Makefile.in Mon Sep 22 05:41:57 2003 +@@ -91,7 +91,7 @@ + + INSTALL = $(srcdir)/../install-sh -c + INSTALL_PROGRAM = @INSTALL_PROGRAM@ +-INSTALL_SCRIPT = @INSTALL_PROGRAM@ ++INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_DATA = @INSTALL_DATA@ + + SUB_INSTALL = `echo $(INSTALL) | sed 's,^\([^/]\),../\1,'` +@@ -163,7 +163,7 @@ + check-db delete-pr dbconfig gnats-databases gnats-pwconv $(EXTRA_STUFF) + + all-tools: libgnats.a query-pr pr-age pr-edit edit-pr file-pr getclose \ +- config-send-pr mail-agent dbconfig ++ mail-agent dbconfig + + libgnats.a: $(LIBOBJS) + -rm -f tmplibgnats.a libgnats.a @@ -371,7 +371,9 @@ else \ echo "*** Warning: Must chown $(GNATS_USER) $(datadir)/gnats" ; \ @@ -11,3 +29,52 @@ for i in categories submitters responsible gnatsd.user_access addresses states classes dbconfig ; do \ if [ -f "$$i" ] ; then \ $(INSTALL_DATA) $$i $(sysconfdir)/gnats/defaults/$$i ; \ +@@ -386,7 +388,7 @@ + $(INSTALL_SCRIPT) edit-pr $(bindir)/edit-pr + $(INSTALL_SCRIPT) $(srcdir)/diff-prs $(libexecdir)/gnats/diff-prs + $(INSTALL_SCRIPT) mail-agent $(libexecdir)/gnats/mail-agent +- $(INSTALL_PROGRAM) file-pr $(libexecdir)/gnats/file-pr ++ $(INSTALL_SCRIPT) file-pr $(libexecdir)/gnats/file-pr + $(INSTALL_PROGRAM) pr-age $(libexecdir)/gnats/pr-age + $(INSTALL_PROGRAM) pr-edit $(libexecdir)/gnats/pr-edit + @if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ +@@ -404,29 +406,29 @@ + install-gnats-arch-dep: install-gnats-bin $(EXTRA_INSTALL) + + install-gnats-arch-indep: all-gnats install-tools-arch-indep +- @if [ -f $(GLOBAL_DB_LIST_FILE) ]; then \ +- echo "Not putting gnats-databases file in $(GLOBAL_DB_LIST_FILE), it's already there." ; \ ++ @if [ -f $(GLOBAL_DB_LIST_FILE).default ]; then \ ++ echo "Not putting gnats-databases file in $(GLOBAL_DB_LIST_FILE).default, it's already there." ; \ + true ; \ + else \ + if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ + $(INSTALL_DATA) -o $(GNATS_USER) gnats-databases \ +- $(GLOBAL_DB_LIST_FILE) ; \ ++ $(GLOBAL_DB_LIST_FILE).default ; \ + else \ +- $(INSTALL_DATA) gnats-databases $(GLOBAL_DB_LIST_FILE) ; \ +- echo "*** Warning: Must chown $(GNATS_USER) $(GLOBAL_DB_LIST_FILE)" ; \ ++ $(INSTALL_DATA) gnats-databases $(GLOBAL_DB_LIST_FILE).default ; \ ++ echo "*** Warning: Must chown $(GNATS_USER) $(GLOBAL_DB_LIST_FILE).default" ; \ + fi \ + fi +- @if [ -f $(GNATSD_HOST_ACCESS_FILE) ]; then \ +- echo "Not putting gnats.host_access file in $(GNATSD_HOST_ACCESS_FILE), it's already there." ; \ ++ @if [ -f $(GNATSD_HOST_ACCESS_FILE).default ]; then \ ++ echo "Not putting gnats.host_access file in $(GNATSD_HOST_ACCESS_FILE).default, it's already there." ; \ + true ; \ + else \ + if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ + $(INSTALL_DATA) -o $(GNATS_USER) $(srcdir)/gnatsd.host_access \ +- $(GNATSD_HOST_ACCESS_FILE) ; \ ++ $(GNATSD_HOST_ACCESS_FILE).default ; \ + else \ + $(INSTALL_DATA) $(srcdir)/gnatsd.host_access \ +- $(GNATSD_HOST_ACCESS_FILE) ; \ +- echo "*** Warning: Must chown $(GNATS_USER) $(GNATSD_HOST_ACCESS_FILE)" ; \ ++ $(GNATSD_HOST_ACCESS_FILE).default ; \ ++ echo "*** Warning: Must chown $(GNATS_USER) $(GNATSD_HOST_ACCESS_FILE).default" ; \ + fi \ + fi + @echo "*** If you're a first-time user, you'll want to create a new database"; diff --git a/databases/gnats4/files/patch-gnats::configure b/databases/gnats4/files/patch-gnats::configure new file mode 100644 index 000000000000..163b91ec3d72 --- /dev/null +++ b/databases/gnats4/files/patch-gnats::configure @@ -0,0 +1,11 @@ +--- gnats/configure.orig Sun Sep 21 13:17:44 2003 ++++ gnats/configure Sun Sep 21 13:18:30 2003 +@@ -2864,7 +2864,7 @@ + fi + + if test "x$GCC" = "xyes" ; then +- GCC_CFLAGS="-W -Wall -ansi -pedantic -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wno-format" ++ GCC_CFLAGS="-W -Wall -ansi -pedantic -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wno-format -Wno-long-long" + fi + + # ***** Guess the configuration ***** diff --git a/databases/gnats4/files/patch-send-pr::Makefile.in b/databases/gnats4/files/patch-send-pr::Makefile.in new file mode 100644 index 000000000000..c22b3208f169 --- /dev/null +++ b/databases/gnats4/files/patch-send-pr::Makefile.in @@ -0,0 +1,11 @@ +--- send-pr/Makefile.in.orig Sun Sep 21 19:02:06 2003 ++++ send-pr/Makefile.in Sun Sep 21 19:02:24 2003 +@@ -59,7 +59,7 @@ + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_DATA = @INSTALL_DATA@ +-INSTALL_SCRIPT = @INSTALL_PROGRAM@ ++INSTALL_SCRIPT = @INSTALL_SCRIPT@ + + CFLAGS = -g + LDFLAGS = -g diff --git a/databases/gnats4/pkg-install b/databases/gnats4/pkg-install index 6dbcc2492c6b..35c079e5f148 100644 --- a/databases/gnats4/pkg-install +++ b/databases/gnats4/pkg-install @@ -5,26 +5,39 @@ ECHO_CMD=echo GREP=/usr/bin/grep -ID=/usr/bin/id PW=/usr/sbin/pw + FTPUSERS=/etc/ftpusers +GNATSDBDIR=%%GNATSDBDIR%% case $2 in PRE-INSTALL) - if ! ${ID} -u gnats >/dev/null 2>&1; then - if ${PW} add user -n gnats -u 61 -g 1 -d ${PKG_PREFIX}/share/gnats \ - -c "GNATS database owner" -p "*"; then - ${GREP} -qs '^gnats$' ${FTPUSERS} || ${ECHO_CMD} gnats >>/etc/ftpusers + if [ ! -x ${PW} ]; then + ${ECHO_CMD} "Your system is missing the \`pw' command." + exit 1 + fi + if ${PW} usershow -n gnats >/dev/null 2>&1; then + if [ "`pw usershow -n gnats | awk -F: '{print $9}'`" != "${GNATSDBDIR}" ]; then + ${PW} usermod -n gnats -d "${GNATSDBDIR}" 2>/dev/null + ${ECHO_CMD} "===> Account \`gnats' updated." + fi + else + if ${PW} useradd -n gnats -u 61 -g 1 -d "${GNATSDBDIR}" \ + -c "GNATS database owner" -h -; then + ${GREP} -qs '^gnats$' ${FTPUSERS} || ${ECHO_CMD} gnats >> ${FTPUSERS} + ${ECHO_CMD} "===> Account \`gnats' created." else ${ECHO_CMD} ${ECHO_CMD} "The FreeBSD standard userid for gnats is 61, but this system" - ${ECHO_CMD} "has already a different account with this userid: \``${ID} -un 61`'" + ${ECHO_CMD} "has already a different account with this userid:" + ${ECHO_CMD} + ${PW} usershow -u 61 -P ${ECHO_CMD} ${ECHO_CMD} "You can either delete this account (which may be dangerous) with" ${ECHO_CMD} " ${PW} userdel -u 61" ${ECHO_CMD} "or add the gnats user with an other userid with" - ${ECHO_CMD} " ${PW} useradd -n gnats -g 1 \\" - ${ECHO_CMD} " -d ${PKG_PREFIX}/share/gnats -c 'GNATS database owner' -p '*'" + ${ECHO_CMD} " ${PW} useradd -n gnats -g daemon \\" + ${ECHO_CMD} " -d ${GNATSDBDIR} -c 'GNATS database owner' -h -" ${ECHO_CMD} "and retry installing this package" ${ECHO_CMD} exit 1 diff --git a/databases/gnats4/pkg-message b/databases/gnats4/pkg-message index a35d93a8c8d1..9f809091308c 100644 --- a/databases/gnats4/pkg-message +++ b/databases/gnats4/pkg-message @@ -2,12 +2,23 @@ GNATS has been successfully installed. -Run - su gnats %%PREFIX%%/libexec/gnats/mkdb default -to create the default database. +If you want to run the GNATS server, enter -Try "man gnats" or "info gnats" or the online manual at - <http://www.gnu.org/software/gnats/gnats_toc.html> -for more information + %%PREFIX%%/libexec/gnats/mkdb default + +to create the default database and add + + support stream tcp nowait gnats %%PREFIX%%/libexec/gnats/gnatsd gnatsd + +to inetd.conf(5). Instructions to upgrade from a +GNATS 3.x database are in + + %%PREFIX%%/share/doc/gnats/UPGRADING + +Try `man gnats', `info gnats' and the online manual at + + http://www.gnu.org/software/gnats/gnats_toc.html + +for more information. ************************************************************ diff --git a/databases/gnats4/pkg-plist b/databases/gnats4/pkg-plist index 28e41d462221..059e24e2eab0 100644 --- a/databases/gnats4/pkg-plist +++ b/databases/gnats4/pkg-plist @@ -4,7 +4,12 @@ bin/getclose bin/install-sid bin/query-pr bin/send-pr -etc/gnats/databases +%%SERVER%%@unexec if cmp -s %D/etc/gnats/databases %D/etc/gnats/databases.default; then rm -f %D/etc/gnats/databases; fi +%%SERVER%%etc/gnats/databases.default +%%SERVER%%@exec [ -f %B/databases ] || cp %B/%f %B/databases +%%SERVER%%@unexec if cmp -s %D/etc/gnats/gnatsd.host_access %D/etc/gnats/gnatsd.host_access.default; then rm -f %D/etc/gnats/gnatsd.host_access; fi +%%SERVER%%etc/gnats/gnatsd.host_access.default +%%SERVER%%@exec [ -f %B/gnatsd.host_access ] || cp %B/%f %B/gnatsd.host_access etc/gnats/defaults/addresses etc/gnats/defaults/categories etc/gnats/defaults/classes @@ -13,25 +18,29 @@ etc/gnats/defaults/gnatsd.user_access etc/gnats/defaults/responsible etc/gnats/defaults/states etc/gnats/defaults/submitters -etc/gnats/gnatsd.host_access @dirrm etc/gnats/defaults -@dirrm etc/gnats -libexec/gnats/at-pr -libexec/gnats/check-db -libexec/gnats/delete-pr +@unexec rmdir %D/etc/gnats 2>/dev/null || true +%%SERVER%%libexec/gnats/at-pr +%%SERVER%%libexec/gnats/check-db +%%SERVER%%libexec/gnats/delete-pr libexec/gnats/diff-prs libexec/gnats/file-pr -libexec/gnats/gen-index -libexec/gnats/gnats-pwconv -libexec/gnats/gnatsd +%%SERVER%%libexec/gnats/gen-index +%%SERVER%%libexec/gnats/gnats-pwconv +%%SERVER%%libexec/gnats/gnatsd libexec/gnats/mail-agent -libexec/gnats/mail-query -libexec/gnats/mkcat -libexec/gnats/mkdb +%%SERVER%%libexec/gnats/mail-query +%%SERVER%%libexec/gnats/mkcat +%%SERVER%%libexec/gnats/mkdb libexec/gnats/pr-age libexec/gnats/pr-edit -libexec/gnats/queue-pr -libexec/gnats/rmcat +%%SERVER%%libexec/gnats/queue-pr +%%SERVER%%libexec/gnats/rmcat @dirrm libexec/gnats +@exec mkdir -p %%GNATSDBDIR%% +@exec chown gnats %%GNATSDBDIR%% +@unexec rmdir %%GNATSDBDIR%% 2>/dev/null || true +%%PORTDOCS%%%%DOCSDIR%%/NEWS +%%PORTDOCS%%%%DOCSDIR%%/UPGRADING +%%PORTDOCS%%@dirrm %%DOCSDIR%% %%EMACS_SITE_LISPDIR%%/gnats.el -@unexec rmdir %D/share/gnats 2>/dev/null || true |