wok-next view dbus/receipt @ rev 20883
Check Repology info from h* to l* packages
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Jul 11 02:06:34 2018 +0300 (2018-07-11) |
parents | 757d032c55c7 |
children | ccb66c3dd643 |
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 fix libtool &&
32 make &&
33 make -j1 install || return 1
35 # Init script
36 cp -a $stuff/etc $install
37 chown -R root.root $install/etc
39 # docbook stuff
40 mkdir -p $install/usr/share/xml/docbook/stylesheet/dbus
41 cp doc/introspect.* $install/usr/share/xml/docbook/stylesheet/dbus
42 }
44 genpkg_rules() {
45 case $PACKAGE in
46 dbus-helper)
47 copy dbus-daemon-launch-helper
48 CAT="x-window|dbus-daemon-launch-helper"
49 DEPENDS="dbus expat"
50 ;;
51 dbus-introspect)
52 copy introspect.*
53 CAT="development|introspect DTD & XSL"
54 DEPENDS="libxml2-tools"
55 ;;
56 dbus)
57 copy @std @rm
58 DEPENDS="expat xorg-libX11 slitaz-base-files"
59 CONFIG_FILES="/etc/dbus-1/session.conf /etc/dbus-1/system.conf /etc/dbus-1/system.d/"
60 ;;
61 *-dev) copy @dev;;
62 esac
63 }
65 pre_install_dbus() {
66 # Go for echoing on configuration files if any messagebus user
67 # was found.
68 if ! grep -qs 'messagebus' "$1/etc/passwd"; then
69 chroot "$1/" addgroup -g25 -S messagebus
70 chroot "$1/" adduser -h/var/run/dbus -S -D -u25 -G messagebus \
71 -g"D-Bus Message Daemon User" messagebus
72 fi
73 if ! grep -qs ^DBUS_OPTIONS "$1/etc/daemons.conf"; then
74 action 'Configuring %s/etc/daemons.conf...' "$1"
75 cat >> "$1/etc/daemons.conf" <<EOT
76 # DBUS daemon options.
77 DBUS_OPTIONS="--system"
79 EOT
80 status
81 fi
82 mkdir -p "$1/var/run" "$1/var/lib/dbus"
83 }
85 #post_install_dbus() {
86 # # Mount /dev to fix an error:
87 # # Failed to generate UUID: Could not open /dev/urandom: Permission denied
88 # [ -z "$1" ] || mount -o bind /dev "$1/dev"
89 # chroot "$1/" dbus-uuidgen --ensure
90 # [ -z "$1" ] || umount "$1/dev"
91 #}
93 pre_remove_dbus() {
94 if [ -z "$1" ]; then
95 /etc/init.d/dbus stop
96 fi 2>/dev/null
97 chroot "$1/" deluser messagebus
98 chroot "$1/" delgroup messagebus
99 }
101 post_install_dbus_helper() {
102 local i="$1/usr/libexec/dbus-daemon-launch-helper"
103 chown root:messagebus $i
104 chmod 4750 $i
105 }
107 post_install_dbus_introspect() {
108 U="http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"
109 F="file:///usr/share/xml/docbook/stylesheet/dbus/introspect.dtd"
111 # Create a /etc/xml/catalog file
112 mkdir -p "$1/etc/xml"
113 [ ! -f "$1/etc/xml/catalog" ] &&
114 chroot "$1/" xmlcatalog --noout --create /etc/xml/catalog
116 chroot "$1/" xmlcatalog --noout --add "rewriteSystem" "$U" "$F" /etc/xml/catalog
117 chroot "$1/" xmlcatalog --noout --add "rewriteURI" "$U" "$F" /etc/xml/catalog
118 }