Contents of /smage/trunk/core/dbus/dbus-1.8.0-r1.smage2
Parent Directory | Revision Log
Revision 5472 -
(show annotations)
(download)
Wed Mar 26 09:55:49 2014 UTC (10 years, 6 months ago) by niro
File size: 4140 byte(s)
Wed Mar 26 09:55:49 2014 UTC (10 years, 6 months ago) by niro
File size: 4140 byte(s)
-sync with upstream
1 | # $Id$ |
2 | |
3 | PNAME="dbus" |
4 | PVER="1.8.0" |
5 | PBUILD="r1" |
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 | SRC_URI=( |
41 | http://dbus.freedesktop.org/releases/${PNAME}/${SRCFILE} |
42 | mirror://${PNAME}/${SRCFILE} |
43 | mirror://${PNAME}/${PNAME}-1.5.8-no-fatal-warnings.patch |
44 | ) |
45 | |
46 | # use subdir $uri/dbus |
47 | UP2SUBDIR="${PNAME}" |
48 | UP2DATE="updatecmd_freedesktop ${PNAME} gz" |
49 | |
50 | split_info_dbus-libs() |
51 | { |
52 | DESCRIPTION="Libraries for accessing D-BUS." |
53 | DEPEND="${LIB_DEPEND}" |
54 | PCAT="sys-libs" |
55 | } |
56 | |
57 | split_info_dbus() |
58 | { |
59 | DESCRIPTION="D-BUS is a message bus system, a simple way for applications to talk to one another." |
60 | DEPEND="== sys-libs/dbus-libs-${PVER} |
61 | ${DBUS_DEPEND}" |
62 | } |
63 | |
64 | split_info_dbus-x11() |
65 | { |
66 | DESCRIPTION="X11-requiring add-ons for D-BUS." |
67 | DEPEND="== sys-libs/dbus-libs-${PVER} |
68 | == sys-apps/dbus-${PVER} |
69 | ${X11_DEPEND}" |
70 | } |
71 | |
72 | src_prepare() |
73 | { |
74 | munpack ${SRCFILE} || die |
75 | |
76 | # do not abort on fatal warnings by default |
77 | mpatch ${PNAME}-1.5.8-no-fatal-warnings.patch || die |
78 | } |
79 | |
80 | src_compile() |
81 | { |
82 | # using /lib/systemd/system as systemd units dir even on multilib systems |
83 | # to have one common rules/script directory! |
84 | mconfigure \ |
85 | --with-system-pid-file=/run/dbus.pid \ |
86 | --with-system-socket=/run/dbus/system_bus_socket \ |
87 | --with-session-socket-dir=/tmp \ |
88 | --with-test-socket-dir=/tmp \ |
89 | --with-console-auth-dir=/run/console \ |
90 | --libexecdir=/usr/$(mlibdir)/dbus-1.0 \ |
91 | --localstatedir=/var \ |
92 | --with-dbus-user=messagebus \ |
93 | --with-xml=expat \ |
94 | --disable-verbose-mode \ |
95 | --disable-checks \ |
96 | --disable-asserts \ |
97 | --enable-inotify \ |
98 | --disable-dnotify \ |
99 | --with-x \ |
100 | --disable-doxygen-docs \ |
101 | --with-systemdsystemunitdir=$(mget-systemd-unit-dir) \ |
102 | --enable-systemd \ |
103 | || die |
104 | |
105 | mmake || die |
106 | } |
107 | |
108 | src_install_dbus-libs() |
109 | { |
110 | # fix ln issue on multilib: force overwrite of all symlinks |
111 | mmake DESTDIR=${BINDIR} LN_S="'ln -sf'" -C dbus install-libLTLIBRARIES || die |
112 | } |
113 | |
114 | # apply alx-split here |
115 | alx_generic_src_install() |
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 | } |