Magellan Linux

Contents of /trunk/core/dbus/dbus-1.5.8-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10099 - (show annotations) (download)
Mon Jan 16 21:23:38 2012 UTC (12 years, 4 months ago) by niro
File size: 2788 byte(s)
-import from magellan-next
1 # $Id$
2
3 PNAME="dbus"
4 PVER="1.5.8"
5 PBUILD="r2"
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}-${PVER}-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}-${PVER}-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=/var/run/dbus.pid \
52 --with-system-socket=/var/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=/lib/systemd/system \
67 --disable-verbose-mode \
68 || die
69
70 mmake || die
71 }
72
73 src_install()
74 {
75 # needed directories
76 minstalldir /etc/X11/xinit/xinitrc.d || die
77 minstalldir /usr/env || die
78
79 # fix ln issue on multilib: force overwrite of all symlinks
80 mmake install DESTDIR=${BINDIR} LN_S="'ln -sf'" || 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 mstartunit dbus.service dbus-daemon
112 }
113
114 postremove()
115 {
116 mstopunit dbus.service dbus-daemon
117 }