Magellan Linux

Contents of /branches/magellan-next/core/dbus/dbus-1.5.8-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9039 - (show annotations) (download)
Mon Oct 3 13:03:16 2011 UTC (12 years, 7 months ago) by niro
File size: 2614 byte(s)
-fixed missing util-linux dep
1 # $Id$
2
3 PNAME="dbus"
4 PVER="1.5.8"
5 PBUILD="r1"
6
7 PCATEGORIE="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 )
29
30 # use subdir $uri/dbus
31 UP2SUBDIR="${PNAME}"
32 UP2DATE="updatecmd_freedesktop ${PNAME} gz"
33
34 src_prepare()
35 {
36 munpack ${SRCFILE} || die
37
38 # fix missing include
39 all-abis 'sed -i "s/#include <stdio.h>/#include <stdio.h>\n#include <syslog.h>/g" dbus/dbus-sysdeps-util-unix.c' || die
40 }
41
42 src_compile()
43 {
44 # using /lib/systemd/system as systemd units dir even on multilib systems
45 # to have one common rules/script directory!
46 mconfigure \
47 --with-system-pid-file=/var/run/dbus.pid \
48 --with-system-socket=/var/run/dbus/system_bus_socket \
49 --with-session-socket-dir=/tmp \
50 --with-test-socket-dir=/tmp \
51 --libexecdir=/usr/$(mlibdir)/dbus-1.0 \
52 --localstatedir=/var \
53 --with-dbus-user=messagebus \
54 --with-xml=expat \
55 --disable-verbose-mode \
56 --disable-checks \
57 --disable-asserts \
58 --enable-dnotify \
59 --with-x \
60 --disable-doxygen-docs \
61 --disable-xml-docs \
62 --with-systemdsystemunitdir=/lib/systemd/system \
63 || die
64
65 mmake || die
66 }
67
68 src_install()
69 {
70 # needed directories
71 minstalldir /etc/X11/xinit/xinitrc.d || die
72 minstalldir /usr/env || die
73
74 # fix ln issue on multilib: force overwrite of all symlinks
75 mmake install DESTDIR=${BINDIR} LN_S="'ln -sf'" || die
76
77 # session script
78 minstallexec -s 30-dbus /etc/X11/xinit/xinitrc.d || die
79
80 # kde needs special treatments
81 minstallexec -s 30-dbus /usr/env/dbus-env.sh || die
82
83 # mark some dirs undeletable
84 mkeepdir /var/lib/dbus || die
85 mkeepdir /var/run/dbus || die
86 mkeepdir /usr/lib/dbus-1.0/services || die
87 mkeepdir /usr/share/dbus-1/services || die
88 mkeepdir /etc/dbus-1/system.d || die
89 mkeepdir /etc/dbus-1/session.d || die
90
91 minstalldocs AUTHORS ChangeLog COPYING HACKING NEWS README || die
92 }
93
94 preinstall()
95 {
96 # adds plugdev group
97 ${MLIBDIR}/mgroupadd -o "-g 302" plugdev
98
99 # adds messagebus user
100 ${MLIBDIR}/mgroupadd -o "-g 300" messagebus
101 ${MLIBDIR}/museradd -o "-u 300 -g messagebus -d /dev/null -s /bin/false" messagebus
102 }
103
104 postinstall()
105 {
106 mstartunit dbus.service dbus-daemon
107 }
108
109 postremove()
110 {
111 mstopunit dbus.service dbus-daemon
112 }