diff options
author | olgeni <olgeni@FreeBSD.org> | 2001-02-21 05:45:15 +0800 |
---|---|---|
committer | olgeni <olgeni@FreeBSD.org> | 2001-02-21 05:45:15 +0800 |
commit | 1d136a482b986afe7d829ed37fd033a91d01f93b (patch) | |
tree | 2990fc631662b1529379d1f7d0471df0a287756d /databases/postgresql81-server/Makefile | |
parent | b373be2697bf81a0f31ba273bcf2eb5495bd3e19 (diff) | |
download | freebsd-ports-gnome-1d136a482b986afe7d829ed37fd033a91d01f93b.tar.gz freebsd-ports-gnome-1d136a482b986afe7d829ed37fd033a91d01f93b.tar.zst freebsd-ports-gnome-1d136a482b986afe7d829ed37fd033a91d01f93b.zip |
Make the port more "package friendly".
Do not call initdb from Makefile's post-install. Users are required to
manually run initdb, maybe after configuring their preferred database
location in pgsql's user .profile. pkg_add used to simply replace some
existing data files.
Add pkg-message to tell the user about initdb.
Remove 2 empty directories from pkg-plist (pgsql/include/port/freebsd,
pgsql/include/port), since they are not included in "make package" anyway
and cause pkg_deinstall to complain about the plist.
Remove all pgsql/data contents from pkg-plist, so "make deinstall" and
pkg_delete won't clobber existing databases. Minor version upgrades can now be
performed by means of pkg_delete and "make install", without using pg_dump.
Chown %D/pgsql/lib to root:wheel to satisfy ldconfig's recent security
requirements.
Change @dirrm of pgsql to "@unexec rmdir": pkg_deinstall won't complain if
data still exists in that directory at deinstall time.
Approved by: maintainer
Diffstat (limited to 'databases/postgresql81-server/Makefile')
-rw-r--r-- | databases/postgresql81-server/Makefile | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/databases/postgresql81-server/Makefile b/databases/postgresql81-server/Makefile index d032a04f7eae..d4f605de97e4 100644 --- a/databases/postgresql81-server/Makefile +++ b/databases/postgresql81-server/Makefile @@ -131,11 +131,7 @@ post-install: fi @ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql @ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib - @ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...' @ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib -# '-' so we don't fail to create packagelist at this stage, -# when we already have everything installed on top of previous version - -@ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' @ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \ > ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh @@ -194,6 +190,9 @@ post-install: @ strip ${PREFIX}/pgsql/bin/${file} .endfor .endif + @ ${RMDIR} ${PREFIX}/pgsql/include/port/freebsd + @ ${RMDIR} ${PREFIX}/pgsql/include/port + @ ${CAT} ${PKGMESSAGE} post-clean: @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc |