diff options
author | knu <knu@FreeBSD.org> | 2003-01-14 19:10:07 +0800 |
---|---|---|
committer | knu <knu@FreeBSD.org> | 2003-01-14 19:10:07 +0800 |
commit | 19577f03fbda85cc282b28b6a01b1bb7f13dbbd0 (patch) | |
tree | 2b7a63f607261a1f991fb8e672e5c19370572198 /databases | |
parent | f7f92ead600f8d24620cd27e6369cf08c30a780a (diff) | |
download | freebsd-ports-gnome-19577f03fbda85cc282b28b6a01b1bb7f13dbbd0.tar.gz freebsd-ports-gnome-19577f03fbda85cc282b28b6a01b1bb7f13dbbd0.tar.zst freebsd-ports-gnome-19577f03fbda85cc282b28b6a01b1bb7f13dbbd0.zip |
Attempt to preserve lib/charset.alias and share/locale/locale.alias
before installation and restore them after deinstallation.
Submitted by: bento
Diffstat (limited to 'databases')
-rw-r--r-- | databases/namazu2/Makefile | 4 | ||||
-rw-r--r-- | databases/namazu2/pkg-deinstall | 29 | ||||
-rw-r--r-- | databases/namazu2/pkg-install | 30 | ||||
-rw-r--r-- | databases/namazu2/pkg-plist | 4 |
4 files changed, 67 insertions, 0 deletions
diff --git a/databases/namazu2/Makefile b/databases/namazu2/Makefile index 9edd4ab75905..1a53c302899c 100644 --- a/databases/namazu2/Makefile +++ b/databases/namazu2/Makefile @@ -34,7 +34,11 @@ INSTALLS_SHLIB= yes post-configure: ${PERL} -i~ -pe 's,^(LIBS *= *)(.*),$$1 -L${LOCALBASE}/lib -lintl $$2\n,' ${WRKSRC}/nmz/Makefile +pre-install: + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} PRE-INSTALL + post-install: + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} POST-INSTALL .if defined(NOPORTDOCS) ${RM} -rf ${PREFIX}/share/namazu/doc .endif diff --git a/databases/namazu2/pkg-deinstall b/databases/namazu2/pkg-deinstall new file mode 100644 index 000000000000..fae5a47c6f59 --- /dev/null +++ b/databases/namazu2/pkg-deinstall @@ -0,0 +1,29 @@ +#!/bin/sh +# +# $FreeBSD$ + +PATH=/bin:/usr/bin + +files="${PKG_PREFIX}/lib/charset.alias ${PKG_PREFIX}/share/locale/locale.alias" +sfx=.namazu2.backup + +case $2 in + DEINSTALL) + for f in $files; do + [ -f $f$sfx ] || continue + if [ $f -nt $f$sfx ]; then + cp -p $f $f$sfx + fi + done + ;; + + POST-DEINSTALL) + for f in $files; do + if [ -f $f$sfx ]; then + mv -f $f$sfx $f + fi + done + ;; +esac + +exit 0 diff --git a/databases/namazu2/pkg-install b/databases/namazu2/pkg-install new file mode 100644 index 000000000000..fdb791adc59d --- /dev/null +++ b/databases/namazu2/pkg-install @@ -0,0 +1,30 @@ +#!/bin/sh +# +# $FreeBSD$ + +PATH=/bin:/usr/bin + +files="${PKG_PREFIX}/lib/charset.alias ${PKG_PREFIX}/share/locale/locale.alias" +sfx=.namazu2.backup + +case $2 in + PRE-INSTALL) + for f in $files; do + if [ -f $f ]; then + cp $f $f$sfx + fi + done + ;; + + POST-INSTALL) + for f in $files; do + if [ -f $f$sfx ]; then + touch $f$sfx + else + cp $f $fsfx + fi + done + ;; +esac + +exit 0 diff --git a/databases/namazu2/pkg-plist b/databases/namazu2/pkg-plist index 7cc94341539e..62497786f319 100644 --- a/databases/namazu2/pkg-plist +++ b/databases/namazu2/pkg-plist @@ -31,11 +31,15 @@ include/namazu/util.h include/namazu/var.h include/namazu/wakati.h @dirrm include/namazu +@comment see pkg-{install,deinstall} for this file +lib/charset.alias lib/libnmz.a lib/libnmz.la lib/libnmz.so lib/libnmz.so.6 libexec/namazu.cgi +@comment see pkg-{install,deinstall} for this file +share/locale/locale.alias share/locale/es/LC_MESSAGES/namazu.mo share/locale/fr/LC_MESSAGES/namazu.mo share/locale/ja/LC_MESSAGES/namazu.mo |