wok-next view dbus/receipt @ rev 20024

Up tesseract-ocr (3.05.01)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Oct 22 12:39:31 2017 +0200 (2017-10-22)
parents 6d2b71cbba60
children 0e7893ac206d
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"
11 HOST_ARCH="i486 arm"
13 TARBALL="$PACKAGE-$VERSION.tar.gz"
14 WGET_URL="https://dbus.freedesktop.org/releases/dbus/$TARBALL"
16 BUILD_DEPENDS="expat-dev xorg-libX11-dev glib-dev xorg-libICE-dev \
17 xorg-libSM-dev libxslt xmlto libxml2-tools docbook-xsl"
18 SPLIT="dbus-helper dbus-introspect dbus dbus-dev"
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 ./configure \
24 --sysconfdir=/etc \
25 --localstatedir=/var \
26 --disable-doxygen-docs \
27 --disable-static \
28 --docdir=/usr/share/doc/dbus-$VERSION \
29 --with-console-auth-dir=/run/console/ \
30 --with-system-pid-file=/run/dbus/pid \
31 --with-system-socket=/run/dbus/system_bus_socket \
32 --disable-systemd \
33 --without-systemdsystemunitdir \
34 $CONFIGURE_ARGS &&
35 make && make -j1 install || return 1
37 # Init script
38 cp -a $stuff/etc $install
39 chown -R root.root $install/etc
41 # docbook stuff
42 mkdir -p $install/usr/share/xml/docbook/stylesheet/dbus
43 cp doc/introspect.* $install/usr/share/xml/docbook/stylesheet/dbus
44 }
46 # Rules to gen a SliTaz package suitable for Tazpkg.
47 genpkg_rules()
48 {
49 case $PACKAGE in
50 dbus-helper)
51 copy dbus-daemon-launch-helper
52 CAT="x-window|dbus-daemon-launch-helper"
53 DEPENDS="dbus expat"
54 ;;
55 dbus-introspect)
56 copy introspect.*
57 CAT="development|introspect DTD & XSL"
58 DEPENDS="libxml2-tools"
59 ;;
60 dbus)
61 copy @std
62 remove_already_packed
63 DEPENDS="expat xorg-libX11 slitaz-base-files"
64 CONFIG_FILES="/etc/dbus-1/session.conf /etc/dbus-1/system.conf /etc/dbus-1/system.d/"
65 ;;
66 *-dev) copy @dev;;
67 esac
68 }
70 pre_install_dbus() {
71 # Go for echoing on configuration files if any messagebus user
72 # was found.
73 if ! grep -qs 'messagebus' "$1/etc/passwd"; then
74 action 'Adding user: messagebus...'
75 chroot "$1/" addgroup -g25 -S messagebus
76 chroot "$1/" adduser -h/var/run/dbus -S -D -u25 -G messagebus \
77 -g"D-Bus Message Daemon User" messagebus
78 status
79 fi
80 if ! grep -qs ^DBUS_OPTIONS "$1/etc/daemons.conf"; then
81 action 'Configuring %s/etc/daemons.conf...' "$1"
82 cat >> "$1/etc/daemons.conf" <<EOT
83 # DBUS daemon options.
84 DBUS_OPTIONS="--system"
86 EOT
87 status
88 fi
89 mkdir -p "$1/var/run" "$1/var/lib/dbus"
90 }
92 #post_install_dbus() {
93 # # Mount /dev to fix an error:
94 # # Failed to generate UUID: Could not open /dev/urandom: Permission denied
95 # [ -z "$1" ] || mount -o bind /dev "$1/dev"
96 # chroot "$1/" dbus-uuidgen --ensure
97 # [ -z "$1" ] || umount "$1/dev"
98 #}
100 pre_remove_dbus() {
101 if [ -z "$1" ]; then
102 /etc/init.d/dbus stop
103 fi 2>/dev/null
104 chroot "$1/" deluser messagebus
105 chroot "$1/" delgroup messagebus
106 }
108 post_install_dbus_helper() {
109 local i="$1/usr/libexec/dbus-daemon-launch-helper"
110 chown root:messagebus $i
111 chmod 4750 $i
112 }
114 post_install_dbus_introspect() {
115 U="http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"
116 F="file:///usr/share/xml/docbook/stylesheet/dbus/introspect.dtd"
118 # Create a /etc/xml/catalog file
119 mkdir -p "$1/etc/xml"
120 [ ! -f "$1/etc/xml/catalog" ] &&
121 chroot "$1/" xmlcatalog --noout --create /etc/xml/catalog
123 chroot "$1/" xmlcatalog --noout --add "rewriteSystem" "$U" "$F" /etc/xml/catalog
124 chroot "$1/" xmlcatalog --noout --add "rewriteURI" "$U" "$F" /etc/xml/catalog
125 }