1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dbus/dbus.spec Sun Jan 04 08:40:58 2009 +0100 1.3 @@ -0,0 +1,199 @@ 1.4 +## 1.5 +## dbus.spec -- OpenPKG RPM Package Specification 1.6 +## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> 1.7 +## 1.8 +## Permission to use, copy, modify, and distribute this software for 1.9 +## any purpose with or without fee is hereby granted, provided that 1.10 +## the above copyright notice and this permission notice appear in all 1.11 +## copies. 1.12 +## 1.13 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 1.14 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1.15 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1.16 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 1.17 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1.18 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1.19 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 1.20 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 1.21 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 1.22 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 1.23 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1.24 +## SUCH DAMAGE. 1.25 +## 1.26 + 1.27 +# package information 1.28 +Name: dbus 1.29 +Summary: Message Bus System 1.30 +URL: http://www.freedesktop.org/Software/dbus 1.31 +Vendor: Freedesktop Project 1.32 +Packager: OpenPKG Foundation e.V. 1.33 +Distribution: OpenPKG Community 1.34 +Class: EVAL 1.35 +Group: RPC 1.36 +License: AFL/GPL 1.37 +Version: 1.1.1 1.38 +Release: 20081126 1.39 + 1.40 +# list of sources 1.41 +Source0: http://dbus.freedesktop.org/releases/dbus/dbus-%{version}.tar.gz 1.42 +Source1: rc.dbus 1.43 +Patch0: dbus.patch 1.44 + 1.45 +# build information 1.46 +Prefix: %{l_prefix} 1.47 +BuildRoot: %{l_buildroot} 1.48 +BuildPreReq: OpenPKG, openpkg >= 20040130, pkgconfig, gcc 1.49 +PreReq: OpenPKG, openpkg >= 20040130 1.50 +BuildPreReq: libxml 1.51 +PreReq: libxml 1.52 +AutoReq: no 1.53 +AutoReqProv: no 1.54 + 1.55 +%description 1.56 + D-BUS is a message bus system, a simple way for applications to 1.57 + talk to one another. D-BUS supplies both a system daemon and a per 1.58 + user login session daemon. Also, the message bus is built on top of 1.59 + a general one to one message passing framework, which can be used 1.60 + by any two apps to communicate directly (without going through the 1.61 + message bus daemon). 1.62 + 1.63 +%track 1.64 + prog dbus = { 1.65 + version = %{version} 1.66 + url = http://dbus.freedesktop.org/releases/dbus/ 1.67 + regex = dbus-(__VER__)\.tar\.gz 1.68 + } 1.69 + 1.70 +%prep 1.71 + %setup -q 1.72 + %patch -p0 1.73 + 1.74 + # adjust filesystem layout 1.75 + %{l_shtool} subst \ 1.76 + -e 's;^\(cat[^|]*|\).*;\1 sed -e "s/\\(<listen>unix:tmpdir=\\)\[^<\]\*/\\1\\/tmp/" | \\;' \ 1.77 + -e 's;#! /bin/bash;#!%{l_bash};' \ 1.78 + tools/run-with-tmp-session-bus.sh 1.79 + %{l_shtool} subst \ 1.80 + -e 's;/dbus-1\.0;;g' \ 1.81 + -e 's;dbus-1;dbus;g' \ 1.82 + -e 's;\(-I\${libdir}\).*;\1/dbus/include;g' \ 1.83 + dbus-1.pc.in 1.84 + %{l_shtool} subst \ 1.85 + -e 's;-1\.la;.la;g' \ 1.86 + test/name-test/Makefile.in dbus/Makefile.in tools/Makefile.in 1.87 + %{l_shtool} subst \ 1.88 + -e 's;/dbus-1\.0;;g' \ 1.89 + -e 's;/dbus-1;;g' \ 1.90 + dbus/Makefile.in tools/Makefile.in bus/Makefile.in bus/session.conf.in bus/dbus-daemon.1.in 1.91 + %{l_shtool} subst \ 1.92 + -e 's;\(\$(localstatedir)/run\)/dbus;\1;g' \ 1.93 + bus/Makefile.in 1.94 + %{l_shtool} subst \ 1.95 + -e 's;^\(dbusarchincludedir *= *\$(libdir)\)\(/include/dbus\);\1/dbus\2;g' \ 1.96 + dbus/Makefile.in 1.97 + %{l_shtool} subst \ 1.98 + -e 's;^\(LIBTOOL=.\)[^\ ]*;\1/bin/sh;' \ 1.99 + configure 1.100 + 1.101 + # platform specific fixes 1.102 + case "%{l_platform -t}" in 1.103 + *-sunos* ) 1.104 + %{l_shtool} subst \ 1.105 + -e 's;readdir_r;__posix_readdir_r;' \ 1.106 + dbus/dbus-sysdeps-util-unix.c 1.107 + %{l_shtool} subst \ 1.108 + -e 's;^\(Libs: -L\${libdir} -ldbus[^ ]*\);\1 -lsocket -lnsl;' \ 1.109 + dbus-1.pc.in 1.110 + ;; 1.111 + esac 1.112 + 1.113 +%build 1.114 + # configure package 1.115 + CC="%{l_cc}" \ 1.116 + CFLAGS="%{l_cflags -O} -pthread" \ 1.117 + CPPFLAGS="%{l_cppflags}" \ 1.118 + LDFLAGS="%{l_ldflags} -pthread" \ 1.119 + ./configure \ 1.120 + --prefix=%{l_prefix} \ 1.121 + --bindir=%{l_prefix}/lib/dbus/bin \ 1.122 + --datadir=%{l_prefix}/share/dbus \ 1.123 + --sysconfdir=%{l_prefix}/etc/dbus \ 1.124 + --localstatedir=%{l_prefix}/var/dbus \ 1.125 + --without-x \ 1.126 + --disable-qt \ 1.127 + --disable-qt3 \ 1.128 + --disable-glib \ 1.129 + --disable-gtk \ 1.130 + --disable-tests \ 1.131 + --disable-ansi \ 1.132 + --disable-verbose-mode \ 1.133 + --disable-asserts \ 1.134 + --disable-checks \ 1.135 + --disable-xml-docs \ 1.136 + --disable-doxygen-docs \ 1.137 + --disable-gcov \ 1.138 + --disable-abstract-sockets \ 1.139 + --disable-gcj \ 1.140 + --disable-mono \ 1.141 + --disable-mono-docs \ 1.142 + --disable-python \ 1.143 + --disable-selinux \ 1.144 + --disable-dnotify \ 1.145 + --disable-shared \ 1.146 + --with-xml=libxml \ 1.147 + --with-session-socket-dir=%{l_prefix}/var/dbus/run \ 1.148 + --with-system-pid-file=%{l_prefix}/var/dbus/run/dbus.pid \ 1.149 + --with-system-socket=%{l_prefix}/var/dbus/run/dbus.socket \ 1.150 + --with-console-auth-dir=%{l_prefix}/var/dbus/run \ 1.151 + --with-dbus-user=%{l_rusr} 1.152 + 1.153 + # build package 1.154 + %{l_make} %{l_mflags -O} 1.155 + 1.156 +%install 1.157 + # install package 1.158 + rm -rf $RPM_BUILD_ROOT 1.159 + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" 1.160 + 1.161 + # strip down package 1.162 + strip $RPM_BUILD_ROOT%{l_prefix}/lib/dbus/bin/* >/dev/null 2>&1 || true 1.163 + 1.164 + # install run-command script 1.165 + %{l_shtool} mkdir -f -p -m 755 \ 1.166 + $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d 1.167 + %{l_shtool} install -c -m 755 %{l_value -s -a} \ 1.168 + %{SOURCE rc.dbus} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ 1.169 + 1.170 + # determine installation files 1.171 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ 1.172 + %{l_files_std} \ 1.173 + '%config %{l_prefix}/etc/dbus/*.conf' \ 1.174 + '%config %{l_prefix}/etc/dbus/system.d/*.conf' 1.175 + 1.176 +%files -f files 1.177 + 1.178 +%clean 1.179 + rm -rf $RPM_BUILD_ROOT 1.180 + 1.181 +%pre 1.182 + # save status and stop service before upgrade 1.183 + [ $1 -eq 2 ] || exit 0 1.184 + eval `%{l_rc} dbus status 2>/dev/null | tee %{l_tmpfile}` 1.185 + %{l_rc} dbus stop 2>/dev/null 1.186 + exit 0 1.187 + 1.188 +%post 1.189 + if [ $1 -eq 2 ]; then 1.190 + # restore status after upgrade 1.191 + eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile} 1.192 + [ ".$dbus_active" = .yes ] && %{l_rc} dbus start 1.193 + fi 1.194 + exit 0 1.195 + 1.196 +%preun 1.197 + # stop service before erase and remove run files 1.198 + [ $1 -eq 0 ] || exit 0 1.199 + %{l_rc} dbus stop 2>/dev/null 1.200 + rm -f $RPM_INSTALL_PREFIX/var/dbus/run/* >/dev/null 2>&1 || true 1.201 + exit 0 1.202 +