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