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