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