pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg pkgtools/pkg: fix installation of conf files



details:   https://anonhg.NetBSD.org/pkgsrc/rev/26a67810ee01
branches:  trunk
changeset: 354406:26a67810ee01
user:      marino <marino%pkgsrc.org@localhost>
date:      Fri Oct 28 19:35:30 2016 +0000

description:
pkgtools/pkg: fix installation of conf files

The CONF_FILES are never installed if their target directories don't
already exist due to other previous installation.  This adds several
@pkgdir entries to ensure the CONF_FILES installation can always succeed.

While here, simplify the post-install target.

diffstat:

 pkgtools/pkg/Makefile |  27 ++++++++-------------------
 pkgtools/pkg/PLIST    |   7 +++++--
 2 files changed, 13 insertions(+), 21 deletions(-)

diffs (62 lines):

diff -r 2686e7c65a2a -r 26a67810ee01 pkgtools/pkg/Makefile
--- a/pkgtools/pkg/Makefile     Fri Oct 28 19:16:39 2016 +0000
+++ b/pkgtools/pkg/Makefile     Fri Oct 28 19:35:30 2016 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.10 2016/10/28 15:35:08 marino Exp $
+# $NetBSD: Makefile,v 1.11 2016/10/28 19:35:30 marino Exp $
 
 DISTNAME=      pkg-1.8.7
-PKGREVISION=   4
+PKGREVISION=   5
 CATEGORIES=    pkgtools
 MASTER_SITES=  http://files.etoilebsd.net/pkg/
 EXTRACT_SUFX=  .tar.xz
@@ -99,24 +99,13 @@
 
 post-install:
        ${RM} ${DESTDIR}${PREFIX}/sbin/pkg2ng
-       ${MV} ${DESTDIR}${PREFIX}/etc/bash_completion.d/_pkg.bash \
-               ${DESTDIR}${EGDIR}/bash_completion.d/_pkg.bash
-       ${RMDIR} ${DESTDIR}${PREFIX}/etc/bash_completion.d
-       ${MV} ${DESTDIR}${PREFIX}/etc/periodic/daily/411.pkg-backup \
-               ${DESTDIR}${EGDIR}/periodic/daily/411.pkg-backup
-       ${MV} ${DESTDIR}${PREFIX}/etc/periodic/daily/490.status-pkg-changes \
-               ${DESTDIR}${EGDIR}/periodic/daily/490.status-pkg-changes
-       ${RMDIR} ${DESTDIR}${PREFIX}/etc/periodic/daily
-       ${MV} ${DESTDIR}${PREFIX}/etc/periodic/security/410.pkg-audit \
-               ${DESTDIR}${EGDIR}/periodic/security/410.pkg-audit
-       ${MV} ${DESTDIR}${PREFIX}/etc/periodic/security/460.pkg-checksum \
-               ${DESTDIR}${EGDIR}/periodic/security/460.pkg-checksum
-       ${RMDIR} ${DESTDIR}${PREFIX}/etc/periodic/security
-       ${MV} ${DESTDIR}${PREFIX}/etc/periodic/weekly/400.status-pkg \
-               ${DESTDIR}${EGDIR}/periodic/weekly/400.status-pkg
-       ${RMDIR} ${DESTDIR}${PREFIX}/etc/periodic/weekly
+       ${RM} -rf ${DESTDIR}${EGDIR}/periodic
+       ${MV} ${DESTDIR}${PREFIX}/etc/bash_completion.d \
+               ${DESTDIR}${EGDIR}/
+       ${MV} ${DESTDIR}${PREFIX}/etc/periodic \
+               ${DESTDIR}${EGDIR}/
        ${MV} ${DESTDIR}${PREFIX}/etc/pkg.conf.sample \
-               ${DESTDIR}${EGDIR}/pkg.conf.sample
+               ${DESTDIR}${EGDIR}/
 
 .include "../../mk/bsd.prefs.mk"
 .if ${OPSYS} != "FreeBSD" && ${OPSYS} != "DragonFly" && ${OPSYS} != "NetBSD"
diff -r 2686e7c65a2a -r 26a67810ee01 pkgtools/pkg/PLIST
--- a/pkgtools/pkg/PLIST        Fri Oct 28 19:16:39 2016 +0000
+++ b/pkgtools/pkg/PLIST        Fri Oct 28 19:35:30 2016 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.5 2016/10/27 00:24:58 khorben Exp $
+@comment $NetBSD: PLIST,v 1.6 2016/10/28 19:35:30 marino Exp $
 include/pkg.h
 lib/libpkg.la
 lib/libpkg_static.la
@@ -52,4 +52,7 @@
 share/examples/pkg/periodic/weekly/400.status-pkg
 share/examples/pkg/pkg.conf.sample
 share/zsh/site-functions/_pkg
-@pkgdir etc/periodic
+@pkgdir etc/bash_completion.d
+@pkgdir etc/periodic/daily
+@pkgdir etc/periodic/security
+@pkgdir etc/periodic/weekly



Home | Main Index | Thread Index | Old Index