Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Apr 2002 12:55:59 -0700 (PDT)
From:      papowell@lprng.com
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/36857: ifhp port update - CVS version missing pkg-message file
Message-ID:  <200204071955.g37Jtxm95170@h110.private>

next in thread | raw e-mail | index | archive | help

>Number:         36857
>Category:       ports
>Synopsis:       ifhp port update - CVS version missing pkg-message file
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 07 13:00:03 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Patrick Powell
>Release:        FreeBSD 4.3-RELEASE i386
>Organization:
LPRng.com
>Environment:
System: FreeBSD h110.private 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Sat Apr 21 10:54:49 GMT 2001 jkh@narf.osd.bsdi.com:/usr/src/sys/compile/GENERIC i386


	
>Description:

I don't know what happened, but the last commit did not include
the pkg-message file,  which causes 'make install' to fail.  Also, the
pkg-install is missing.  This effects 'make package';  the
ifhp.conf file is not installed correctly.

>How-To-Repeat:
>Fix:

diff -rNu /usr/ports/print/ifhp/pkg-install ifhp/pkg-install
--- /usr/ports/print/ifhp/pkg-install	Wed Dec 31 16:00:00 1969
+++ ifhp/pkg-install	Sun Apr  7 12:45:50 2002
@@ -0,0 +1,98 @@
+#!/bin/sh
+PREFIX=/usr/local
+SYSCONFDIR=/usr/local/etc
+IFHP_CONF=/usr/local/etc/ifhp.conf
+MANDIR=/usr/local/man
+VERSION=3.5.7
+#
+# -- START --
+# $Id: postinstall.freebsd.sh,v 1.9 2001/12/12 01:54:49 papowell Exp papowell $
+#
+#  If you are building a PORT, see the
+#  DISTRIBUTIONS/Freebsd directory for a complete port
+#  building package.
+# 
+# This is the shell script that does the postinstall
+# dynamic fixup
+#  It needs to be massaged with the information for
+#  various paths.
+# If you are building a package,  then you do NOT want
+#  to have this executed - it will put the sample files
+#  in place.  You need to do this during the postinstall
+#  step in the package installation.
+#
+echo RUNNING postinstall.freebsd.sh MAKEPACKAGE="$MAKEPACKAGE" MAKEINSTALL="$MAKEINSTALL" PREFIX="$PREFIX" cwd `pwd`
+if [ "$VERBOSE_INSTALL" != "" ] ; then set -x; fi
+fix () {
+	v=`echo $1 | sed -e 's/[:;].*//'`;
+    p=`echo $2 | sed -e 's/:.*//'`; d=`dirname $p`;
+	if expr "$p" : "\|" >/dev/null ; then
+		echo "$v is a filter '$p'" 
+		exit 0
+	fi
+    echo "Putting $p in $d, using $v.sample"
+	if [ ! -d "$d" ] ; then
+		echo "Directory $d does not exist!"
+		mkdir -p $d
+	fi
+	if [ -f $v.sample ] ; then
+		if [ $v.sample != $p.sample ] ; then cp $v.sample $p.sample; fi
+	elif [ -f $v ] ; then
+		if [ $v != $p.sample ] ; then cp $v $p.sample; fi
+	else
+		echo "Do not have $v.sample or $v"
+	fi
+	if [ ! -f $p.sample ] ; then
+		echo "Do not have $p.sample"
+	else
+		if [ -f $p ] ; then
+			date=`date | awk '{ print $6, $2, $3, $4;}' | sed -e 's/  */_/g' `
+			echo "Saving $p in $p.$date"
+			mv $p $p.$date
+		fi
+		chmod 644 $p.sample
+		cp $p.sample $p;
+		chmod 644 $p;
+	fi;
+}
+# we use the /usr/local/etc/rc.d method to start
+# lpd
+# we have to take them from one place and put in another
+if [ "X$MAKEPACKAGE" = "XYES" ] ; then
+	hold=${DESTDIR}${PREFIX}/etc
+	echo "Setting up configuration files path for package creation" ${hold}
+    if [ ! -d ${hold} ] ; then mkdir -p ${hold} ; fi;
+    cp ifhp.conf ${hold}/ifhp.conf.sample
+elif [ X$MAKEINSTALL = XYES ] ; then
+	# we have the port pre-install operation
+	if [ "$MANDIR" = "/usr/man" -a ! -d ${DESTDIR}/usr/man ] ; then
+		# we have the dreaded standard installation
+		# try to make a symbolic link to 
+		echo "Creating symbolic link from /usr/man to /usr/share/man"
+		v=`ln -s ${DESTDIR}/usr/share/man ${DESTDIR}/usr/man`;
+	fi
+	hold=${DESTDIR}${PREFIX}/etc
+	echo "Setting up configuration files path for installation" ${hold}
+    if [ ! -d ${hold} ] ; then mkdir -p ${hold} ; fi;
+    cp ifhp.conf ${hold}/ifhp.conf.sample
+    fix ifhp.conf "${DESTDIR}${IFHP_CONF}"
+elif [ "X$2" = "XPOST-INSTALL" ] ; then
+	# when doing an install from a package we get the file from the package
+	hold=etc
+    if [ -f ${hold}/ifhp.conf.sample ] ; then
+        fix ${hold}/ifhp.conf "${IFHP_CONF}"
+    else
+        echo "WARNING: configuration files missing from package! CWD " `pwd`
+		ls
+		exit 1
+    fi
+elif [ "X$2" = "XPRE-INSTALL" ] ; then
+	# we have the port pre-install operation
+	if [ "$MANDIR" = "/usr/man" -a ! -d /usr/man ] ; then
+		# we have the dreaded standard installation
+		# try to make a symbolic link to 
+		echo "Creating symbolic link from /usr/man to /usr/share/man"
+		v=`ln -s /usr/share/man /usr/man`;
+	fi
+fi
+exit 0
diff -rNu /usr/ports/print/ifhp/pkg-message ifhp/pkg-message
--- /usr/ports/print/ifhp/pkg-message	Wed Dec 31 16:00:00 1969
+++ ifhp/pkg-message	Sun Apr  7 12:45:50 2002
@@ -0,0 +1,14 @@
+The ifhp configuration file is ifhp.conf
+
+For further information, have a look at:
+  DOCSDIR
+also:
+  WWW: http://www.lprng.com/
+
+Commercial support is available from Astart Technologies:
+
+Patrick Powell                 Astart Technologies,
+papowell@astart.com            9475 Chesapeake Drive, Suite D,
+Network and System             San Diego, CA 92123
+  Consulting                   858-874-6543 FAX 858-279-8424 
+URL:  http://www.astart.com
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204071955.g37Jtxm95170>