pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/news/inn make package DESTDIR'able



details:   https://anonhg.NetBSD.org/pkgsrc/rev/71cdc6e69116
branches:  trunk
changeset: 551969:71cdc6e69116
user:      spz <spz%pkgsrc.org@localhost>
date:      Sun Dec 21 16:00:04 2008 +0000

description:
make package DESTDIR'able

diffstat:

 news/inn/Makefile         |  72 ++++++++++++++++++++++++----------------------
 news/inn/PLIST            |  25 +++-------------
 news/inn/distinfo         |   4 +-
 news/inn/files/innd.sh    |  21 +++++++++++++-
 news/inn/patches/patch-ah |  20 +++++-------
 5 files changed, 72 insertions(+), 70 deletions(-)

diffs (271 lines):

diff -r 37a178eb071a -r 71cdc6e69116 news/inn/Makefile
--- a/news/inn/Makefile Sun Dec 21 15:54:46 2008 +0000
+++ b/news/inn/Makefile Sun Dec 21 16:00:04 2008 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.94 2008/12/21 11:55:25 spz Exp $
+# $NetBSD: Makefile,v 1.95 2008/12/21 16:00:04 spz Exp $
 
 DISTNAME=              inn-2.4.5
-PKGREVISION=           2
+PKGREVISION=           3
 CATEGORIES=            news
 MASTER_SITES=          ftp://ftp.isc.org/isc/inn/ \
                        ftp://ftp.fu-berlin.de/unix/news/inn/
@@ -107,14 +107,27 @@
                        innreport.conf innwatch.ctl moderators \
                        motd.news news2mail.cf newsfeeds nnrpd.track \
                        nntpsend.ctl ovdb.conf overview.fmt passwd.nntp \
-                       radius.conf readers.conf sasl.conf storage.conf
+                       radius.conf readers.conf sasl.conf storage.conf \
+                       subscriptions
 .for file in ${CFILES}
 CONF_FILES_PERMS+=     ${EXAMPLEDIR}/${file} ${PKG_SYSCONFDIR}/${file} \
                        ${INN_USER} ${INN_GROUP} 0664
 .endfor
 
+CONF_FILES_PERMS+=      ${EXAMPLEDIR}/active.minimal ${INN_DATA_DIR}/db/active ${INN_USER} ${INN_GROUP} 0664
+CONF_FILES_PERMS+=      ${EXAMPLEDIR}/newsgroups.minimal ${INN_DATA_DIR}/db/newsgroups ${INN_USER} ${INN_GROUP} 0664
+
+DBFILES=               active.times history
+
+.for file in ${DBFILES}
+CONF_FILES_PERMS+=      ${EXAMPLEDIR}/${file} ${INN_DATA_DIR}/db/${file} \
+                       ${INN_USER} ${INN_GROUP} 0664
+.endfor
+
 RCD_SCRIPTS=           innd
 
+PKG_DESTDIR_SUPPORT=   destdir
+
 .include "../../mk/bsd.prefs.mk"
 
 .if ${OPSYS} == "SunOS"
@@ -130,43 +143,32 @@
 .include "options.mk"
 
 pre-install:
-       ${INSTALL_DATA_DIR} ${EXAMPLEDIR}
-       for FILE in `ls -1 ${WRKSRC}/samples/* |                        \
-                    ${EGREP} -v '(Makefile|.*\.(in|orig)$$)'`; do      \
-               ${INSTALL_DATA} $$FILE ${EXAMPLEDIR};                   \
+       ${INSTALL_DATA_DIR} ${DESTDIR}${EXAMPLEDIR}
+       for FILE in ${CFILES} active.minimal newsgroups.minimal; do     \
+               ${INSTALL_DATA} ${WRKSRC}/site/$$FILE                   \
+                                       ${DESTDIR}${EXAMPLEDIR};        \
        done
-       # makedbz needs these earlier than pkgsrc will install them normally
-       if [ ! -f ${PKG_SYSCONFDIR}/inn.conf ] ; then                   \
-               ${INSTALL} ${COPY} -o ${INN_USER} -g ${INN_GROUP} -m 0664 \
-                               ${EXAMPLEDIR}/inn.conf                  \
-                               ${PKG_SYSCONFDIR}/inn.conf ;            \
-       fi
-       if [ ! -d ${INN_DATA_DIR}/db ] ; then                           \
-               ${INSTALL} -d -o ${INN_USER} ${INN_DATA_DIR}/db ;       \
-       fi
-
+       for FILE in ${DBFILES} ; do                                     \
+               ${TOUCH} ${WRKSRC}/site/$$FILE ;                        \
+               ${INSTALL_DATA} ${WRKSRC}/site/$$FILE                   \
+                                       ${DESTDIR}${EXAMPLEDIR};        \
+       done
 
 post-install:
+       ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/etc/nntp
+       ${INSTALL_PROGRAM_DIR} ${DESTDIR}${PREFIX}/sbin
        for FILE in cnfsstat ctlinnd inndstart makehistory ; do         \
-               ${INSTALL} -l rs ${PREFIX}/${INN_PATHBIN}/$$FILE     \
-                               ${PREFIX}/sbin/$$FILE ;                 \
-       done
-       ${INSTALL} -l rs ${PREFIX}/${INN_PATHBIN}/inews ${PREFIX}/bin/inews
-       ${INSTALL} -l rs ${PREFIX}/${INN_PATHBIN}/rnews ${PREFIX}/bin/rnews
-       for FILE in libinn.a libstorage.a libinnhist.a ; do             \
-               ${CHMOD} 644 ${PREFIX}/lib/$$FILE ;                     \
+               ${INSTALL} -l rs ${DESTDIR}${PREFIX}/${INN_PATHBIN}/$$FILE \
+                               ${DESTDIR}${PREFIX}/sbin/$$FILE ;       \
        done
-       if [ -d ${INN_DATA_DIR}/etc ] ; then                            \
-               ${ECHO} "" ;                                            \
-               ${ECHO} "WARNING WARNING WARNING WARNING WARNING WARNING WARNING";\
-               ${ECHO} "" ;                                            \
-               ${ECHO} "WARNING: old inn config directory ${INN_DATA_DIR}/etc found";\
-               ${ECHO} "WARNING: please move your config to ${PREFIX}/etc/inn"; \
-               ${ECHO} "WARNING: before starting your new inn install" ;       \
-               ${ECHO} "" ;                                            \
-               ${ECHO} "WARNING WARNING WARNING WARNING WARNING WARNING WARNING";\
-               ${ECHO} "" ;                                            \
-       fi
+       ${INSTALL_PROGRAM_DIR} ${DESTDIR}${PREFIX}/bin
+       ${INSTALL} -l rs ${DESTDIR}${PREFIX}/${INN_PATHBIN}/inews       \
+                       ${DESTDIR}${PREFIX}/bin/inews
+       ${INSTALL} -l rs ${DESTDIR}${PREFIX}/${INN_PATHBIN}/rnews       \
+                       ${DESTDIR}${PREFIX}/bin/rnews
+       for FILE in libinn.a libstorage.a libinnhist.a ; do             \
+               ${CHMOD} 644 ${DESTDIR}${PREFIX}/lib/$$FILE ;           \
+       done
 
 .include "../../security/openssl/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 37a178eb071a -r 71cdc6e69116 news/inn/PLIST
--- a/news/inn/PLIST    Sun Dec 21 15:54:46 2008 +0000
+++ b/news/inn/PLIST    Sun Dec 21 16:00:04 2008 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.16 2008/12/21 11:55:25 spz Exp $
+@comment $NetBSD: PLIST,v 1.17 2008/12/21 16:00:04 spz Exp $
 bin/inews
 bin/rnews
 include/inn/conffile.h
@@ -270,8 +270,8 @@
 share/doc/inn/hook-python
 share/doc/inn/hook-tcl
 share/doc/inn/sample-control
-share/examples/inn/INN.py
 share/examples/inn/active.minimal
+share/examples/inn/active.times
 share/examples/inn/actsync.cfg
 share/examples/inn/actsync.ign
 share/examples/inn/buffindexed.conf
@@ -279,10 +279,7 @@
 share/examples/inn/cycbuff.conf
 share/examples/inn/distrib.pats
 share/examples/inn/expire.ctl
-share/examples/inn/filter.tcl
-share/examples/inn/filter_innd.pl
-share/examples/inn/filter_innd.py
-share/examples/inn/filter_nnrpd.pl
+share/examples/inn/history
 share/examples/inn/incoming.conf
 share/examples/inn/inn.conf
 share/examples/inn/innfeed.conf
@@ -293,27 +290,14 @@
 share/examples/inn/news2mail.cf
 share/examples/inn/newsfeeds
 share/examples/inn/newsgroups.minimal
-share/examples/inn/nnrpd.py
+share/examples/inn/nntpsend.ctl
 share/examples/inn/nnrpd.track
-share/examples/inn/nnrpd_access.pl
-share/examples/inn/nnrpd_access.py
-share/examples/inn/nnrpd_access_wrapper.pl
-share/examples/inn/nnrpd_access_wrapper.py
-share/examples/inn/nnrpd_auth.pl
-share/examples/inn/nnrpd_auth.py
-share/examples/inn/nnrpd_auth_wrapper.pl
-share/examples/inn/nnrpd_auth_wrapper.py
-share/examples/inn/nnrpd_dynamic.py
-share/examples/inn/nnrpd_dynamic_wrapper.py
-share/examples/inn/nntpsend.ctl
 share/examples/inn/ovdb.conf
 share/examples/inn/overview.fmt
 share/examples/inn/passwd.nntp
 share/examples/inn/radius.conf
 share/examples/inn/readers.conf
 share/examples/inn/sasl.conf
-share/examples/inn/startup.tcl
-share/examples/inn/startup_innd.pl
 share/examples/inn/storage.conf
 share/examples/inn/subscriptions
 share/examples/rc.d/innd
@@ -329,3 +313,4 @@
 @dirrm include/inn/inn
 @dirrm include/inn
 @dirrm etc/inn
+@dirrm etc/nntp
diff -r 37a178eb071a -r 71cdc6e69116 news/inn/distinfo
--- a/news/inn/distinfo Sun Dec 21 15:54:46 2008 +0000
+++ b/news/inn/distinfo Sun Dec 21 16:00:04 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.18 2008/09/03 21:33:29 spz Exp $
+$NetBSD: distinfo,v 1.19 2008/12/21 16:00:04 spz Exp $
 
 SHA1 (inn-2.4.5.tar.gz) = ca0f96e908633590e5e0e2e8b2f00762f7a97e9a
 RMD160 (inn-2.4.5.tar.gz) = ae01b1e793f99a3081cc03c4340c0b89ecba00e6
@@ -8,6 +8,6 @@
 SHA1 (patch-ac) = 586748ecfbe0bb48dd42b422f262a1741cef9e90
 SHA1 (patch-ad) = 1f4d4b15a478d6d35185977d8bc32a4e161665c5
 SHA1 (patch-ag) = d70bbbfd0fd2d33d33884000bf3e46b7c33fd15a
-SHA1 (patch-ah) = 966977fb7efb705f903772dfbc9fd5161f140296
+SHA1 (patch-ah) = 9927418280dc39bee87bb0bd0c97348276ccfe9c
 SHA1 (patch-ai) = 9d99bd095dc5cb4b9c99274c0adeaab779ca2c2d
 SHA1 (patch-aj) = a53726b9a510ba4e6e7a9e0905b91b9820cf86c8
diff -r 37a178eb071a -r 71cdc6e69116 news/inn/files/innd.sh
--- a/news/inn/files/innd.sh    Sun Dec 21 15:54:46 2008 +0000
+++ b/news/inn/files/innd.sh    Sun Dec 21 16:00:04 2008 +0000
@@ -1,11 +1,24 @@
 #!/bin/sh
 #
-# $NetBSD: innd.sh,v 1.15 2008/09/03 20:19:39 spz Exp $
+# $NetBSD: innd.sh,v 1.16 2008/12/21 16:00:04 spz Exp $
 #
 # PROVIDE: inn
 # REQUIRE: DAEMON
 # KEYWORD: shutdown
 
+if [ -d @INN_DATA_DIR@/etc ] ; then
+       echo ""
+       echo "WARNING WARNING WARNING WARNING WARNING WARNING WARNING"
+       echo ""
+       echo "WARNING: old inn config directory @INN_DATA_DIR@/etc found"
+       echo "WARNING: please move your config to @PREFIX@/etc/inn"
+       echo "WARNING: before starting your new inn install"
+       echo ""
+       echo "WARNING WARNING WARNING WARNING WARNING WARNING WARNING"
+       echo ""
+       sleep 120
+fi
+
 if [ -x @INN_PATHBIN@/rc.news -a -s @INN_DATA_DIR@/db/active ]
 then
        if [ ! -f @PREFIX@/etc/nntp/server ]
@@ -22,6 +35,12 @@
                fi)
        fi
 
+       if [ -f @INN_DATA_DIR@/db/history -a \
+               ! -s @INN_DATA_DIR@/db/history ]
+       then
+               @INN_PATHBIN@/makedbz -i -o -s 10000
+       fi
+
        if [ $# -eq 0 ]
        then
                echo -n ' innd'
diff -r 37a178eb071a -r 71cdc6e69116 news/inn/patches/patch-ah
--- a/news/inn/patches/patch-ah Sun Dec 21 15:54:46 2008 +0000
+++ b/news/inn/patches/patch-ah Sun Dec 21 16:00:04 2008 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ah,v 1.10 2008/09/03 21:33:29 spz Exp $
+$NetBSD: patch-ah,v 1.11 2008/12/21 16:00:05 spz Exp $
 
 --- site/Makefile.orig 2008-06-29 17:56:57.000000000 +0000
 +++ site/Makefile
-@@ -74,23 +74,12 @@
+@@ -74,28 +74,16 @@
  ALL           = $(MOST) $(REST)
  
  REST_INSTALLED        = \
@@ -22,19 +22,15 @@
        $D$(PATH_TCL_STARTUP) $D$(PATH_TCL_FILTER) $D$(PATH_PYTHON_NNRPD_MODULE) \
 -      $D$(PATH_NNRPAUTH) $D$(PATHETC)/news2mail.cf $D$(PATH_READERSCONF) \
 -      $D$(PATH_RADIUS_CONF) $D$(PATH_NNRPYAUTH) $D$(PATH_OVDB_CONF) \
-       $D$(PATH_NNRPYACCESS) $D$(PATH_NNRPYDYNAMIC) \
+       $D$(PATH_NNRPYACCESS) $D$(PATH_NNRPYDYNAMIC) \
 -      $D$(PATH_SASL_CONF) $D$(PATH_SUBSCRIPTIONS) $D$(PATH_NNRPACCESS)
 +      $D$(PATH_NNRPAUTH) $D$(PATH_NNRPYAUTH) $D$(PATH_NNRPACCESS) 
  
  ALL_INSTALLED = $(MOST_INSTALLED) $(REST_INSTALLED)
  
-@@ -145,7 +133,8 @@
-       chown $(NEWSUSER) $@
-       chgrp $(NEWSGROUP) $@
-       chmod $(FILEMODE) $@
--      $(PATHBIN)/makedbz -i -o
-+      # makedbz wants ridiculous amounts of RAM for -s 0
-+      $(PATHBIN)/makedbz -i -o -s 10000
+-SPECIAL               = $D$(PATH_ACTIVE) $D$(PATH_ACTIVE_TIMES) \
+-              $D$(PATH_NEWSGROUPS) $D$(PATH_HISTORY)
++SPECIAL               =
  
- ##  Remove files that are unchanged from the release version.
- clean:
+ ##  Get new versions of everything from samples directory.
+ all:          $(P) $(ALL) config



Home | Main Index | Thread Index | Old Index