summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2007-08-14 17:19:20 +0000
committerjoerg <joerg@pkgsrc.org>2007-08-14 17:19:20 +0000
commit860159249ad4bfc68875e0ad0c132dea65b60dc9 (patch)
tree5a61d56283e9a57644b87a9da1e58a852e9ac8a7
parentd337d7e58443df98922c8d96c5645090d695ddab (diff)
downloadpkgsrc-860159249ad4bfc68875e0ad0c132dea65b60dc9.tar.gz
Add DESTDIR support and bail-out in epsg-load when errors happened,
e.g. because psql or mysql failed. Bump revision. Patch from Brook Milligan in private mail.
-rw-r--r--geography/epsg/Makefile15
-rwxr-xr-xgeography/epsg/files/epsg-load4
2 files changed, 12 insertions, 7 deletions
diff --git a/geography/epsg/Makefile b/geography/epsg/Makefile
index a276612b0b1..669cbbfed11 100644
--- a/geography/epsg/Makefile
+++ b/geography/epsg/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.7 2007/07/28 11:06:36 gdt Exp $
+# $NetBSD: Makefile,v 1.8 2007/08/14 17:19:20 joerg Exp $
#
DISTNAME= epsg-v${VERS}sql-PostgreSQL
PKGNAME= epsg-6.13
+PKGREVISION= 1
VERS= 6_13
CATEGORIES= geography databases
MASTER_SITES+= http://www.epsg.org/databases/
@@ -14,6 +15,8 @@ MAINTAINER= brook@nmsu.edu
HOMEPAGE= http://www.epsg.org/
COMMENT= EPSG geodetic parameters database
+PKG_DESTDIR_SUPPORT= user-destdir
+
# Don't make filenames lowercase.
EXTRACT_OPTS_ZIP= -aqo
@@ -27,6 +30,8 @@ BINDIR= ${PREFIX}/bin
DOCDIR= ${PREFIX}/share/doc/epsg
EPSGDIR= ${PREFIX}/share/epsg
+INSTALLATION_DIRS= ${BINDIR} ${DOCDIR} ${EPSGDIR}
+
MESSAGE_SUBST+= BINDIR=${BINDIR:Q}
MESSAGE_SUBST+= EPSGDIR=${EPSGDIR:Q}
@@ -50,13 +55,11 @@ post-extract:
${CP} ${FILESDIR}/epsg-load ${WRKSRC}
do-install:
- ${INSTALL_DATA_DIR} ${DOCDIR}
- ${INSTALL_DATA_DIR} ${EPSGDIR}
- ${INSTALL_DATA} ${WRKSRC}/epsg-v${VERS}_Readme.pdf ${DOCDIR:Q}
- ${INSTALL_SCRIPT} ${WRKSRC}/epsg-load ${BINDIR}
+ ${INSTALL_DATA} ${WRKSRC}/epsg-v${VERS}_Readme.pdf ${DESTDIR}${DOCDIR:Q}
+ ${INSTALL_SCRIPT} ${WRKSRC}/epsg-load ${DESTDIR}${BINDIR}
.for d in pgsql mysql
.for f in ${DATAFILES.${d}}
- ${INSTALL_DATA} ${WRKSRC}/${f} ${EPSGDIR:Q}/${f}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${EPSGDIR:Q}/${f}
.endfor
.endfor
diff --git a/geography/epsg/files/epsg-load b/geography/epsg/files/epsg-load
index f8e937c462b..a85c5a6de81 100755
--- a/geography/epsg/files/epsg-load
+++ b/geography/epsg/files/epsg-load
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: epsg-load,v 1.3 2007/07/28 11:06:36 gdt Exp $
+# $NetBSD: epsg-load,v 1.4 2007/08/14 17:19:20 joerg Exp $
# epsg - import EPSG data into a relational database
@@ -32,6 +32,8 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+set -e # exit on error
+
HOST=
PORT=
DB=epsg