aboutsummaryrefslogtreecommitdiff
path: root/databases/postgresql-docs/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'databases/postgresql-docs/Makefile')
-rw-r--r--databases/postgresql-docs/Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/databases/postgresql-docs/Makefile b/databases/postgresql-docs/Makefile
index 3d62ba69f449..46b7189e9316 100644
--- a/databases/postgresql-docs/Makefile
+++ b/databases/postgresql-docs/Makefile
@@ -21,6 +21,8 @@ DEFAULT_PGSQL_VER?=74
LOCALBASE?= /usr/local
SED?= /usr/bin/sed
+CONFLICTS= postgresql-docs
+
# Setting/finding PostgreSQL version we want.
.if exists(${LOCALBASE}/bin/pg_config)
PGSQL_VER!= ${LOCALBASE}/bin/pg_config --version | ${SED} -n 's/PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
@@ -33,17 +35,19 @@ NO_BUILD= YES
SLAVE_ONLY= YES
PATCHDIR= mustnotexist
+PGDOCSDIR?= ${DOCSDIR}/release-${PGSQL_VER}
+
do-install:
- @ $(MKDIR) ${DOCSDIR}/html; \
+ @ $(MKDIR) ${PGDOCSDIR}; \
${GZIP_CMD} -dc ${WRKSRC}/doc/postgres.tar.gz | \
- ( cd ${DOCSDIR}/html && $(TAR) xf - )
+ ( cd ${PGDOCSDIR} && $(TAR) xf - )
post-install:
@ ${TAR} ztf ${WRKSRC}/doc/postgres.tar.gz | ${GREP} -v /$$ | \
- ${SED} "s,^,${DOCSDIR:S,^${PREFIX}/,,}/html/," >> ${TMPPLIST} ;\
+ ${SED} "s,^,${PGDOCSDIR:S,^${PREFIX}/,,}/," >> ${TMPPLIST} ;\
${TAR} ztf ${WRKSRC}/doc/postgres.tar.gz | ${GREP} /$$ | \
${SED} "s,^,@dirrm\ ," >> ${TMPPLIST} ;\
- ${ECHO} @dirrm ${DOCSDIR:S,^${PREFIX}/,,}/html >> ${TMPPLIST} ;\
- ${ECHO} "@unexec rmdir %D/${DOCSDIR:S,^${PREFIX}/,,} 2> /dev/null || true" >> ${TMPPLIST}
+ ${ECHO} @dirrm ${PGDOCSDIR:S,^${PREFIX}/,,} >> ${TMPPLIST} ;\
+ ${ECHO} "@unexec rmdir %%DOCSDIR%% 2> /dev/null || true" >> ${TMPPLIST}
.include "${MASTERDIR}/Makefile"