Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 22003 - (show annotations) (download)
Wed Aug 13 11:43:45 2014 UTC (9 years, 10 months ago) by niro
File size: 4013 byte(s)
-rebuild and use pkg_setup()
1 # $Id$
2
3 PNAME="dbus"
4 PVER="1.8.6"
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.24
16 >= sys-libs/libsystemd-daemon-211
17 >= sys-libs/libsystemd-login-211"
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 >= app-text/xmlto-0.0.25
26 >= dev-util/pkgconfig-0.25
27 >= sys-apps/systemd-211"
28
29 SRCFILE="${PNAME}-${PVER}.tar.gz"
30 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
31
32 sminclude mtools multilib systemd
33
34 SESSION_SCRIPT_REV=2
35
36 SRC_URI=(
37 http://dbus.freedesktop.org/releases/${PNAME}/${SRCFILE}
38 mirror://${PNAME}/${SRCFILE}
39 mirror://${PNAME}/${PNAME}-1.5.8-no-fatal-warnings.patch
40 )
41
42 # use subdir $uri/dbus
43 UP2SUBDIR="${PNAME}"
44 UP2DATE="updatecmd_freedesktop ${PNAME} gz"
45
46 split_info_dbus-libs()
47 {
48 DESCRIPTION="Libraries for accessing D-BUS."
49 DEPEND="${LIB_DEPEND}"
50 PCAT="sys-libs"
51 }
52
53 split_info_dbus()
54 {
55 DESCRIPTION="D-BUS is a message bus system, a simple way for applications to talk to one another."
56 DEPEND="== sys-libs/dbus-libs-${PVER}
57 ${DBUS_DEPEND}"
58 }
59
60 split_info_dbus-x11()
61 {
62 DESCRIPTION="X11-requiring add-ons for D-BUS."
63 DEPEND="== sys-libs/dbus-libs-${PVER}
64 == sys-apps/dbus-${PVER}
65 ${X11_DEPEND}"
66 }
67
68 pkg_setup()
69 {
70 preinstall_dbus
71 }
72
73 src_prepare()
74 {
75 munpack ${SRCFILE} || die
76
77 # do not abort on fatal warnings by default
78 mpatch ${PNAME}-1.5.8-no-fatal-warnings.patch || die
79 }
80
81 src_compile()
82 {
83 # using /lib/systemd/system as systemd units dir even on multilib systems
84 # to have one common rules/script directory!
85 mconfigure \
86 --with-system-pid-file=/run/dbus.pid \
87 --with-system-socket=/run/dbus/system_bus_socket \
88 --with-session-socket-dir=/tmp \
89 --with-test-socket-dir=/tmp \
90 --with-console-auth-dir=/run/console \
91 --libexecdir=/usr/$(mlibdir)/dbus-1.0 \
92 --localstatedir=/var \
93 --with-dbus-user=messagebus \
94 --with-xml=expat \
95 --disable-verbose-mode \
96 --disable-checks \
97 --disable-asserts \
98 --enable-inotify \
99 --disable-dnotify \
100 --with-x \
101 --disable-doxygen-docs \
102 --with-systemdsystemunitdir=$(mget-systemd-unit-dir) \
103 --enable-systemd \
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 # remove dbus-run-session provided by dbus-x11 package
125 mdelete /usr/bin/dbus-run-session || die
126 mdelete /usr/share/man/man1/dbus-run-session.1 || die
127
128 # mark some dirs undeletable
129 mkeepdir /var/lib/dbus || die
130 mkeepdir /run/dbus || die
131 mkeepdir /usr/lib/dbus-1.0/services || die
132 mkeepdir /usr/share/dbus-1/services || die
133 mkeepdir /etc/dbus-1/system.d || die
134 mkeepdir /etc/dbus-1/session.d || die
135
136 minstalldocs AUTHORS ChangeLog COPYING HACKING NEWS README || die
137 }
138
139 src_install_dbus-x11()
140 {
141 all-abis minstallexec tools/dbus-launch || die
142 all-abis minstallman doc/dbus-launch.1 || die
143
144 all-abis minstallexec tools/dbus-run-session || die
145 all-abis minstallman doc/dbus-run-session.1 || die
146 }
147
148 preinstall_dbus()
149 {
150 # adds plugdev group
151 mgroupadd -o "-g 302" plugdev
152
153 # adds messagebus user
154 mgroupadd -o "-g 300" messagebus
155 museradd -o "-M -u 300 -g messagebus -d /dev/null -s /bin/false" messagebus
156 }
157
158 postinstall_dbus()
159 {
160 # only reload dbus-daemon if already running
161 if pidof dbus-daemon > /dev/null
162 then
163 mreloadunit dbus.service dbus-daemon
164 else
165 mstartunit dbus.service dbus-daemon
166 fi
167 }
168
169 postremove_dbus()
170 {
171 mstopunit dbus.service dbus-daemon
172 }