Magellan Linux

Contents of /trunk/core/dbus/dbus-1.6.16-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19785 - (show annotations) (download)
Mon Oct 21 14:17:05 2013 UTC (10 years, 7 months ago) by niro
File size: 3032 byte(s)
auto added: ver bump to 1.6.16-r1
1 # $Id$
2
3 PNAME="dbus"
4 PVER="1.6.16"
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.6
13 >= x11-libs/libXt-1.1
14 >= dev-libs/expat-2
15 >= sys-apps/util-linux-2.23"
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 systemd
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}/${PNAME}-${PVER}-systemd-user-session.patch
31 mirror://${PNAME}/30-dbus-${SESSION_SCRIPT_REV}
32 )
33
34 # use subdir $uri/dbus
35 UP2SUBDIR="${PNAME}"
36 UP2DATE="updatecmd_freedesktop ${PNAME} gz"
37
38 src_prepare()
39 {
40 munpack ${SRCFILE} || die
41
42 # do not abort on fatal warnings by default
43 mpatch ${PNAME}-1.5.8-no-fatal-warnings.patch || die
44
45 # fixes bus activation when running dbus under a systemd session
46 mpatch ${PNAME}-${PVER}-systemd-user-session.patch || die
47
48 # fix missing include
49 all-abis 'sed -i "s/#include <stdio.h>/#include <stdio.h>\n#include <syslog.h>/g" dbus/dbus-sysdeps-util-unix.c' || die
50 }
51
52 src_compile()
53 {
54 # using /lib/systemd/system as systemd units dir even on multilib systems
55 # to have one common rules/script directory!
56 mconfigure \
57 --with-system-pid-file=/run/dbus.pid \
58 --with-system-socket=/run/dbus/system_bus_socket \
59 --with-session-socket-dir=/tmp \
60 --with-test-socket-dir=/tmp \
61 --libexecdir=/usr/$(mlibdir)/dbus-1.0 \
62 --localstatedir=/var \
63 --with-dbus-user=messagebus \
64 --with-xml=expat \
65 --disable-verbose-mode \
66 --disable-checks \
67 --disable-asserts \
68 --enable-inotify \
69 --with-x \
70 --disable-doxygen-docs \
71 --disable-xml-docs \
72 --with-systemdsystemunitdir=$(mget-systemd-unit-dir) \
73 || die
74
75 mmake || die
76 }
77
78 src_install()
79 {
80 # fix ln issue on multilib: force overwrite of all symlinks
81 mmake install DESTDIR=${BINDIR} LN_S="'ln -sf'" || die
82
83 # install session script
84 minstalldir /etc/X11/xinit/xinitrc.d || die
85 minstallexec -s 30-dbus-${SESSION_SCRIPT_REV} /etc/X11/xinit/xinitrc.d || die
86
87 # mark some dirs undeletable
88 mkeepdir /var/lib/dbus || die
89 mkeepdir /run/dbus || die
90 mkeepdir /usr/lib/dbus-1.0/services || die
91 mkeepdir /usr/share/dbus-1/services || die
92 mkeepdir /etc/dbus-1/system.d || die
93 mkeepdir /etc/dbus-1/session.d || die
94
95 minstalldocs AUTHORS ChangeLog COPYING HACKING NEWS README || die
96 }
97
98 preinstall()
99 {
100 # adds plugdev group
101 ${MLIBDIR}/mgroupadd -o "-g 302" plugdev
102
103 # adds messagebus user
104 ${MLIBDIR}/mgroupadd -o "-g 300" messagebus
105 ${MLIBDIR}/museradd -o "-M -u 300 -g messagebus -d /dev/null -s /bin/false" messagebus
106 }
107
108 postinstall()
109 {
110 # only reload dbus-daemon if already running
111 if pidof dbus-daemon > /dev/null
112 then
113 mreloadunit dbus.service dbus-daemon
114 else
115 mstartunit dbus.service dbus-daemon
116 fi
117 }
118
119 postremove()
120 {
121 mstopunit dbus.service dbus-daemon
122 }