summaryrefslogtreecommitdiff
path: root/sysutils/mc
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2008-02-14 12:26:56 +0000
committerdrochner <drochner@pkgsrc.org>2008-02-14 12:26:56 +0000
commit7bd8a52515e180b2062a7c1ac9a092bdcf83036d (patch)
treed0d0094c2d7e0050c32ba6846ae172ff49f3eaa3 /sysutils/mc
parent214e5b1daddb2ff12369b952ad14e0552464e613 (diff)
downloadpkgsrc-7bd8a52515e180b2062a7c1ac9a092bdcf83036d.tar.gz
put the vfs .ini files into PKG_SYSCONFDIR so that customized files
are not lost on updates, ride on yesterday's PKGREVISION bump
Diffstat (limited to 'sysutils/mc')
-rw-r--r--sysutils/mc/Makefile30
-rw-r--r--sysutils/mc/PLIST.vfs7
-rw-r--r--sysutils/mc/distinfo5
-rw-r--r--sysutils/mc/patches/patch-aa13
-rw-r--r--sysutils/mc/patches/patch-ab13
-rw-r--r--sysutils/mc/patches/patch-ac13
6 files changed, 69 insertions, 12 deletions
diff --git a/sysutils/mc/Makefile b/sysutils/mc/Makefile
index f219ca485c9..9c79e78c834 100644
--- a/sysutils/mc/Makefile
+++ b/sysutils/mc/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.71 2008/02/13 10:20:56 rillig Exp $
+# $NetBSD: Makefile,v 1.72 2008/02/14 12:26:56 drochner Exp $
DISTNAME= mc-4.6.1
PKGREVISION= 4
@@ -23,21 +23,35 @@ USE_PKGLOCALEDIR= YES
PLIST_SRC+= ${PKGDIR}/PLIST.cons.saver
.endif
-# remove dir if no extensions were installed there
-post-install:
- rmdir ${DESTDIR}${PREFIX:Q}/lib/mc 2>/dev/null || ${TRUE}
-
# we need working e2fsprogs and gpm packages first
CONFIGURE_ARGS+= --without-ext2undel
CONFIGURE_ARGS+= --without-gpm-mouse
-
CONFIGURE_ARGS+= UNZIP=${TOOLS_PATH.unzip} ZIP=${TOOLS_PATH.zip}
PLIST_SRC+= ${PKGDIR}/PLIST
-
.include "options.mk"
-
PLIST_SRC+= ${PKGDIR}/PLIST.end
+PKG_SYSCONFSUBDIR= mc
+SUBST_CLASSES+= conf
+SUBST_STAGE.conf= post-patch
+SUBST_FILES.conf= vfs/extfs.c vfs/sfs.c
+SUBST_VARS.conf= PKG_SYSCONFDIR
+
+.if !empty(PKG_OPTIONS:Mvfs)
+EGDIR= ${PREFIX}/share/examples/mc
+CONF_FILES+= ${EGDIR}/extfs.ini ${PKG_SYSCONFDIR}/extfs.ini
+CONF_FILES+= ${EGDIR}/sfs.ini ${PKG_SYSCONFDIR}/sfs.ini
+.endif
+
+post-install:
+# remove dir if no extensions were installed there
+ rmdir ${DESTDIR}${PREFIX:Q}/lib/mc 2>/dev/null || ${TRUE}
+.if !empty(PKG_OPTIONS:Mvfs)
+ ${INSTALL_DATA_DIR} ${EGDIR}
+ ${INSTALL_DATA} ${WRKSRC}/vfs/extfs/extfs.ini ${EGDIR}
+ ${INSTALL_DATA} ${WRKSRC}/vfs/extfs/sfs.ini ${EGDIR}
+.endif
+
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/mc/PLIST.vfs b/sysutils/mc/PLIST.vfs
index d984d8841e5..61182f39204 100644
--- a/sysutils/mc/PLIST.vfs
+++ b/sysutils/mc/PLIST.vfs
@@ -1,4 +1,6 @@
-@comment $NetBSD: PLIST.vfs,v 1.1 2005/01/15 21:15:26 wiz Exp $
+@comment $NetBSD: PLIST.vfs,v 1.2 2008/02/14 12:26:56 drochner Exp $
+share/examples/mc/extfs.ini
+share/examples/mc/sfs.ini
share/mc/extfs/README
share/mc/extfs/a
share/mc/extfs/apt
@@ -8,7 +10,6 @@ share/mc/extfs/deb
share/mc/extfs/deba
share/mc/extfs/debd
share/mc/extfs/dpkg
-share/mc/extfs/extfs.ini
share/mc/extfs/hp48
share/mc/extfs/iso9660
share/mc/extfs/lslR
@@ -16,7 +17,6 @@ share/mc/extfs/mailfs
share/mc/extfs/patchfs
share/mc/extfs/rpm
share/mc/extfs/rpms
-share/mc/extfs/sfs.ini
share/mc/extfs/trpm
share/mc/extfs/uar
share/mc/extfs/uarj
@@ -26,3 +26,4 @@ share/mc/extfs/urar
share/mc/extfs/uzip
share/mc/extfs/uzoo
@dirrm share/mc/extfs
+@dirrm share/examples/mc
diff --git a/sysutils/mc/distinfo b/sysutils/mc/distinfo
index d6ba4c08ad7..d400608a812 100644
--- a/sysutils/mc/distinfo
+++ b/sysutils/mc/distinfo
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.16 2008/02/13 10:20:57 rillig Exp $
+$NetBSD: distinfo,v 1.17 2008/02/14 12:26:56 drochner Exp $
SHA1 (mc-4.6.1.tar.gz) = 92be0802143245e0fb7e3847d70da614cad7d5fb
RMD160 (mc-4.6.1.tar.gz) = d565ee95a8916d73fad5e0defeb9f2f57e50962b
Size (mc-4.6.1.tar.gz) = 3928370 bytes
+SHA1 (patch-aa) = 7168617908acb8aead0109308845513316ff3f18
+SHA1 (patch-ab) = 11677a3029ee2669d8a74a47188cff728052f408
+SHA1 (patch-ac) = 9d35fbfb73a3c5b9bc7dff604599d63069fc62ab
SHA1 (patch-su) = adad37f777fd2db905108fbd8d1b1a139cf1352a
diff --git a/sysutils/mc/patches/patch-aa b/sysutils/mc/patches/patch-aa
new file mode 100644
index 00000000000..8ae6a136eac
--- /dev/null
+++ b/sysutils/mc/patches/patch-aa
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.14 2008/02/14 12:26:56 drochner Exp $
+
+--- vfs/extfs.c.orig 2008-02-14 12:26:28.000000000 +0100
++++ vfs/extfs.c
+@@ -1278,7 +1278,7 @@ static int extfs_init (struct vfs_class
+ char *mc_extfsini;
+ char key[256];
+
+- mc_extfsini = concat_dir_and_file (mc_home, "extfs" PATH_SEP_STR "extfs.ini");
++ mc_extfsini = concat_dir_and_file ("@PKG_SYSCONFDIR@", "extfs.ini");
+ cfg = fopen (mc_extfsini, "r");
+
+ /* We may not use vfs_die() message or message or similar,
diff --git a/sysutils/mc/patches/patch-ab b/sysutils/mc/patches/patch-ab
new file mode 100644
index 00000000000..58c236aa24a
--- /dev/null
+++ b/sysutils/mc/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.13 2008/02/14 12:26:56 drochner Exp $
+
+--- vfs/sfs.c.orig 2008-02-14 12:27:01.000000000 +0100
++++ vfs/sfs.c
+@@ -314,7 +314,7 @@ static int sfs_init (struct vfs_class *m
+ FILE *cfg;
+ char key[256];
+
+- mc_sfsini = concat_dir_and_file (mc_home, "extfs" PATH_SEP_STR "sfs.ini");
++ mc_sfsini = concat_dir_and_file ("@PKG_SYSCONFDIR@", "sfs.ini");
+ cfg = fopen (mc_sfsini, "r");
+
+ if (!cfg){
diff --git a/sysutils/mc/patches/patch-ac b/sysutils/mc/patches/patch-ac
new file mode 100644
index 00000000000..71b38877ad2
--- /dev/null
+++ b/sysutils/mc/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.9 2008/02/14 12:26:56 drochner Exp $
+
+--- vfs/extfs/Makefile.in.orig 2008-02-14 12:56:12.000000000 +0100
++++ vfs/extfs/Makefile.in
+@@ -226,7 +226,7 @@ target_alias = @target_alias@
+ extfsdir = $(pkgdatadir)/extfs
+
+ # Files to install and distribute other than extfs scripts
+-EXTFS_MISC = README extfs.ini sfs.ini
++EXTFS_MISC = README
+
+ # Scripts hat don't need adaptation to the local system
+ EXTFS_CONST = bpp rpm trpm