Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19791 - (show annotations) (download)
Tue Oct 22 07:42:05 2013 UTC (10 years, 7 months ago) by niro
File size: 4168 byte(s)
-split_package
1 # $Id$
2
3 PNAME="dbus"
4 PVER="1.6.16"
5 PBUILD="r2"
6
7 SPLIT_PACKAGES="dbus-libs dbus dbus-x11"
8
9 PCAT="sys-apps"
10 HOMEPAGE="http://www.freedesktop.org/Software/dbus"
11
12 LIB_DEPEND=">= virtual/glibc"
13
14 DBUS_DEPEND=">= dev-libs/expat-2
15 >= sys-apps/util-linux-2.23
16 >= sys-libs/libsystemd-daemon-208
17 >= sys-libs/libsystemd-login-208"
18
19 X11_DEPEND=">= x11-libs/libX11-1.6
20 >= x11-libs/libXt-1.1"
21
22 SDEPEND="${LIB_DEPEND}
23 ${DBUS_DEPEND}
24 ${X11_DEPEND}
25 >= dev-util/pkgconfig-0.25
26 >= sys-apps/systemd-208"
27
28 SRCFILE="${PNAME}-${PVER}.tar.gz"
29 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
30
31 sminclude mtools multilib systemd
32
33 SESSION_SCRIPT_REV=2
34
35 SRC_URI=(
36 http://dbus.freedesktop.org/releases/${PNAME}/${SRCFILE}
37 mirror://${PNAME}/${SRCFILE}
38 mirror://${PNAME}/${PNAME}-1.5.8-no-fatal-warnings.patch
39 mirror://${PNAME}/${PNAME}-${PVER}-systemd-user-session.patch
40 mirror://${PNAME}/30-dbus-${SESSION_SCRIPT_REV}
41 )
42
43 # use subdir $uri/dbus
44 UP2SUBDIR="${PNAME}"
45 UP2DATE="updatecmd_freedesktop ${PNAME} gz"
46
47 split_info_dbus-libs()
48 {
49 DESCRIPTION="Libraries for accessing D-BUS."
50 DEPEND="${LIB_DEPEND}"
51 PCAT="sys-libs"
52 }
53
54 split_info_dbus()
55 {
56 DESCRIPTION="D-BUS is a message bus system, a simple way for applications to talk to one another."
57 DEPEND="== sys-libs/dbus-libs-${PVER}
58 ${DBUS_DEPEND}"
59 }
60
61 split_info_dbus-x11()
62 {
63 DESCRIPTION="X11-requiring add-ons for D-BUS."
64 DEPEND="== sys-libs/dbus-libs-${PVER}
65 == sys-apps/dbus-${PVER}
66 ${X11_DEPEND}"
67 }
68
69 src_prepare()
70 {
71 munpack ${SRCFILE} || die
72
73 # do not abort on fatal warnings by default
74 mpatch ${PNAME}-1.5.8-no-fatal-warnings.patch || die
75
76 # fixes bus activation when running dbus under a systemd session
77 mpatch ${PNAME}-${PVER}-systemd-user-session.patch || die
78
79 # fix missing include
80 all-abis 'sed -i "s/#include <stdio.h>/#include <stdio.h>\n#include <syslog.h>/g" dbus/dbus-sysdeps-util-unix.c' || die
81 }
82
83 src_compile()
84 {
85 # using /lib/systemd/system as systemd units dir even on multilib systems
86 # to have one common rules/script directory!
87 mconfigure \
88 --with-system-pid-file=/run/dbus.pid \
89 --with-system-socket=/run/dbus/system_bus_socket \
90 --with-session-socket-dir=/tmp \
91 --with-test-socket-dir=/tmp \
92 --libexecdir=/usr/$(mlibdir)/dbus-1.0 \
93 --localstatedir=/var \
94 --with-dbus-user=messagebus \
95 --with-xml=expat \
96 --disable-verbose-mode \
97 --disable-checks \
98 --disable-asserts \
99 --enable-inotify \
100 --with-x \
101 --disable-doxygen-docs \
102 --disable-xml-docs \
103 --with-systemdsystemunitdir=$(mget-systemd-unit-dir) \
104 || die
105
106 mmake || die
107 }
108
109 src_install_dbus-libs()
110 {
111 # fix ln issue on multilib: force overwrite of all symlinks
112 mmake DESTDIR=${BINDIR} LN_S="'ln -sf'" -C dbus install-libLTLIBRARIES || die
113 }
114
115 src_install_dbus()
116 {
117 # fix ln issue on multilib: force overwrite of all symlinks
118 mmake install DESTDIR=${BINDIR} LN_S="'ln -sf'" || die
119 # remove libraries provided by the dbus-libs package
120 mmake DESTDIR=${BINDIR} LN_S="'ln -sf'" -C dbus uninstall-libLTLIBRARIES || die
121 # remove dbus-launch provided by dbus-x11 package
122 mdelete /usr/bin/dbus-launch || die
123 mdelete /usr/share/man/man1/dbus-launch.1 || die
124
125 # mark some dirs undeletable
126 mkeepdir /var/lib/dbus || die
127 mkeepdir /run/dbus || die
128 mkeepdir /usr/lib/dbus-1.0/services || die
129 mkeepdir /usr/share/dbus-1/services || die
130 mkeepdir /etc/dbus-1/system.d || die
131 mkeepdir /etc/dbus-1/session.d || die
132
133 minstalldocs AUTHORS ChangeLog COPYING HACKING NEWS README || die
134 }
135
136 src_install_dbus-x11()
137 {
138 all-abis minstallexec tools/dbus-launch || die
139 all-abis minstallman doc/dbus-launch.1 || die
140
141 # install session script
142 minstalldir /etc/X11/xinit/xinitrc.d || die
143 minstallexec -s 30-dbus-${SESSION_SCRIPT_REV} /etc/X11/xinit/xinitrc.d || die
144 }
145
146 preinstall_dbus()
147 {
148 # adds plugdev group
149 mgroupadd -o "-g 302" plugdev
150
151 # adds messagebus user
152 mgroupadd -o "-g 300" messagebus
153 museradd -o "-M -u 300 -g messagebus -d /dev/null -s /bin/false" messagebus
154 }
155
156 postinstall_dbus()
157 {
158 # only reload dbus-daemon if already running
159 if pidof dbus-daemon > /dev/null
160 then
161 mreloadunit dbus.service dbus-daemon
162 else
163 mstartunit dbus.service dbus-daemon
164 fi
165 }
166
167 postremove_dbus()
168 {
169 mstopunit dbus.service dbus-daemon
170 }