Date: Sun, 03 Oct 2004 00:52:20 +1000 From: Sam Lawrance <boris@brooknet.com.au> To: Thierry Thomas <thierry@FreeBSD.org> Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: ports/68331: [NEW PORT] graphics/jumpgis-postgis: JUMP support for reading and writing a PostGIS database Message-ID: <1096728739.718.24.camel@dirk.no.domain> In-Reply-To: <200408162114.i7GLExVK049375@freefall.freebsd.org> References: <200408162114.i7GLExVK049375@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2004-08-17 at 07:14, Thierry Thomas wrote: > Then, graphics/jumpgis won't deinstall cleanly: you should > write a pkg-deinstall script to put ${PREFIX}/bin/jumpgis > back to its initial state after you have deinstalled > jumpgis-postgis. The following patch (against all prior stuff in this PR) does the trick. pkg-install edits the classpath by adding a line in the jumpgis startup script; pkg-deinstall removes that line when this port (jumpgis-postgis) is deinstalled. --- Makefile.orig Sat Oct 2 17:26:11 2004 +++ Makefile Sun Oct 3 00:19:07 2004 @@ -31,9 +31,12 @@ do-install: @${ECHO_MSG} "---> Installing JAR files" + ${MKDIR} ${TARGET_DIR}/lib/ext + ${CHMOD} 0755 ${TARGET_DIR}/lib/ext ${INSTALL_DATA} ${WRKSRC}/lib/ext/postgisdriver-1.1.0.jar ${TARGET_DIR}/lib/ext/ ${INSTALL_DATA} ${WRKSRC}/lib/ext/pg74jdbc3.jar ${TARGET_DIR}/lib/ - @${ECHO_MSG} "---> Fixing CLASSPATH in ${PREFIX}/bin/jumpgis" - [ -e ${PREFIX}/bin/jumpgis ] && ${GREP} 'CLASSPATH=.*pg74jdbc3.jar' ${PREFIX}/bin/jumpgis || ( ${REINPLACE_CMD} 's/CLASSPATH=.*/&:$$LIB\/pg74jdbc3.jar/g' ${PREFIX}/bin/jumpgis && ${RM} ${PREFIX}/bin/jumpgis.bak ) +post-install: + @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + .include <bsd.port.mk> --- /dev/null Sun Oct 3 00:44:00 2004 +++ pkg-install Sun Oct 3 00:12:23 2004 @@ -0,0 +1,11 @@ +#!/bin/sh +# $FreeBSD$ + +if [ x$2 != xPOST-INSTALL ]; then + exit +fi + +echo Fixing CLASSPATH in ${PKG_PREFIX}/bin/jumpgis + +sed -i '.bak' 's,CLASSPATH=.*,&\ +CLASSPATH=$CLASSPATH:$LIB/pg74jdbc3.jar,g' ${PKG_PREFIX}/bin/jumpgis && rm ${PKG_PREFIX}/bin/jumpgis.bak --- /dev/null Sun Oct 3 00:44:00 2004 +++ pkg-deinstall Sun Oct 3 00:21:24 2004 @@ -0,0 +1,12 @@ +#!/bin/sh +# $FreeBSD$ + +if [ x$2 != xDEINSTALL ]; then + exit +fi + +echo Restoring CLASSPATH in ${PKG_PREFIX}/bin/jumpgis + +grep -v '^CLASSPATH=$CLASSPATH:$LIB/pg74jdbc3.jar$' ${PKG_PREFIX}/bin/jumpgis > ${PKG_PREFIX}/bin/jumpgis.new +cat ${PKG_PREFIX}/bin/jumpgis.new > ${PKG_PREFIX}/bin/jumpgis +rm ${PKG_PREFIX}/bin/jumpgis.new
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1096728739.718.24.camel>