/[gentoo-x86]/sys-apps/dbus/dbus-1.2.24-r1.ebuild
Gentoo

Contents of /sys-apps/dbus/dbus-1.2.24-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Dec 19 01:18:07 2010 UTC (4 years, 4 months ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
punt old

(Portage version: 2.2.0_alpha9/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/dbus-1.2.24-r1.ebuild,v 1.1 2010/08/05 19:54:03 lack Exp $
4
5 EAPI=2
6
7 inherit eutils multilib flag-o-matic
8
9 DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
10 HOMEPAGE="http://dbus.freedesktop.org/"
11 SRC_URI="http://dbus.freedesktop.org/releases/dbus/${P}.tar.gz"
12
13 LICENSE="|| ( GPL-2 AFL-2.1 )"
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
16 IUSE="debug doc selinux test X"
17
18 RDEPEND="X? ( x11-libs/libXt x11-libs/libX11 )
19 selinux? ( sys-libs/libselinux
20 sec-policy/selinux-dbus )
21 >=dev-libs/expat-1.95.8
22 !<sys-apps/dbus-0.91"
23 DEPEND="${RDEPEND}
24 dev-util/pkgconfig
25 doc? ( app-doc/doxygen
26 app-text/xmlto )"
27
28 pkg_setup() {
29 enewgroup messagebus
30 enewuser messagebus -1 "-1" -1 messagebus
31 }
32
33 src_prepare() {
34 # Tests were restricted because of this
35 sed -e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
36 -e '/"dispatch"/d' -i "${S}/bus/test-main.c"
37 }
38
39 src_configure() {
40 # so we can get backtraces from apps
41 append-flags -rdynamic
42
43 # libaudit is *only* used in DBus wrt SELinux support, so disable it, if
44 # not on an SELinux profile.
45 econf \
46 $(use_with X x) \
47 $(use_enable kernel_linux inotify) \
48 $(use_enable kernel_FreeBSD kqueue) \
49 $(use_enable selinux) \
50 $(use_enable selinux libaudit) \
51 $(use_enable debug verbose-mode) \
52 $(use_enable debug asserts) \
53 $(use_enable test tests) \
54 $(use_enable test asserts) \
55 --with-xml=expat \
56 --with-system-pid-file=/var/run/dbus.pid \
57 --with-system-socket=/var/run/dbus/system_bus_socket \
58 --with-session-socket-dir=/tmp \
59 --with-dbus-user=messagebus \
60 --localstatedir=/var \
61 $(use_enable doc doxygen-docs) \
62 --disable-xml-docs \
63 || die "econf failed"
64
65 # after the compile, it uses a selinuxfs interface to
66 # check if the SELinux policy has the right support
67 use selinux && addwrite /selinux/access
68 }
69
70 src_test() {
71 DBUS_VERBOSE=1 make check || die "make check failed"
72 }
73
74 src_install() {
75 emake DESTDIR="${D}" install || die "make install failed"
76
77 # initscript
78 newinitd "${FILESDIR}"/dbus.init-1.0 dbus
79
80 if use X ; then
81 # dbus X session script (#77504)
82 # turns out to only work for GDM (and startx). has been merged into
83 # other desktop (kdm and such scripts)
84 exeinto /etc/X11/xinit/xinitrc.d/
85 doexe "${FILESDIR}"/80-dbus
86 fi
87
88 # needs to exist for the system socket
89 keepdir /var/run/dbus
90 # needs to exist for machine id
91 keepdir /var/lib/dbus
92 # needs to exist for dbus sessions to launch
93
94 keepdir /usr/lib/dbus-1.0/services
95 keepdir /usr/share/dbus-1/services
96 keepdir /etc/dbus-1/system.d/
97 keepdir /etc/dbus-1/session.d/
98
99 dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
100 if use doc; then
101 dohtml doc/*html
102 fi
103 }
104
105 pkg_postinst() {
106 elog "To start the D-Bus system-wide messagebus by default"
107 elog "you should add it to the default runlevel :"
108 elog "\`rc-update add dbus default\`"
109 elog
110 elog "Some applications require a session bus in addition to the system"
111 elog "bus. Please see \`man dbus-launch\` for more information."
112 elog
113 ewarn "You must restart D-Bus \`/etc/init.d/dbus restart\` to run"
114 ewarn "the new version of the daemon."
115
116 if has_version x11-base/xorg-server[hal]; then
117 elog
118 ewarn "You are currently running X with the hal useflag enabled"
119 ewarn "restarting the dbus service WILL restart X as well"
120 ebeep 5
121 fi
122
123 if use test; then
124 elog
125 ewarn "You have unit tests enabled, this results in an insecure library"
126 ewarn "It is recommended that you reinstall *without* FEATURES=test"
127 fi
128 }

  ViewVC Help
Powered by ViewVC 1.1.20