Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 20907 - (show annotations) (download)
Fri Feb 14 09:33:32 2014 UTC (10 years, 3 months ago) by niro
File size: 3979 byte(s)
-generate xml doc to add missing man-pages
1 # $Id$
2
3 PNAME="dbus"
4 PVER="1.8.0"
5 PBUILD="r1"
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 >= app-text/xmlto-0.0.25
26 >= dev-util/pkgconfig-0.25
27 >= sys-apps/systemd-208"
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 src_prepare()
69 {
70 munpack ${SRCFILE} || die
71
72 # do not abort on fatal warnings by default
73 mpatch ${PNAME}-1.5.8-no-fatal-warnings.patch || die
74 }
75
76 src_compile()
77 {
78 # using /lib/systemd/system as systemd units dir even on multilib systems
79 # to have one common rules/script directory!
80 mconfigure \
81 --with-system-pid-file=/run/dbus.pid \
82 --with-system-socket=/run/dbus/system_bus_socket \
83 --with-session-socket-dir=/tmp \
84 --with-test-socket-dir=/tmp \
85 --with-console-auth-dir=/run/console \
86 --libexecdir=/usr/$(mlibdir)/dbus-1.0 \
87 --localstatedir=/var \
88 --with-dbus-user=messagebus \
89 --with-xml=expat \
90 --disable-verbose-mode \
91 --disable-checks \
92 --disable-asserts \
93 --enable-inotify \
94 --disable-dnotify \
95 --with-x \
96 --disable-doxygen-docs \
97 --with-systemdsystemunitdir=$(mget-systemd-unit-dir) \
98 --enable-systemd \
99 || die
100
101 mmake || die
102 }
103
104 src_install_dbus-libs()
105 {
106 # fix ln issue on multilib: force overwrite of all symlinks
107 mmake DESTDIR=${BINDIR} LN_S="'ln -sf'" -C dbus install-libLTLIBRARIES || die
108 }
109
110 src_install_dbus()
111 {
112 # fix ln issue on multilib: force overwrite of all symlinks
113 mmake install DESTDIR=${BINDIR} LN_S="'ln -sf'" || die
114 # remove libraries provided by the dbus-libs package
115 mmake DESTDIR=${BINDIR} LN_S="'ln -sf'" -C dbus uninstall-libLTLIBRARIES || die
116 # remove dbus-launch provided by dbus-x11 package
117 mdelete /usr/bin/dbus-launch || die
118 mdelete /usr/share/man/man1/dbus-launch.1 || die
119 # remove dbus-run-session provided by dbus-x11 package
120 mdelete /usr/bin/dbus-run-session || die
121 mdelete /usr/share/man/man1/dbus-run-session.1 || die
122
123 # mark some dirs undeletable
124 mkeepdir /var/lib/dbus || die
125 mkeepdir /run/dbus || die
126 mkeepdir /usr/lib/dbus-1.0/services || die
127 mkeepdir /usr/share/dbus-1/services || die
128 mkeepdir /etc/dbus-1/system.d || die
129 mkeepdir /etc/dbus-1/session.d || die
130
131 minstalldocs AUTHORS ChangeLog COPYING HACKING NEWS README || die
132 }
133
134 src_install_dbus-x11()
135 {
136 all-abis minstallexec tools/dbus-launch || die
137 all-abis minstallman doc/dbus-launch.1 || die
138
139 all-abis minstallexec tools/dbus-run-session || die
140 all-abis minstallman doc/dbus-run-session.1 || die
141 }
142
143 preinstall_dbus()
144 {
145 # adds plugdev group
146 mgroupadd -o "-g 302" plugdev
147
148 # adds messagebus user
149 mgroupadd -o "-g 300" messagebus
150 museradd -o "-M -u 300 -g messagebus -d /dev/null -s /bin/false" messagebus
151 }
152
153 postinstall_dbus()
154 {
155 # only reload dbus-daemon if already running
156 if pidof dbus-daemon > /dev/null
157 then
158 mreloadunit dbus.service dbus-daemon
159 else
160 mstartunit dbus.service dbus-daemon
161 fi
162 }
163
164 postremove_dbus()
165 {
166 mstopunit dbus.service dbus-daemon
167 }