Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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