wok-next view dbus/receipt @ rev 20443

The rest of my "home work" for update many packages (up to Xorg, GTK and Openbox) for Next and mainly for Next64. Since this point this repository is open for commits. Many errors are expected due to harfbuzz-freetype dependency loop...
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Feb 24 16:17:33 2018 +0200 (2018-02-24)
parents e756329576c3
children d43bf7aae921
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 --sysconfdir=/etc \
23 --localstatedir=/var \
24 --disable-doxygen-docs \
25 --disable-xml-docs \
26 --disable-static \
27 --docdir=/usr/share/doc/dbus-$VERSION \
28 --with-console-auth-dir=/run/console/ \
29 --with-system-pid-file=/run/dbus/pid \
30 --with-system-socket=/run/dbus/system_bus_socket \
31 --disable-systemd \
32 --without-systemdsystemunitdir \
33 $CONFIGURE_ARGS &&
34 make && make -j1 install || return 1
36 # Init script
37 cp -a $stuff/etc $install
38 chown -R root.root $install/etc
40 # docbook stuff
41 mkdir -p $install/usr/share/xml/docbook/stylesheet/dbus
42 cp doc/introspect.* $install/usr/share/xml/docbook/stylesheet/dbus
43 }
45 # Rules to gen a SliTaz package suitable for Tazpkg.
46 genpkg_rules()
47 {
48 case $PACKAGE in
49 dbus-helper)
50 copy dbus-daemon-launch-helper
51 CAT="x-window|dbus-daemon-launch-helper"
52 DEPENDS="dbus expat"
53 ;;
54 dbus-introspect)
55 copy introspect.*
56 CAT="development|introspect DTD & XSL"
57 DEPENDS="libxml2-tools"
58 ;;
59 dbus)
60 copy @std
61 remove_already_packed
62 DEPENDS="expat xorg-libX11 slitaz-base-files"
63 CONFIG_FILES="/etc/dbus-1/session.conf /etc/dbus-1/system.conf /etc/dbus-1/system.d/"
64 ;;
65 *-dev) copy @dev;;
66 esac
67 }
69 pre_install_dbus() {
70 # Go for echoing on configuration files if any messagebus user
71 # was found.
72 if ! grep -qs 'messagebus' "$1/etc/passwd"; then
73 action 'Adding user: messagebus...'
74 chroot "$1/" addgroup -g25 -S messagebus
75 chroot "$1/" adduser -h/var/run/dbus -S -D -u25 -G messagebus \
76 -g"D-Bus Message Daemon User" messagebus
77 status
78 fi
79 if ! grep -qs ^DBUS_OPTIONS "$1/etc/daemons.conf"; then
80 action 'Configuring %s/etc/daemons.conf...' "$1"
81 cat >> "$1/etc/daemons.conf" <<EOT
82 # DBUS daemon options.
83 DBUS_OPTIONS="--system"
85 EOT
86 status
87 fi
88 mkdir -p "$1/var/run" "$1/var/lib/dbus"
89 }
91 #post_install_dbus() {
92 # # Mount /dev to fix an error:
93 # # Failed to generate UUID: Could not open /dev/urandom: Permission denied
94 # [ -z "$1" ] || mount -o bind /dev "$1/dev"
95 # chroot "$1/" dbus-uuidgen --ensure
96 # [ -z "$1" ] || umount "$1/dev"
97 #}
99 pre_remove_dbus() {
100 if [ -z "$1" ]; then
101 /etc/init.d/dbus stop
102 fi 2>/dev/null
103 chroot "$1/" deluser messagebus
104 chroot "$1/" delgroup messagebus
105 }
107 post_install_dbus_helper() {
108 local i="$1/usr/libexec/dbus-daemon-launch-helper"
109 chown root:messagebus $i
110 chmod 4750 $i
111 }
113 post_install_dbus_introspect() {
114 U="http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"
115 F="file:///usr/share/xml/docbook/stylesheet/dbus/introspect.dtd"
117 # Create a /etc/xml/catalog file
118 mkdir -p "$1/etc/xml"
119 [ ! -f "$1/etc/xml/catalog" ] &&
120 chroot "$1/" xmlcatalog --noout --create /etc/xml/catalog
122 chroot "$1/" xmlcatalog --noout --add "rewriteSystem" "$U" "$F" /etc/xml/catalog
123 chroot "$1/" xmlcatalog --noout --add "rewriteURI" "$U" "$F" /etc/xml/catalog
124 }