diff options
author | jylefort <jylefort@df743ca5-7f9a-e211-a948-0013205c9059> | 2006-05-18 23:18:22 +0800 |
---|---|---|
committer | jylefort <jylefort@df743ca5-7f9a-e211-a948-0013205c9059> | 2006-05-18 23:18:22 +0800 |
commit | a26881be5a30de8c973503fa11ee8b2e7c173a0d (patch) | |
tree | 93bbc81a2a6a659b2c5085d626eea1be6bf7176e /sysutils | |
parent | 399e1f06cef3941ffc7dc4a6e8763bb328b5ddc1 (diff) | |
download | marcuscom-ports-a26881be5a30de8c973503fa11ee8b2e7c173a0d.tar marcuscom-ports-a26881be5a30de8c973503fa11ee8b2e7c173a0d.tar.gz marcuscom-ports-a26881be5a30de8c973503fa11ee8b2e7c173a0d.tar.bz2 marcuscom-ports-a26881be5a30de8c973503fa11ee8b2e7c173a0d.tar.lz marcuscom-ports-a26881be5a30de8c973503fa11ee8b2e7c173a0d.tar.xz marcuscom-ports-a26881be5a30de8c973503fa11ee8b2e7c173a0d.tar.zst marcuscom-ports-a26881be5a30de8c973503fa11ee8b2e7c173a0d.zip |
Fix packing list and preserve .privilege file changes across updates.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@6296 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/hal/Makefile | 36 | ||||
-rw-r--r-- | sysutils/hal/files/pkg-deinstall.in | 12 | ||||
-rw-r--r-- | sysutils/hal/files/pkg-install.in (renamed from sysutils/hal/pkg-install) | 18 | ||||
-rw-r--r-- | sysutils/hal/pkg-plist | 5 |
4 files changed, 53 insertions, 18 deletions
diff --git a/sysutils/hal/Makefile b/sysutils/hal/Makefile index 579f8820b..6c4dac4ec 100644 --- a/sysutils/hal/Makefile +++ b/sysutils/hal/Makefile @@ -3,11 +3,12 @@ # Whom: Joe Marcus Clarke <marcus@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/sysutils/hal/Makefile,v 1.11 2006/05/14 20:55:51 marcus Exp $ +# $MCom: ports/sysutils/hal/Makefile,v 1.12 2006/05/14 21:29:01 marcus Exp $ # PORTNAME= hal PORTVERSION= ${HALVERSION}.${SNAPVERSION} +PORTREVISION= 1 CATEGORIES= sysutils gnome MASTER_SITES= http://www.marcuscom.com/downloads/ @@ -43,6 +44,23 @@ SNAPVERSION= 20060514 DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${HALVERSION} PLIST_SUB= VERSION=${HALVERSION} +PRIV_FILES= hal-power-hibernate \ + hal-power-poweroff \ + hal-power-reboot \ + hal-power-suspend \ + hal-storage-fixed-mount-change-uid \ + hal-storage-fixed-mount \ + hal-storage-removable-mount-change-uid \ + hal-storage-removable-mount +PRIV_FILES:= ${PRIV_FILES:S|$|.privilege|} + +RC_FILES= hal.conf:${PREFIX}/etc/dbus-1/system.d \ + ${PRIV_FILES:S|$|:${PREFIX}/etc/PolicyKit/privilege.d|} +PLIST_FILES= ${PRIV_FILES:S|^|%%DATADIR%%/dist/|} + +SUB_FILES= pkg-install pkg-deinstall +SUB_LIST= RC_FILES="${RC_FILES}" + DESKTOP_ENTRIES="Device Manager" \ "Examine your devices" \ "${DATADIR}/device-manager/hal-bus-pci.png" \ @@ -60,20 +78,18 @@ post-patch: @${REINPLACE_CMD} -e '/^scriptdir = /s|libdir|libexecdir|' \ ${WRKSRC}/tools/Makefile.in \ ${WRKSRC}/tools/freebsd/Makefile.in + @${REINPLACE_CMD} -e '/^SUBDIRS/ s|txt||' \ + ${WRKSRC}/policy/Makefile.in post-install: -.if !defined(PACKAGE_BUILDING) - @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL -.endif + ${MKDIR} ${DATADIR}/dist + ${INSTALL_DATA} ${WRKSRC}/hal.conf ${WRKSRC}/policy/txt/*.privilege \ + ${DATADIR}/dist + @${SETENV} PKG_PREFIX=${PREFIX} PACKAGE_BUILDING=${PACKAGE_BUILDING} \ + ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .if !defined(NOPORTDOCS) ${INSTALL_DATA} ${WRKSRC}/hald/freebsd/README \ ${DOCSDIR}/README.freebsd .endif - ${INSTALL_DATA} ${WRKSRC}/hal.conf ${DATADIR}/hal.conf.dist - if [ ! -f ${PREFIX}/etc/dbus-1/system.d/hal.conf ]; then \ - ${MKDIR} ${PREFIX}/etc/dbus-1/system.d ; \ - ${INSTALL_DATA} ${WRKSRC}/hal.conf \ - ${PREFIX}/etc/dbus-1/system.d ; \ - fi .include <bsd.port.post.mk> diff --git a/sysutils/hal/files/pkg-deinstall.in b/sysutils/hal/files/pkg-deinstall.in new file mode 100644 index 000000000..96f8e9f91 --- /dev/null +++ b/sysutils/hal/files/pkg-deinstall.in @@ -0,0 +1,12 @@ +#!/bin/sh + +[ "$2" != DEINSTALL ] && exit 0 + +for pair in %%RC_FILES%%; do + file=`echo $pair | cut -f 1 -d :` + destdir=`echo $pair | cut -f 2 -d :` + + if cmp -s %%DATADIR%%/dist/$file $destdir/$file; then + rm -f $destdir/$file + fi +done diff --git a/sysutils/hal/pkg-install b/sysutils/hal/files/pkg-install.in index dfba18feb..d662edb12 100644 --- a/sysutils/hal/pkg-install +++ b/sysutils/hal/files/pkg-install.in @@ -1,7 +1,8 @@ #!/bin/sh -case $2 in -POST-INSTALL) +[ "$2" != POST-INSTALL ] && exit 0 + +if [ -z "${PACKAGE_BUILDING}" ]; then USER=haldaemon GROUP=${USER} UID=560 @@ -33,6 +34,13 @@ POST-INSTALL) fi /usr/bin/install -d -o ${USER} -g ${GROUP} /var/run/hald - exit 0 - ;; -esac +fi + +for pair in %%RC_FILES%%; do + file=`echo $pair | cut -f 1 -d :` + destdir=`echo $pair | cut -f 2 -d :` + + if [ ! -f $destdir/$file ]; then + cp -p %%DATADIR%%/dist/$file $destdir/$file + fi +done diff --git a/sysutils/hal/pkg-plist b/sysutils/hal/pkg-plist index 060ce895a..1b4807efd 100644 --- a/sysutils/hal/pkg-plist +++ b/sysutils/hal/pkg-plist @@ -5,7 +5,6 @@ bin/hal-find-by-property bin/hal-get-property bin/hal-set-property bin/lshal -@unexec if cmp -s %D/%%DATADIR%%/hal.conf.dist %D/etc/dbus-1/system.d/hal.conf; then rm -f %D/etc/dbus-1/system.d/hal.conf; fi include/hal/libhal-storage.h include/hal/libhal.h lib/libhal-storage.a @@ -99,6 +98,7 @@ sbin/hald %%DATADIR%%/device-manager/hal-serial-port.png %%DATADIR%%/device-manager/hal-unknown.png %%DATADIR%%/device-manager/hal-video.png +%%DATADIR%%/dist/hal.conf %%DATADIR%%/fdi/fdi.dtd %%DATADIR%%/fdi/fdi.rng %%DATADIR%%/fdi/information/10freedesktop/10-camera-ptp.fdi @@ -115,8 +115,6 @@ sbin/hald %%DATADIR%%/fdi/policy/10osvendor/15-storage-luks.fdi %%DATADIR%%/fdi/policy/10osvendor/20-storage-methods.fdi %%DATADIR%%/fdi/preprobe/10osvendor/10-ide-drives.fdi -%%DATADIR%%/hal.conf.dist -@exec [ -f %D/etc/dbus-1/system.d/hal.conf ] || (mkdir -p %D/etc/dbus-1/system.d && cp %B/%f %D/etc/dbus-1/system.d/hal.conf) share/locale/cs/LC_MESSAGES/hal.mo share/locale/da/LC_MESSAGES/hal.mo share/locale/de/LC_MESSAGES/hal.mo @@ -174,6 +172,7 @@ share/locale/zh_TW/LC_MESSAGES/hal.mo @dirrm %%DATADIR%%/fdi/information/10freedesktop @dirrm %%DATADIR%%/fdi/information @dirrm %%DATADIR%%/fdi +@dirrm %%DATADIR%%/dist @dirrm %%DATADIR%%/device-manager @dirrm %%DATADIR%% @dirrm %%DOCSDIR%%/conf |