Magellan Linux

Contents of /branches/R11-stable/core/dbus/dbus-1.6.14-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19410 - (show annotations) (download)
Mon Sep 16 08:55:11 2013 UTC (10 years, 7 months ago) by niro
File size: 2834 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="dbus"
4 PVER="1.6.14"
5 PBUILD="r1"
6
7 PCAT="sys-apps"
8
9 DESCRIPTION="D-BUS is a message bus system, a simple way for applications to talk to one another."
10 HOMEPAGE="http://www.freedesktop.org/Software/dbus"
11
12 DEPEND=">= x11-libs/libX11-1.4
13 >= x11-libs/libXt-1.1
14 >= dev-libs/expat-2
15 >= sys-apps/util-linux-2.20"
16
17 SDEPEND=">= dev-util/pkgconfig-0.25"
18
19 SRCFILE="${PNAME}-${PVER}.tar.gz"
20 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
21
22 sminclude mtools multilib
23
24 SESSION_SCRIPT_REV=2
25
26 SRC_URI=(
27 http://dbus.freedesktop.org/releases/${PNAME}/${SRCFILE}
28 mirror://${PNAME}/${SRCFILE}
29 mirror://${PNAME}/${PNAME}-1.5.8-no-fatal-warnings.patch
30 mirror://${PNAME}/30-dbus-${SESSION_SCRIPT_REV}
31 )
32
33 # use subdir $uri/dbus
34 UP2SUBDIR="${PNAME}"
35 UP2DATE="updatecmd_freedesktop ${PNAME} gz"
36
37 src_prepare()
38 {
39 munpack ${SRCFILE} || die
40
41 # do not abort on fatal warnings by default
42 mpatch ${PNAME}-1.5.8-no-fatal-warnings.patch || die
43
44 # fix missing include
45 all-abis 'sed -i "s/#include <stdio.h>/#include <stdio.h>\n#include <syslog.h>/g" dbus/dbus-sysdeps-util-unix.c' || die
46 }
47
48 src_compile()
49 {
50 # using /lib/systemd/system as systemd units dir even on multilib systems
51 # to have one common rules/script directory!
52 mconfigure \
53 --with-system-pid-file=/run/dbus.pid \
54 --with-system-socket=/run/dbus/system_bus_socket \
55 --with-session-socket-dir=/tmp \
56 --with-test-socket-dir=/tmp \
57 --libexecdir=/usr/$(mlibdir)/dbus-1.0 \
58 --localstatedir=/var \
59 --with-dbus-user=messagebus \
60 --with-xml=expat \
61 --disable-verbose-mode \
62 --disable-checks \
63 --disable-asserts \
64 --enable-inotify \
65 --with-x \
66 --disable-doxygen-docs \
67 --disable-xml-docs \
68 --with-systemdsystemunitdir=/usr/lib/systemd/system \
69 || die
70
71 mmake || die
72 }
73
74 src_install()
75 {
76 # fix ln issue on multilib: force overwrite of all symlinks
77 mmake install DESTDIR=${BINDIR} LN_S="'ln -sf'" || die
78
79 # install session script
80 minstalldir /etc/X11/xinit/xinitrc.d || die
81 minstallexec -s 30-dbus-${SESSION_SCRIPT_REV} /etc/X11/xinit/xinitrc.d || die
82
83 # mark some dirs undeletable
84 mkeepdir /var/lib/dbus || die
85 mkeepdir /run/dbus || die
86 mkeepdir /usr/lib/dbus-1.0/services || die
87 mkeepdir /usr/share/dbus-1/services || die
88 mkeepdir /etc/dbus-1/system.d || die
89 mkeepdir /etc/dbus-1/session.d || die
90
91 minstalldocs AUTHORS ChangeLog COPYING HACKING NEWS README || die
92 }
93
94 preinstall()
95 {
96 # adds plugdev group
97 ${MLIBDIR}/mgroupadd -o "-g 302" plugdev
98
99 # adds messagebus user
100 ${MLIBDIR}/mgroupadd -o "-g 300" messagebus
101 ${MLIBDIR}/museradd -o "-M -u 300 -g messagebus -d /dev/null -s /bin/false" messagebus
102 }
103
104 postinstall()
105 {
106 # only reload dbus-daemon if already running
107 if pidof dbus-daemon > /dev/null
108 then
109 mreloadunit dbus.service dbus-daemon
110 else
111 mstartunit dbus.service dbus-daemon
112 fi
113 }
114
115 postremove()
116 {
117 mstopunit dbus.service dbus-daemon
118 }