wok-next view dbus/receipt @ rev 20513

A lot of tiny edits; remove wget and pkg-build from $BUILD_DEPENDS and from *-dev packages $DEPENDS.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Mar 21 15:58:17 2018 +0200 (2018-03-21)
parents 0e7893ac206d
children 757d032c55c7
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 @rm
61 DEPENDS="expat xorg-libX11 slitaz-base-files"
62 CONFIG_FILES="/etc/dbus-1/session.conf /etc/dbus-1/system.conf /etc/dbus-1/system.d/"
63 ;;
64 *-dev) copy @dev;;
65 esac
66 }
68 pre_install_dbus() {
69 # Go for echoing on configuration files if any messagebus user
70 # was found.
71 if ! grep -qs 'messagebus' "$1/etc/passwd"; then
72 action 'Adding user: messagebus...'
73 chroot "$1/" addgroup -g25 -S messagebus
74 chroot "$1/" adduser -h/var/run/dbus -S -D -u25 -G messagebus \
75 -g"D-Bus Message Daemon User" messagebus
76 status
77 fi
78 if ! grep -qs ^DBUS_OPTIONS "$1/etc/daemons.conf"; then
79 action 'Configuring %s/etc/daemons.conf...' "$1"
80 cat >> "$1/etc/daemons.conf" <<EOT
81 # DBUS daemon options.
82 DBUS_OPTIONS="--system"
84 EOT
85 status
86 fi
87 mkdir -p "$1/var/run" "$1/var/lib/dbus"
88 }
90 #post_install_dbus() {
91 # # Mount /dev to fix an error:
92 # # Failed to generate UUID: Could not open /dev/urandom: Permission denied
93 # [ -z "$1" ] || mount -o bind /dev "$1/dev"
94 # chroot "$1/" dbus-uuidgen --ensure
95 # [ -z "$1" ] || umount "$1/dev"
96 #}
98 pre_remove_dbus() {
99 if [ -z "$1" ]; then
100 /etc/init.d/dbus stop
101 fi 2>/dev/null
102 chroot "$1/" deluser messagebus
103 chroot "$1/" delgroup messagebus
104 }
106 post_install_dbus_helper() {
107 local i="$1/usr/libexec/dbus-daemon-launch-helper"
108 chown root:messagebus $i
109 chmod 4750 $i
110 }
112 post_install_dbus_introspect() {
113 U="http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"
114 F="file:///usr/share/xml/docbook/stylesheet/dbus/introspect.dtd"
116 # Create a /etc/xml/catalog file
117 mkdir -p "$1/etc/xml"
118 [ ! -f "$1/etc/xml/catalog" ] &&
119 chroot "$1/" xmlcatalog --noout --create /etc/xml/catalog
121 chroot "$1/" xmlcatalog --noout --add "rewriteSystem" "$U" "$F" /etc/xml/catalog
122 chroot "$1/" xmlcatalog --noout --add "rewriteURI" "$U" "$F" /etc/xml/catalog
123 }