summaryrefslogtreecommitdiff
path: root/misc/vfu
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-06-20 05:27:32 +0000
committerjlam <jlam@pkgsrc.org>2001-06-20 05:27:32 +0000
commit6dcb41e0dc96583058aed1725985d7d0cb73beb8 (patch)
treeb6687f8671a2d3911714bf7f0ea980fa8df5227e /misc/vfu
parent9619854dc493ee8d2858a2cfc998d6a00b941710 (diff)
downloadpkgsrc-6dcb41e0dc96583058aed1725985d7d0cb73beb8.tar.gz
Convert to use buildlink.mk files for ncurses dependency and mark as
USE_BUILDLINK_ONLY. Add patches to remove explicit passing of -I/usr/include/ncurses to the compiler, and move the example configuration file to ${PREFIX}/share/examples/vfu. Add DEINSTALL/INSTALL scripts to handle copying the sample config file to the config directory at install time and removing it at deinstall time.
Diffstat (limited to 'misc/vfu')
-rw-r--r--misc/vfu/Makefile62
-rw-r--r--misc/vfu/distinfo6
-rw-r--r--misc/vfu/patches/patch-aa20
-rw-r--r--misc/vfu/patches/patch-ab15
-rw-r--r--misc/vfu/patches/patch-ac15
-rw-r--r--misc/vfu/pkg/DEINSTALL65
-rw-r--r--misc/vfu/pkg/INSTALL56
-rw-r--r--misc/vfu/pkg/PLIST6
8 files changed, 208 insertions, 37 deletions
diff --git a/misc/vfu/Makefile b/misc/vfu/Makefile
index 0d8b9983f70..a32f1d7dfde 100644
--- a/misc/vfu/Makefile
+++ b/misc/vfu/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2001/05/09 15:08:00 agc Exp $
+# $NetBSD: Makefile,v 1.21 2001/06/20 05:27:32 jlam Exp $
#
DISTNAME= vfu-3.01
@@ -11,36 +11,44 @@ MAINTAINER= hubertf@netbsd.org
HOMEPAGE= http://www.biscom.net/~cade/away/vfu/
COMMENT= Small, handy, easy-to-use file manager
-USE_CURSES= # defined
-REPLACE_NCURSES= ${WRKSRC}/vfu/makefile ${WRKSRC}/vslib/unicon.h \
- ${WRKSRC}/vslib/makefile
-USE_PERL5= # defined
+USE_BUILDLINK_ONLY= # defined
+USE_PERL5= # defined
+
+DOCDIR= ${PREFIX}/share/doc/vfu
+EGDIR= ${PREFIX}/share/examples/vfu
+
+DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
+INSTALL_FILE= ${WRKDIR}/INSTALL
+
+FILES_SUBST= CAT=${CAT:Q}
+FILES_SUBST+= CHMOD=${CHMOD:Q}
+FILES_SUBST+= CP=${CP:Q}
+FILES_SUBST+= RM=${RM:Q}
+FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
do-build:
- cd ${WRKSRC} ; \
- ${SETENV} ${MAKE_ENV} ${SH} build.netbsd
+ cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${SH} build.netbsd
+
+pre-install:
+ ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
+ ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
do-install:
- cd ${WRKSRC} ; \
- ${INSTALL_PROGRAM} vfu/vfu ftparc/ftparc ${PREFIX}/bin
- for i in rx_auto rx_deb rx_ftp rx_tar rx_zip ; do \
- ${ECHO} $$i ; \
- ${SED} 's,/usr/bin/perl,${PERL5},' \
- <${WRKSRC}/rx/$$i >${WRKSRC}/rx/$$i.new ; \
- ${INSTALL_SCRIPT} ${WRKSRC}/rx/$$i.new ${PREFIX}/bin/$$i ; \
+ cd ${WRKSRC}; ${INSTALL_PROGRAM} vfu/vfu ftparc/ftparc ${PREFIX}/bin
+ cd ${WRKSRC}; for i in rx_auto rx_deb rx_ftp rx_tar rx_zip; do \
+ ${ECHO} $$i; \
+ ${SED} -e "s|/usr/bin/perl|${PERL5}|g" \
+ rx/$$i > rx/$$i.new; \
+ ${INSTALL_SCRIPT} rx/$$i.new ${PREFIX}/bin/$$i; \
done
- ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/vfu
- ${INSTALL_DATA} \
- ${WRKSRC}/COPYING \
- ${WRKSRC}/INSTALL \
- ${WRKSRC}/vfu/README \
- ${WRKSRC}/VFU.txt \
- ${PREFIX}/share/doc/vfu
- ${INSTALL_DATA} \
- ${WRKSRC}/vfu.conf \
- ${PREFIX}/share/doc/vfu/vfurc.example
- [ -f ${PREFIX}/etc/vfurc ] || \
- ${INSTALL_DATA} \
- ${PREFIX}/share/doc/vfu/vfurc.example ${PREFIX}/etc/vfurc
+ ${INSTALL_DATA_DIR} ${DOCDIR}
+ cd ${WRKSRC}; \
+ ${INSTALL_DATA} COPYING INSTALL vfu/README VFU.txt ${DOCDIR}
+ cd ${WRKSRC}; \
+ ${INSTALL_DATA} ${WRKSRC}/vfu.conf ${EGDIR}/vfurc
+
+post-install:
+ PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
+.include "../../devel/ncurses/buildlink.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/misc/vfu/distinfo b/misc/vfu/distinfo
index b49d6f642fa..85437cfa8ca 100644
--- a/misc/vfu/distinfo
+++ b/misc/vfu/distinfo
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.2 2001/05/09 15:08:00 agc Exp $
+$NetBSD: distinfo,v 1.3 2001/06/20 05:27:32 jlam Exp $
SHA1 (vfu-3.01.src.tar.gz) = d605b22d410fcf5e44cf2179ebe7fe2104535826
Size (vfu-3.01.src.tar.gz) = 264831 bytes
-SHA1 (patch-aa) = efeb077be123e5ded8833d1e64d9f051f84bd794
+SHA1 (patch-aa) = 01170386c285275f7918609dac099eb8e383bbe1
+SHA1 (patch-ab) = 9de01899c0fc6e90826abad196a379f9dfeb7a47
+SHA1 (patch-ac) = d718ada60a94b77391bc3efda12987461243d39d
diff --git a/misc/vfu/patches/patch-aa b/misc/vfu/patches/patch-aa
index adf59635f90..6580af074c9 100644
--- a/misc/vfu/patches/patch-aa
+++ b/misc/vfu/patches/patch-aa
@@ -1,13 +1,13 @@
-$NetBSD: patch-aa,v 1.7 2000/06/15 21:08:56 hubertf Exp $
+$NetBSD: patch-aa,v 1.8 2001/06/20 05:27:33 jlam Exp $
---- build.netbsd.orig Tue May 23 23:57:08 2000
-+++ build.netbsd Thu Jun 15 23:06:18 2000
+--- build.netbsd.orig Tue May 23 17:57:08 2000
++++ build.netbsd
@@ -4,7 +4,7 @@
echo Compiling VSLIB...
cd vslib
-make CCDEF="-I${LOCALBASE}/include" LDDEF="-Wl,-R${PREFIX}/lib -L${PREFIX}/lib"
-+make CCDEF="-I${LOCALBASE}/include" LDDEF="-Wl,-R${LOCALBASE}/lib -L${LOCALBASE}/lib"
++make CCDEF="${CFLAGS}" LDDEF="${LDFLAGS}"
if [ -e libvslib.a ]; then
echo VSLIB compiled ok.
else
@@ -16,7 +16,17 @@ $NetBSD: patch-aa,v 1.7 2000/06/15 21:08:56 hubertf Exp $
echo Compiling VFU...
cd vfu
-make CCDEF="-I${LOCALBASE}/include -DFILENAME_CONF_GLOBAL0=\"${PREFIX}/etc/\" -DFILENAME_CONF_GLOBAL1=\"${PREFIX}/\" " LDDEF="-L${LOCALBASE}/lib"
-+make CCDEF="-I${LOCALBASE}/include -DFILENAME_CONF_GLOBAL0=\\\"${PREFIX}/etc/\\\" -DFILENAME_CONF_GLOBAL1=\\\"${PREFIX}/\\\" " LDDEF="-Wl,-R${LOCALBASE}/lib -L${LOCALBASE}/lib"
++make CCDEF="${CFLAGS} -DFILENAME_CONF_GLOBAL0=\\\"${PREFIX}/etc/\\\" -DFILENAME_CONF_GLOBAL1=\\\"${PREFIX}/\\\" " LDDEF="${LDFLAGS}"
if [ -e vfu ]; then
echo VFU compiled ok.
else
+@@ -26,8 +26,8 @@
+
+ echo Compiling ftparc...
+ cd ftparc
+-make CCDEF="-I${LOCALBASE}/include -D__unix__" LDDEF="-Wl,-R${PREFIX}/lib -L${PREFIX}/lib"
++make CCDEF="${CFLAGS} -D__unix__" LDDEF="${LDFLAGS}"
+ if [ -e ftparc ]; then
+ echo ftparc compiled ok.
+ else
+ echo ftparc compilation failed...
diff --git a/misc/vfu/patches/patch-ab b/misc/vfu/patches/patch-ab
new file mode 100644
index 00000000000..e54cab2fddc
--- /dev/null
+++ b/misc/vfu/patches/patch-ab
@@ -0,0 +1,15 @@
+$NetBSD: patch-ab,v 1.7 2001/06/20 05:27:33 jlam Exp $
+
+--- vfu/makefile.orig Fri May 19 03:58:17 2000
++++ vfu/makefile
+@@ -17,8 +17,8 @@
+ CC_0 = g++
+ LD_0 = g++
+ AR_0 = ar rvs
+-CFLAGS_0 = -I../vslib -I/usr/include/ncurses -O2 $(CCDEF)
+-CCFLAGS_0 = -I../vslib -I/usr/include/ncurses -O2 $(CCDEF)
++CFLAGS_0 = -I../vslib -O2 $(CCDEF)
++CCFLAGS_0 = -I../vslib -O2 $(CCDEF)
+ LDFLAGS_0 = -L../vslib -lvslib -lvscon -lncurses $(LDDEF)
+ ARFLAGS_0 =
+ TARGET_0 = vfu
diff --git a/misc/vfu/patches/patch-ac b/misc/vfu/patches/patch-ac
new file mode 100644
index 00000000000..17304b34e92
--- /dev/null
+++ b/misc/vfu/patches/patch-ac
@@ -0,0 +1,15 @@
+$NetBSD: patch-ac,v 1.6 2001/06/20 05:27:33 jlam Exp $
+
+--- vslib/makefile.orig Sat Apr 15 03:20:10 2000
++++ vslib/makefile
+@@ -96,8 +96,8 @@
+ CC_1 = g++
+ LD_1 = g++
+ AR_1 = ar rvs
+-CFLAGS_1 = -I. -I/usr/include/ncurses -O2 $(CCDEF)
+-CCFLAGS_1 = -I. -I/usr/include/ncurses -O2 $(CCDEF)
++CFLAGS_1 = -I. -O2 $(CCDEF)
++CCFLAGS_1 = -I. -O2 $(CCDEF)
+ LDFLAGS_1 = $(LDDEF)
+ ARFLAGS_1 =
+ TARGET_1 = libvscon.a
diff --git a/misc/vfu/pkg/DEINSTALL b/misc/vfu/pkg/DEINSTALL
new file mode 100644
index 00000000000..7bdba62b8e2
--- /dev/null
+++ b/misc/vfu/pkg/DEINSTALL
@@ -0,0 +1,65 @@
+#!/bin/sh
+#
+# $NetBSD: DEINSTALL,v 1.1 2001/06/20 05:27:33 jlam Exp $
+
+PKGNAME=$1
+STAGE=$2
+
+CAT="@CAT@"
+RM="@RM@"
+
+SAMPLECONFDIR=${PKG_PREFIX}/share/examples/vfu
+CONFDIR=${PKG_PREFIX}/etc
+CONFFILES="vfurc"
+
+case ${STAGE} in
+DEINSTALL)
+ # Remove configuration files if they don't differ from the default
+ # config file.
+ #
+ for file in ${CONFFILES}
+ do
+ FILE=${CONFDIR}/${file}
+ SAMPLEFILE=${SAMPLECONFDIR}/${file}
+ if diff -q ${FILE} ${SAMPLEFILE} >/dev/null
+ then
+ ${RM} -f ${FILE}
+ fi
+ done
+ ;;
+
+POST-DEINSTALL)
+ modified_files=''
+ for file in ${CONFFILES}
+ do
+ FILE=${CONFDIR}/${file}
+ if [ -f ${FILE} ]
+ then
+ modified_files="${modified_files} ${FILE}"
+ fi
+ done
+
+ if [ -n "${modified_files}" ]
+ then
+ ${CAT} << EOF
+===========================================================================
+If you won't be using ${PKGNAME} any longer, you may want to remove the
+following files:
+
+EOF
+ for file in ${modified_files}
+ do
+ echo " ${file}"
+ done
+ ${CAT} << EOF
+===========================================================================
+EOF
+ fi
+ ;;
+
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/misc/vfu/pkg/INSTALL b/misc/vfu/pkg/INSTALL
new file mode 100644
index 00000000000..4f429ace98a
--- /dev/null
+++ b/misc/vfu/pkg/INSTALL
@@ -0,0 +1,56 @@
+#! /bin/sh
+#
+# $NetBSD: INSTALL,v 1.1 2001/06/20 05:27:33 jlam Exp $
+
+PKGNAME=$1
+STAGE=$2
+
+CAT="@CAT@"
+CHMOD="@CHMOD@"
+CP="@CP@"
+
+SAMPLECONFDIR=${PKG_PREFIX}/share/examples/vfu
+CONFDIR=${PKG_PREFIX}/etc
+CONFFILES="vfurc"
+
+case ${STAGE} in
+PRE-INSTALL)
+ ;;
+
+POST-INSTALL)
+ echo "Installing configuration files:"
+ for file in ${CONFFILES}
+ do
+ FILE=${CONFDIR}/${file}
+ SAMPLEFILE=${SAMPLECONFDIR}/${file}
+ if [ -f ${FILE} ]
+ then
+ echo " ${FILE} already exists"
+ else
+ echo " ${FILE}"
+ ${CP} ${SAMPLEFILE} ${FILE}
+ ${CHMOD} 644 ${FILE}
+ fi
+ done
+ ${CAT} << EOF
+
+===========================================================================
+Some files you might need to customize include the following:
+
+EOF
+ for file in ${CONFFILES}
+ do
+ FILE=${CONFDIR}/${file}
+ echo " ${FILE}"
+ done
+ ${CAT} << EOF
+===========================================================================
+EOF
+ ;;
+
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/misc/vfu/pkg/PLIST b/misc/vfu/pkg/PLIST
index a09b0a92988..620582b5abe 100644
--- a/misc/vfu/pkg/PLIST
+++ b/misc/vfu/pkg/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.6 2000/06/15 20:56:03 hubertf Exp $
+@comment $NetBSD: PLIST,v 1.7 2001/06/20 05:27:33 jlam Exp $
bin/vfu
bin/ftparc
bin/rx_auto
@@ -6,10 +6,10 @@ bin/rx_deb
bin/rx_ftp
bin/rx_tar
bin/rx_zip
-share/doc/vfu/vfurc.example
-@exec [ -f %D/etc/vfurc ] || /bin/cp -p %D/%F %D/etc/vfurc
share/doc/vfu/COPYING
share/doc/vfu/INSTALL
share/doc/vfu/README
share/doc/vfu/VFU.txt
+share/examples/vfu/vfurc
+@dirrm share/examples/vfu
@dirrm share/doc/vfu