Magellan Linux

Contents of /smage/trunk/core/dbus/dbus-1.6.18-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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