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
This commit is contained in:
John Marino 2013-07-21 17:16:14 +00:00
parent 4c4fe81147
commit d840fbb138
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=323404
3 changed files with 27 additions and 24 deletions

View file

@ -1,28 +1,42 @@
# New ports collection makefile for: pg_reorg # Created by: Alexander Pyhalov <alp@sfedu.ru>
# Date created: January 15, 2011
# Whom: alp@sfedu.ru
# $FreeBSD$ # $FreeBSD$
PORTNAME= pg_reorg PORTNAME= pg_reorg
PORTVERSION= 1.1.7 PORTVERSION= 1.1.8
CATEGORIES= databases CATEGORIES= databases
MASTER_SITES= http://pgfoundry.org/frs/download.php/3104/ MASTER_SITES= http://pgfoundry.org/frs/download.php/3395/
MAINTAINER= alp@sfedu.ru MAINTAINER= alp@sfedu.ru
COMMENT= PostgreSQL utility to reorganize tables COMMENT= PostgreSQL utility to reorganize tables
LICENSE= BSD LICENSE= BSD
MAKE_ENV= USE_PGXS=0 DESTINY= ${WRKDIR}/destino
USE_GMAKE= yes MAKE_ENV= USE_PGXS=0 \
DESTDIR=${DESTINY}
USES= gmake
USE_PGSQL= yes USE_PGSQL= yes
WRKSRC= ${WRKDIR}/${PORTNAME} OPTIONS_DEFINE= DOCS
.include <bsd.port.options.mk>
post-install: post-install:
.if !defined(NOPORTDOCS) .if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR} @${MKDIR} ${DESTINY}${DOCSDIR}
@(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \* ${DOCSDIR}/) @(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \* ${DESTINY}${DOCSDIR}/)
.endif .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> .include <bsd.port.mk>

View file

@ -1,2 +1,2 @@
SHA256 (pg_reorg-1.1.7.tar.gz) = 5ca0b75ee3136e85768621e2e9fd1e0969588bffe7ddbeba69b292226bd2cf21 SHA256 (pg_reorg-1.1.8.tar.gz) = 7abf7e7be4c6519caaced4bf44a43321b620e6128fa1be63f58a534894f54c4d
SIZE (pg_reorg-1.1.7.tar.gz) = 56686 SIZE (pg_reorg-1.1.8.tar.gz) = 59185

View file

@ -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