diff options
Diffstat (limited to 'databases/postgresql81-server')
-rw-r--r-- | databases/postgresql81-server/Makefile | 8 | ||||
-rw-r--r-- | databases/postgresql81-server/pkg-plist | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/databases/postgresql81-server/Makefile b/databases/postgresql81-server/Makefile index d4f605de97e4..7b13c4070978 100644 --- a/databases/postgresql81-server/Makefile +++ b/databases/postgresql81-server/Makefile @@ -124,10 +124,12 @@ post-install: # ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} .endif + @ ${SED} 's|%%PREFIX%%|${PREFIX}|g' \ + < ${FILESDIR}/dot.profile.in \ + > ${PREFIX}/pgsql/dot.profile.dist; @ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \ - ${SED} 's|%%PREFIX%%|${PREFIX}|g' \ - < ${FILESDIR}/dot.profile.in \ - > ${PREFIX}/pgsql/.profile; \ + ${CP} ${PREFIX}/pgsql/dot.profile.dist \ + ${PREFIX}/pgsql/.profile; \ fi @ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql @ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib diff --git a/databases/postgresql81-server/pkg-plist b/databases/postgresql81-server/pkg-plist index 107fac4e503b..fd2bd41937f1 100644 --- a/databases/postgresql81-server/pkg-plist +++ b/databases/postgresql81-server/pkg-plist @@ -1,5 +1,7 @@ +@unexec if cmp -s %D/pgsql/.profile %D/pgsql/dot.profile.dist; then rm -f %D/pgsql/.profile; fi etc/rc.d/pgsql.sh -pgsql/.profile +pgsql/dot.profile.dist +@exec [ -f %D/pgsql/.profile ] || (cp %D/pgsql/dot.profile.dist %D/pgsql/.profile && chown pgsql:pgsql %D/pgsql/.profile) pgsql/bin/createdb pgsql/bin/createlang pgsql/bin/createuser |