pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/security/fprot-workstation-bin General package cleanup...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2500d8281202
branches:  trunk
changeset: 475300:2500d8281202
user:      ben <ben%pkgsrc.org@localhost>
date:      Thu May 13 18:48:32 2004 +0000

description:
General package cleanup.  Points of interest:
* change ${PREFIX}/lib to ${PREFIX}/libexec (like uvscan)
* change ${PREFIX}/share/doc/html to ${PREFIX}/share/doc
* change ${SED} to SUBST framework
* add DIST_SUBDIR because distfile changed without name change
* add SUPPORT_FILES from PKGINSTALL framework
* add patch-aa to deal with NetBSD mkdir() behavior, specifically the new
        directory argument may not have a trailing backslash.

diffstat:

 security/fprot-workstation-bin/Makefile         |  51 ++++++++++++--------
 security/fprot-workstation-bin/PLIST            |  61 ++++++++++++------------
 security/fprot-workstation-bin/distinfo         |  11 ++--
 security/fprot-workstation-bin/patches/patch-aa |  19 +++++++
 4 files changed, 85 insertions(+), 57 deletions(-)

diffs (192 lines):

diff -r 7145efb0c74c -r 2500d8281202 security/fprot-workstation-bin/Makefile
--- a/security/fprot-workstation-bin/Makefile   Thu May 13 18:32:34 2004 +0000
+++ b/security/fprot-workstation-bin/Makefile   Thu May 13 18:48:32 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2004/05/11 04:03:26 simonb Exp $
+# $NetBSD: Makefile,v 1.11 2004/05/13 18:48:32 ben Exp $
 #
 
 DISTNAME=              #defined
@@ -25,6 +25,19 @@
 WRKSRC=                        ${WRKDIR}/f-prot
 NO_BUILD=              yes
 USE_BUILDLINK3=                yes
+USE_PKGINSTALL=                yes
+
+DATDIR=                        ${PREFIX}/share/fprot-workstation-bin
+DOCDIR=                        ${PREFIX}/share/doc/fprot-workstation-bin
+FPDIR=                 ${PREFIX}/libexec/fprot-workstation-bin
+
+FILES_SUBST+=          FPDIR=${FPDIR:Q}
+FILES_SUBST+=          DATDIR=${DATDIR:Q}
+
+SUPPORT_FILES=          ${DATDIR}/MACRO.DEF ${FPDIR}/MACRO.DEF
+SUPPORT_FILES+=         ${DATDIR}/SIGN.DEF ${FPDIR}/SIGN.DEF
+SUPPORT_FILES+=         ${DATDIR}/SIGN2.DEF ${FPDIR}/SIGN2.DEF
+OWN_DIRS=               ${FPDIR}
 
 .include "../../mk/bsd.prefs.mk"
 
@@ -38,16 +51,15 @@
 DISTNAME=              fp-linux-ws-${PKGVERSION}
 .endif
 
-post-patch:
-       cd ${WRKSRC}/tools && ${MV} check-updates.pl check-updates.pl.bak
-       ${SED} -e "s,/usr/local/f-prot,${PREFIX}/lib/fprot-workstation-bin,g" \
-               -e "s,/usr/bin/perl,${PREFIX}/bin/perl,g"\
-               <${WRKSRC}/tools/check-updates.pl.bak \
-               >${WRKSRC}/tools/check-updates.pl
-       ${MV} ${WRKSRC}/f-prot.sh ${WRKSRC}/f-prot.sh.bak
-       ${SED} -e "s,/usr/local/f-prot,${PREFIX}/lib/fprot-workstation-bin," \
-               <${WRKSRC}/f-prot.sh.bak \
-               >${WRKSRC}/f-prot.sh
+DIST_SUBDIR=           ${DISTNAME}
+
+SUBST_CLASSES+=                paths
+SUBST_MESSAGE.paths=   "Configuring default paths."
+SUBST_STAGE.paths=     post-patch
+SUBST_FILES.paths+=    ${WRKSRC}/tools/check-updates.pl \
+                       ${WRKSRC}/f-prot.sh
+SUBST_SED.paths=       -e "s,/usr/local/f-prot,${FPDIR},g" \
+                       -e "s,/usr/bin/perl,${PREFIX}/bin/perl,g"
 
 .if ${OPSYS} == "NetBSD"
 pre-install:
@@ -59,17 +71,14 @@
        ${INSTALL_SCRIPT} ${WRKSRC}/tools/check-updates.pl ${PREFIX}/sbin
        ${INSTALL_MAN} ${WRKSRC}/man_pages/check-updates.pl.8 ${PREFIX}/man/man8
        ${INSTALL_MAN} ${WRKSRC}/man_pages/f-prot.1 ${PREFIX}/man/man1
-       ${INSTALL_DATA_DIR} ${PREFIX}/lib/fprot-workstation-bin
-       ${INSTALL_DATA} ${WRKSRC}/*.DEF ${PREFIX}/lib/fprot-workstation-bin
-       ${INSTALL_DATA} ${WRKSRC}/ENGLISH.TX0 \
-               ${PREFIX}/lib/fprot-workstation-bin
-       ${INSTALL_PROGRAM} ${WRKSRC}/f-prot ${PREFIX}/lib/fprot-workstation-bin
-       ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/fprot-workstation-bin
+       ${INSTALL_DATA_DIR} ${DATDIR}
+       ${INSTALL_DATA} ${WRKSRC}/*.DEF ${DATDIR}
+       ${INSTALL_DATA_DIR} ${DOCDIR}
        ${INSTALL_DATA} ${WRKSRC}/LICENSE ${WRKSRC}/README ${WRKSRC}/CHANGES \
-               ${PREFIX}/share/doc/fprot-workstation-bin
-       ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/html/fprot-workstation-bin
-       ${INSTALL_DATA} ${WRKSRC}/doc_ws/* \
-               ${PREFIX}/share/doc/html/fprot-workstation-bin
+               ${WRKSRC}/doc_ws/* ${DOCDIR}
+       ${INSTALL_PROGRAM_DIR} ${FPDIR}
+       ${INSTALL_DATA} ${WRKSRC}/ENGLISH.TX0 ${FPDIR}
+       ${INSTALL_PROGRAM} ${WRKSRC}/f-prot ${FPDIR}
 
 .include "../../lang/perl5/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 7145efb0c74c -r 2500d8281202 security/fprot-workstation-bin/PLIST
--- a/security/fprot-workstation-bin/PLIST      Thu May 13 18:32:34 2004 +0000
+++ b/security/fprot-workstation-bin/PLIST      Thu May 13 18:48:32 2004 +0000
@@ -1,39 +1,38 @@
-@comment $NetBSD: PLIST,v 1.4 2004/05/11 04:03:26 simonb Exp $
+@comment $NetBSD: PLIST,v 1.5 2004/05/13 18:48:32 ben Exp $
 bin/f-prot
-lib/fprot-workstation-bin/f-prot
-lib/fprot-workstation-bin/ENGLISH.TX0
+libexec/fprot-workstation-bin/f-prot
+libexec/fprot-workstation-bin/ENGLISH.TX0
 man/man8/check-updates.pl.8
 man/man1/f-prot.1
 sbin/check-updates.pl
 share/doc/fprot-workstation-bin/LICENSE
 share/doc/fprot-workstation-bin/README
 share/doc/fprot-workstation-bin/CHANGES
-share/doc/html/fprot-workstation-bin/add_info.html
-share/doc/html/fprot-workstation-bin/auto_updt.html
-share/doc/html/fprot-workstation-bin/comm_scan.html
-share/doc/html/fprot-workstation-bin/index.html
-share/doc/html/fprot-workstation-bin/inf_eicar.gif
-share/doc/html/fprot-workstation-bin/info_options.html
-share/doc/html/fprot-workstation-bin/inst_pro.html
-share/doc/html/fprot-workstation-bin/loc_files.html
-share/doc/html/fprot-workstation-bin/macro_scanning_options.html
-share/doc/html/fprot-workstation-bin/main_feat.html
-share/doc/html/fprot-workstation-bin/man_updt.html
-share/doc/html/fprot-workstation-bin/per_scan.html
-share/doc/html/fprot-workstation-bin/reporting_options.html
-share/doc/html/fprot-workstation-bin/scanning_options.html
-share/doc/html/fprot-workstation-bin/screenshot.jpg
-share/doc/html/fprot-workstation-bin/sys_req.html
-share/doc/html/fprot-workstation-bin/test_eicar.html
-share/doc/html/fprot-workstation-bin/test_inst.html
-share/doc/html/fprot-workstation-bin/updater.html
-share/doc/html/fprot-workstation-bin/updater_req.html
-share/doc/html/fprot-workstation-bin/updt_macro.gif
-share/doc/html/fprot-workstation-bin/updt_sign.gif
-share/doc/html/fprot-workstation-bin/updt_signature.gif
-@unexec ${RM} %D/lib/fprot-workstation-bin/MACRO.DEF
-@unexec ${RM} %D/lib/fprot-workstation-bin/SIGN.DEF
-@unexec ${RM} %D/lib/fprot-workstation-bin/SIGN2.DEF
-@dirrm lib/fprot-workstation-bin
+share/doc/fprot-workstation-bin/add_info.html
+share/doc/fprot-workstation-bin/auto_updt.html
+share/doc/fprot-workstation-bin/comm_scan.html
+share/doc/fprot-workstation-bin/index.html
+share/doc/fprot-workstation-bin/inf_eicar.gif
+share/doc/fprot-workstation-bin/info_options.html
+share/doc/fprot-workstation-bin/inst_pro.html
+share/doc/fprot-workstation-bin/loc_files.html
+share/doc/fprot-workstation-bin/macro_scanning_options.html
+share/doc/fprot-workstation-bin/main_feat.html
+share/doc/fprot-workstation-bin/man_updt.html
+share/doc/fprot-workstation-bin/per_scan.html
+share/doc/fprot-workstation-bin/reporting_options.html
+share/doc/fprot-workstation-bin/scanning_options.html
+share/doc/fprot-workstation-bin/screenshot.jpg
+share/doc/fprot-workstation-bin/sys_req.html
+share/doc/fprot-workstation-bin/test_eicar.html
+share/doc/fprot-workstation-bin/test_inst.html
+share/doc/fprot-workstation-bin/updater.html
+share/doc/fprot-workstation-bin/updater_req.html
+share/doc/fprot-workstation-bin/updt_macro.gif
+share/doc/fprot-workstation-bin/updt_sign.gif
+share/doc/fprot-workstation-bin/updt_signature.gif
+share/fprot-workstation-bin/MACRO.DEF
+share/fprot-workstation-bin/SIGN.DEF
+share/fprot-workstation-bin/SIGN2.DEF
 @dirrm share/doc/fprot-workstation-bin
-@dirrm share/doc/html/fprot-workstation-bin
+@dirrm share/fprot-workstation-bin
diff -r 7145efb0c74c -r 2500d8281202 security/fprot-workstation-bin/distinfo
--- a/security/fprot-workstation-bin/distinfo   Thu May 13 18:32:34 2004 +0000
+++ b/security/fprot-workstation-bin/distinfo   Thu May 13 18:48:32 2004 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.7 2004/05/11 04:03:26 simonb Exp $
+$NetBSD: distinfo,v 1.8 2004/05/13 18:48:32 ben Exp $
 
-SHA1 (fp-netbsd-ws-4.4.2.tar.gz) = 8f839982ebacbfb007af3b04c9c0d5bd787b3a48
-Size (fp-netbsd-ws-4.4.2.tar.gz) = 2367428 bytes
-SHA1 (fp-linux-ws-4.4.2.tar.gz) = f8bf9b53c4bcc0a3594a854821b15f6d0274acae
-Size (fp-linux-ws-4.4.2.tar.gz) = 2478335 bytes
+SHA1 (fp-netbsd-ws-4.4.2/fp-netbsd-ws-4.4.2.tar.gz) = 6b75c2ae6692cacaa30d6ec08832011fa516cfd0
+Size (fp-netbsd-ws-4.4.2/fp-netbsd-ws-4.4.2.tar.gz) = 2370225 bytes
+SHA1 (fp-linux-ws-4.4.2/fp-linux-ws-4.4.2.tar.gz) = 421bc1732aee0d994c2101767105e9f650e3d81c
+Size (fp-linux-ws-4.4.2/fp-linux-ws-4.4.2.tar.gz) = 2481246 bytes
+SHA1 (patch-aa) = 4786dcb8c1d30a87d80841412fbf5328564a4f3b
diff -r 7145efb0c74c -r 2500d8281202 security/fprot-workstation-bin/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/fprot-workstation-bin/patches/patch-aa   Thu May 13 18:48:32 2004 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-aa,v 1.1 2004/05/13 18:48:32 ben Exp $
+
+--- tools/check-updates.pl.orig        Tue May 11 01:55:38 2004
++++ tools/check-updates.pl
+@@ -258,10 +258,13 @@ sub printHelp
+ # exists, and if it doesn't exist it tries to create it.
+ sub checkTemporaryDirectory
+ {
++      my $fix_temporaryDirectory = $temporaryDirectory;
++      $fix_temporaryDirectory =~ s/\/$//;
++
+       # If your temporary directory does not exist, you must create it.
+       if (! -e $temporaryDirectory)
+       {
+-              mkdir($temporaryDirectory, $creationMask) || 
++              mkdir($fix_temporaryDirectory, $creationMask) || 
+               die "Error: Unable to create directory: $temporaryDirectory\nError: $!\n\n"
+                       . "Exiting...\n";
+               return;



Home | Main Index | Thread Index | Old Index