From a14d8172614d124122ce06712224fbabc4c00c31 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 13 May 2004 18:48:32 +0000 Subject: 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. --- 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(-) create mode 100644 security/fprot-workstation-bin/patches/patch-aa (limited to 'security') diff --git a/security/fprot-workstation-bin/Makefile b/security/fprot-workstation-bin/Makefile index 7a23d9ee971..63424ee7267 100644 --- a/security/fprot-workstation-bin/Makefile +++ b/security/fprot-workstation-bin/Makefile @@ -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 @@ LICENSE= fprot-workstation-license 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 @@ MASTER_SITES= ftp://ftp.f-prot.com/pub/linux/ 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 @@ do-install: ${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 --git a/security/fprot-workstation-bin/PLIST b/security/fprot-workstation-bin/PLIST index 875d3f73d54..6a8e061a214 100644 --- a/security/fprot-workstation-bin/PLIST +++ b/security/fprot-workstation-bin/PLIST @@ -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 --git a/security/fprot-workstation-bin/distinfo b/security/fprot-workstation-bin/distinfo index 838723f1b88..75fb8f2e154 100644 --- a/security/fprot-workstation-bin/distinfo +++ b/security/fprot-workstation-bin/distinfo @@ -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 --git a/security/fprot-workstation-bin/patches/patch-aa b/security/fprot-workstation-bin/patches/patch-aa new file mode 100644 index 00000000000..de7da81acbe --- /dev/null +++ b/security/fprot-workstation-bin/patches/patch-aa @@ -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; -- cgit v1.2.3