diff options
author | marino <marino@FreeBSD.org> | 2013-07-22 01:16:14 +0800 |
---|---|---|
committer | marino <marino@FreeBSD.org> | 2013-07-22 01:16:14 +0800 |
commit | 080682212d97c40e21d31f0d2facaed12622ca67 (patch) | |
tree | 49db0a083dbee96b969076d03576bda4ed12f9e4 /databases | |
parent | 48efabcb564092a22a7be3fddd896e1c3de928b0 (diff) | |
download | freebsd-ports-gnome-080682212d97c40e21d31f0d2facaed12622ca67.tar.gz freebsd-ports-gnome-080682212d97c40e21d31f0d2facaed12622ca67.tar.zst freebsd-ports-gnome-080682212d97c40e21d31f0d2facaed12622ca67.zip |
databases/pg_reorg: Upgrade to v1.1.8, use DESTDIR
This version upgrade is required for PostgreSQL 9.2 support and was
proposed by the maintainer. Additional changes were added by myself:
1) Header trimmed
2) USE_GMAKE changed to USES+=gmake
3) NOPORTSDOCS changed to options/DOCS
4) Proposed logic for alternative PLIST was replaced with DESTDIR support
The package list changes directory structure depending if postgresql 91
or higher client is used. This could have been handled with PLIST_SUB
(rather than an alternate pkg-plist) but PGSQL_VER variable isn't
evaluated until much later. Using an intermediate DESTDIR scheme not
only makes the DOCS option handling cleaner, it makes the pkg-plist creation
bulletproof. It also gives this port a head start for future "Stage" support.
PR: ports/179954
Submitted by: marino
Approved by: bapt (mentor), maintainer
Diffstat (limited to 'databases')
-rw-r--r-- | databases/pg_reorg/Makefile | 36 | ||||
-rw-r--r-- | databases/pg_reorg/distinfo | 4 | ||||
-rw-r--r-- | databases/pg_reorg/pkg-plist | 11 |
3 files changed, 27 insertions, 24 deletions
diff --git a/databases/pg_reorg/Makefile b/databases/pg_reorg/Makefile index 5e46973cf546..f50f9aa2140b 100644 --- a/databases/pg_reorg/Makefile +++ b/databases/pg_reorg/Makefile @@ -1,28 +1,42 @@ -# New ports collection makefile for: pg_reorg -# Date created: January 15, 2011 -# Whom: alp@sfedu.ru +# Created by: Alexander Pyhalov <alp@sfedu.ru> # $FreeBSD$ PORTNAME= pg_reorg -PORTVERSION= 1.1.7 +PORTVERSION= 1.1.8 CATEGORIES= databases -MASTER_SITES= http://pgfoundry.org/frs/download.php/3104/ +MASTER_SITES= http://pgfoundry.org/frs/download.php/3395/ MAINTAINER= alp@sfedu.ru COMMENT= PostgreSQL utility to reorganize tables LICENSE= BSD -MAKE_ENV= USE_PGXS=0 -USE_GMAKE= yes +DESTINY= ${WRKDIR}/destino +MAKE_ENV= USE_PGXS=0 \ + DESTDIR=${DESTINY} +USES= gmake USE_PGSQL= yes -WRKSRC= ${WRKDIR}/${PORTNAME} +OPTIONS_DEFINE= DOCS + +.include <bsd.port.options.mk> post-install: -.if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} - @(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \* ${DOCSDIR}/) +.if ${PORT_OPTIONS:MDOCS} + @${MKDIR} ${DESTINY}${DOCSDIR} + @(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \* ${DESTINY}${DOCSDIR}/) .endif + ${CP} -pR ${DESTINY}${PREFIX}/ ${PREFIX}/ + @cd ${DESTINY}${PREFIX}; ${FIND} * \( -type f -or -type l \) | \ + ${SORT} > ${WRKDIR}/PLIST.all + @cd ${DESTINY}${PREFIX}; ${FIND} * -type d | ${AWK} '/\//' | ${SORT} -r | \ + ${SED} -e '/lib\/postgresql$$/d' -e '/share\/doc$$/d' \ + -e '/share\/postgresql$$/d' -e '/share\/postgresql\/extension$$/d' \ + -e 's/^/@dirrm /g' >> ${WRKDIR}/PLIST.all + @echo "@unexec rmdir %D/lib/postgresql 2>/dev/null || true" >> ${WRKDIR}/PLIST.all + @echo "@unexec rmdir %D/share/doc 2>/dev/null || true" >> ${WRKDIR}/PLIST.all + @echo "@unexec rmdir %D/share/postgresql/extension 2>/dev/null || true" >> ${WRKDIR}/PLIST.all + @echo "@unexec rmdir %D/share/postgresql 2>/dev/null || true" >> ${WRKDIR}/PLIST.all + @${CAT} ${WRKDIR}/PLIST.all >> ${TMPPLIST} .include <bsd.port.mk> diff --git a/databases/pg_reorg/distinfo b/databases/pg_reorg/distinfo index 361060ebc2bc..82e9d91026b6 100644 --- a/databases/pg_reorg/distinfo +++ b/databases/pg_reorg/distinfo @@ -1,2 +1,2 @@ -SHA256 (pg_reorg-1.1.7.tar.gz) = 5ca0b75ee3136e85768621e2e9fd1e0969588bffe7ddbeba69b292226bd2cf21 -SIZE (pg_reorg-1.1.7.tar.gz) = 56686 +SHA256 (pg_reorg-1.1.8.tar.gz) = 7abf7e7be4c6519caaced4bf44a43321b620e6128fa1be63f58a534894f54c4d +SIZE (pg_reorg-1.1.8.tar.gz) = 59185 diff --git a/databases/pg_reorg/pkg-plist b/databases/pg_reorg/pkg-plist deleted file mode 100644 index 14ca2271f2f9..000000000000 --- a/databases/pg_reorg/pkg-plist +++ /dev/null @@ -1,11 +0,0 @@ -bin/pg_reorg -lib/postgresql/pg_reorg.so -share/postgresql/contrib/pg_reorg.sql -share/postgresql/contrib/uninstall_pg_reorg.sql -%%PORTDOCS%%%%DOCSDIR%%/index-ja.html -%%PORTDOCS%%%%DOCSDIR%%/index.html -%%PORTDOCS%%%%DOCSDIR%%/pg_reorg-ja.html -%%PORTDOCS%%%%DOCSDIR%%/pg_reorg.html -%%PORTDOCS%%%%DOCSDIR%%/style.css -%%PORTDOCS%%@dirrm %%DOCSDIR%% -@dirrmtry share/postgresql/contrib |