wok-next view dbus/receipt @ rev 20534

Clean default configure options when site script used.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Mar 30 19:31:50 2018 +0300 (2018-03-30)
parents d43bf7aae921
children 835b3b8ce6ac
line source
1 # SliTaz package receipt v2.
3 PACKAGE="dbus"
4 VERSION="1.10.22"
5 CATEGORY="x-window"
6 SHORT_DESC="D-Bus, a message bus system"
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://www.freedesktop.org/wiki/Software/dbus/"
10 LFS="http://www.linuxfromscratch.org/blfs/view/stable/general/dbus.html"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="https://dbus.freedesktop.org/releases/dbus/$TARBALL"
15 BUILD_DEPENDS="expat-dev xorg-libX11-dev glib-dev xorg-libICE-dev \
16 xorg-libSM-dev libxslt xmlto libxml2-tools" # docbook-xsl
17 SPLIT="dbus-helper dbus-introspect dbus dbus-dev"
19 compile_rules() {
20 # temporarily: --disable-xml-docs
21 ./configure \
22 --disable-doxygen-docs \
23 --disable-xml-docs \
24 --disable-static \
25 --with-console-auth-dir=/run/console/ \
26 --with-system-pid-file=/run/dbus/pid \
27 --with-system-socket=/run/dbus/system_bus_socket \
28 --disable-systemd \
29 --without-systemdsystemunitdir \
30 $CONFIGURE_ARGS &&
31 make &&
32 make -j1 install || return 1
34 # Init script
35 cp -a $stuff/etc $install
36 chown -R root.root $install/etc
38 # docbook stuff
39 mkdir -p $install/usr/share/xml/docbook/stylesheet/dbus
40 cp doc/introspect.* $install/usr/share/xml/docbook/stylesheet/dbus
41 }
43 genpkg_rules() {
44 case $PACKAGE in
45 dbus-helper)
46 copy dbus-daemon-launch-helper
47 CAT="x-window|dbus-daemon-launch-helper"
48 DEPENDS="dbus expat"
49 ;;
50 dbus-introspect)
51 copy introspect.*
52 CAT="development|introspect DTD & XSL"
53 DEPENDS="libxml2-tools"
54 ;;
55 dbus)
56 copy @std @rm
57 DEPENDS="expat xorg-libX11 slitaz-base-files"
58 CONFIG_FILES="/etc/dbus-1/session.conf /etc/dbus-1/system.conf /etc/dbus-1/system.d/"
59 ;;
60 *-dev) copy @dev;;
61 esac
62 }
64 pre_install_dbus() {
65 # Go for echoing on configuration files if any messagebus user
66 # was found.
67 if ! grep -qs 'messagebus' "$1/etc/passwd"; then
68 chroot "$1/" addgroup -g25 -S messagebus
69 chroot "$1/" adduser -h/var/run/dbus -S -D -u25 -G messagebus \
70 -g"D-Bus Message Daemon User" messagebus
71 fi
72 if ! grep -qs ^DBUS_OPTIONS "$1/etc/daemons.conf"; then
73 action 'Configuring %s/etc/daemons.conf...' "$1"
74 cat >> "$1/etc/daemons.conf" <<EOT
75 # DBUS daemon options.
76 DBUS_OPTIONS="--system"
78 EOT
79 status
80 fi
81 mkdir -p "$1/var/run" "$1/var/lib/dbus"
82 }
84 #post_install_dbus() {
85 # # Mount /dev to fix an error:
86 # # Failed to generate UUID: Could not open /dev/urandom: Permission denied
87 # [ -z "$1" ] || mount -o bind /dev "$1/dev"
88 # chroot "$1/" dbus-uuidgen --ensure
89 # [ -z "$1" ] || umount "$1/dev"
90 #}
92 pre_remove_dbus() {
93 if [ -z "$1" ]; then
94 /etc/init.d/dbus stop
95 fi 2>/dev/null
96 chroot "$1/" deluser messagebus
97 chroot "$1/" delgroup messagebus
98 }
100 post_install_dbus_helper() {
101 local i="$1/usr/libexec/dbus-daemon-launch-helper"
102 chown root:messagebus $i
103 chmod 4750 $i
104 }
106 post_install_dbus_introspect() {
107 U="http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"
108 F="file:///usr/share/xml/docbook/stylesheet/dbus/introspect.dtd"
110 # Create a /etc/xml/catalog file
111 mkdir -p "$1/etc/xml"
112 [ ! -f "$1/etc/xml/catalog" ] &&
113 chroot "$1/" xmlcatalog --noout --create /etc/xml/catalog
115 chroot "$1/" xmlcatalog --noout --add "rewriteSystem" "$U" "$F" /etc/xml/catalog
116 chroot "$1/" xmlcatalog --noout --add "rewriteURI" "$U" "$F" /etc/xml/catalog
117 }