Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12846 - (show annotations) (download)
Wed Jul 4 10:59:08 2012 UTC (11 years, 10 months ago) by niro
File size: 2749 byte(s)
-marked stable
1 # $Id$
2
3 PNAME="dbus"
4 PVER="1.6.2"
5 PBUILD="r1"
6
7 PCAT="sys-apps"
8
9 DESCRIPTION="D-BUS is a message bus system, a simple way for applications to talk to one another."
10 HOMEPAGE="http://www.freedesktop.org/Software/dbus"
11
12 DEPEND=">= x11-libs/libX11-1.4
13 >= x11-libs/libXt-1.1
14 >= dev-libs/expat-2
15 >= sys-apps/util-linux-2.20"
16
17 SDEPEND=">= dev-util/pkgconfig-0.25"
18
19 SRCFILE="${PNAME}-${PVER}.tar.gz"
20 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
21
22 sminclude mtools multilib
23
24 SRC_URI=(
25 http://dbus.freedesktop.org/releases/${PNAME}/${SRCFILE}
26 mirror://${PNAME}/${SRCFILE}
27 mirror://${PNAME}/30-dbus
28 mirror://${PNAME}-1.5.8-no-fatal-warnings.patch
29 )
30
31 # use subdir $uri/dbus
32 UP2SUBDIR="${PNAME}"
33 UP2DATE="updatecmd_freedesktop ${PNAME} gz"
34
35 src_prepare()
36 {
37 munpack ${SRCFILE} || die
38
39 # do not abort on fatal warnings by default
40 mpatch ${PNAME}-1.5.8-no-fatal-warnings.patch || die
41
42 # fix missing include
43 all-abis 'sed -i "s/#include <stdio.h>/#include <stdio.h>\n#include <syslog.h>/g" dbus/dbus-sysdeps-util-unix.c' || die
44 }
45
46 src_compile()
47 {
48 # using /lib/systemd/system as systemd units dir even on multilib systems
49 # to have one common rules/script directory!
50 mconfigure \
51 --with-system-pid-file=/run/dbus.pid \
52 --with-system-socket=/run/dbus/system_bus_socket \
53 --with-session-socket-dir=/tmp \
54 --with-test-socket-dir=/tmp \
55 --libexecdir=/usr/$(mlibdir)/dbus-1.0 \
56 --localstatedir=/var \
57 --with-dbus-user=messagebus \
58 --with-xml=expat \
59 --disable-verbose-mode \
60 --disable-checks \
61 --disable-asserts \
62 --enable-inotify \
63 --with-x \
64 --disable-doxygen-docs \
65 --disable-xml-docs \
66 --with-systemdsystemunitdir=/usr/lib/systemd/system \
67 || die
68
69 mmake || die
70 }
71
72 src_install()
73 {
74 # needed directories
75 minstalldir /etc/X11/xinit/xinitrc.d || die
76 minstalldir /usr/env || die
77
78 # fix ln issue on multilib: force overwrite of all symlinks
79 mmake install DESTDIR=${BINDIR} LN_S="'ln -sf'" || die
80
81 # session script
82 minstallexec -s 30-dbus /etc/X11/xinit/xinitrc.d || die
83
84 # kde needs special treatments
85 minstallexec -s 30-dbus /usr/env/dbus-env.sh || die
86
87 # mark some dirs undeletable
88 mkeepdir /var/lib/dbus || die
89 mkeepdir /run/dbus || die
90 mkeepdir /usr/lib/dbus-1.0/services || die
91 mkeepdir /usr/share/dbus-1/services || die
92 mkeepdir /etc/dbus-1/system.d || die
93 mkeepdir /etc/dbus-1/session.d || die
94
95 minstalldocs AUTHORS ChangeLog COPYING HACKING NEWS README || die
96 }
97
98 preinstall()
99 {
100 # adds plugdev group
101 ${MLIBDIR}/mgroupadd -o "-g 302" plugdev
102
103 # adds messagebus user
104 ${MLIBDIR}/mgroupadd -o "-g 300" messagebus
105 ${MLIBDIR}/museradd -o "-u 300 -g messagebus -d /dev/null -s /bin/false" messagebus
106 }
107
108 postinstall()
109 {
110 mstartunit dbus.service dbus-daemon
111 }
112
113 postremove()
114 {
115 mstopunit dbus.service dbus-daemon
116 }