Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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