Sun, 02 Sep 2012 18:18:43 +0200
Introduce new version of tcpdump, reorder taglib and cryptbreaker to
the end because they fail to build on Linux, and correct flawed URLs
probably copied from the doxygen build entry.
michael@12 | 1 | ## |
michael@12 | 2 | ## dbus.spec -- OpenPKG RPM Package Specification |
michael@12 | 3 | ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@12 | 4 | ## |
michael@12 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@12 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@12 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@12 | 8 | ## copies. |
michael@12 | 9 | ## |
michael@12 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@12 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@12 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@12 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@12 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@12 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@12 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@12 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@12 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@12 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@12 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@12 | 21 | ## SUCH DAMAGE. |
michael@12 | 22 | ## |
michael@12 | 23 | |
michael@12 | 24 | # package information |
michael@12 | 25 | Name: dbus |
michael@12 | 26 | Summary: Message Bus System |
michael@12 | 27 | URL: http://www.freedesktop.org/Software/dbus |
michael@12 | 28 | Vendor: Freedesktop Project |
michael@12 | 29 | Packager: OpenPKG Foundation e.V. |
michael@12 | 30 | Distribution: OpenPKG Community |
michael@12 | 31 | Class: EVAL |
michael@12 | 32 | Group: RPC |
michael@12 | 33 | License: AFL/GPL |
michael@76 | 34 | Version: 1.2.12 |
michael@76 | 35 | Release: 20090106 |
michael@12 | 36 | |
michael@12 | 37 | # list of sources |
michael@12 | 38 | Source0: http://dbus.freedesktop.org/releases/dbus/dbus-%{version}.tar.gz |
michael@12 | 39 | Source1: rc.dbus |
michael@12 | 40 | Patch0: dbus.patch |
michael@12 | 41 | |
michael@12 | 42 | # build information |
michael@12 | 43 | Prefix: %{l_prefix} |
michael@12 | 44 | BuildRoot: %{l_buildroot} |
michael@85 | 45 | BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc, pkgconfig |
michael@12 | 46 | PreReq: OpenPKG, openpkg >= 20040130 |
michael@12 | 47 | BuildPreReq: libxml |
michael@12 | 48 | PreReq: libxml |
michael@12 | 49 | AutoReq: no |
michael@12 | 50 | AutoReqProv: no |
michael@12 | 51 | |
michael@12 | 52 | %description |
michael@12 | 53 | D-BUS is a message bus system, a simple way for applications to |
michael@12 | 54 | talk to one another. D-BUS supplies both a system daemon and a per |
michael@12 | 55 | user login session daemon. Also, the message bus is built on top of |
michael@12 | 56 | a general one to one message passing framework, which can be used |
michael@12 | 57 | by any two apps to communicate directly (without going through the |
michael@12 | 58 | message bus daemon). |
michael@12 | 59 | |
michael@12 | 60 | %track |
michael@12 | 61 | prog dbus = { |
michael@12 | 62 | version = %{version} |
michael@12 | 63 | url = http://dbus.freedesktop.org/releases/dbus/ |
michael@12 | 64 | regex = dbus-(__VER__)\.tar\.gz |
michael@12 | 65 | } |
michael@12 | 66 | |
michael@12 | 67 | %prep |
michael@12 | 68 | %setup -q |
michael@12 | 69 | %patch -p0 |
michael@12 | 70 | |
michael@76 | 71 | # correct build configuration logic |
michael@12 | 72 | %{l_shtool} subst \ |
michael@12 | 73 | -e 's;^\(cat[^|]*|\).*;\1 sed -e "s/\\(<listen>unix:tmpdir=\\)\[^<\]\*/\\1\\/tmp/" | \\;' \ |
michael@12 | 74 | -e 's;#! /bin/bash;#!%{l_bash};' \ |
michael@12 | 75 | tools/run-with-tmp-session-bus.sh |
michael@12 | 76 | %{l_shtool} subst \ |
michael@12 | 77 | -e 's;/dbus-1\.0;;g' \ |
michael@76 | 78 | -e 's;/dbus-1;;g' \ |
michael@12 | 79 | -e 's;dbus-1;dbus;g' \ |
michael@12 | 80 | -e 's;\(-I\${libdir}\).*;\1/dbus/include;g' \ |
michael@79 | 81 | -e 's;\(-I\${includedir}\);\1/dbus;g' \ |
michael@12 | 82 | dbus-1.pc.in |
michael@12 | 83 | %{l_shtool} subst \ |
michael@76 | 84 | -e 's;/dbus-1\.0;;g' \ |
michael@76 | 85 | dbus/Makefile.in |
michael@76 | 86 | %{l_shtool} subst \ |
michael@12 | 87 | -e 's;-1\.la;.la;g' \ |
michael@76 | 88 | dbus/Makefile.in tools/Makefile.in |
michael@12 | 89 | %{l_shtool} subst \ |
michael@12 | 90 | -e 's;/dbus-1;;g' \ |
michael@76 | 91 | configure |
michael@76 | 92 | %{l_shtool} subst \ |
michael@76 | 93 | -e 's;/*dbus-1;;g' \ |
michael@76 | 94 | dbus/Makefile.in \ |
michael@76 | 95 | tools/Makefile.in \ |
michael@76 | 96 | bus/Makefile.in \ |
michael@76 | 97 | bus/dbus-daemon.1.in \ |
michael@76 | 98 | bus/config-parser.c \ |
michael@76 | 99 | dbus/dbus-sysdeps-unix.c |
michael@12 | 100 | %{l_shtool} subst \ |
michael@12 | 101 | -e 's;\(\$(localstatedir)/run\)/dbus;\1;g' \ |
michael@12 | 102 | bus/Makefile.in |
michael@12 | 103 | %{l_shtool} subst \ |
michael@12 | 104 | -e 's;^\(dbusarchincludedir *= *\$(libdir)\)\(/include/dbus\);\1/dbus\2;g' \ |
michael@12 | 105 | dbus/Makefile.in |
michael@12 | 106 | |
michael@12 | 107 | # platform specific fixes |
michael@12 | 108 | case "%{l_platform -t}" in |
michael@12 | 109 | *-sunos* ) |
michael@12 | 110 | %{l_shtool} subst \ |
michael@80 | 111 | -e 's;^\(Libs: -L\${libdir} -ldbus[^ ]*\);\1 -lbsm -lsocket -lnsl;' \ |
michael@12 | 112 | dbus-1.pc.in |
michael@12 | 113 | ;; |
michael@12 | 114 | esac |
michael@12 | 115 | |
michael@12 | 116 | %build |
michael@12 | 117 | # configure package |
michael@12 | 118 | CC="%{l_cc}" \ |
michael@12 | 119 | CFLAGS="%{l_cflags -O} -pthread" \ |
michael@12 | 120 | CPPFLAGS="%{l_cppflags}" \ |
michael@12 | 121 | LDFLAGS="%{l_ldflags} -pthread" \ |
michael@12 | 122 | ./configure \ |
michael@12 | 123 | --prefix=%{l_prefix} \ |
michael@12 | 124 | --bindir=%{l_prefix}/lib/dbus/bin \ |
michael@12 | 125 | --datadir=%{l_prefix}/share/dbus \ |
michael@12 | 126 | --sysconfdir=%{l_prefix}/etc/dbus \ |
michael@12 | 127 | --localstatedir=%{l_prefix}/var/dbus \ |
michael@12 | 128 | --without-x \ |
michael@12 | 129 | --disable-qt \ |
michael@12 | 130 | --disable-qt3 \ |
michael@12 | 131 | --disable-glib \ |
michael@12 | 132 | --disable-gtk \ |
michael@12 | 133 | --disable-tests \ |
michael@12 | 134 | --disable-ansi \ |
michael@12 | 135 | --disable-verbose-mode \ |
michael@12 | 136 | --disable-asserts \ |
michael@12 | 137 | --disable-checks \ |
michael@12 | 138 | --disable-xml-docs \ |
michael@12 | 139 | --disable-doxygen-docs \ |
michael@12 | 140 | --disable-gcov \ |
michael@12 | 141 | --disable-abstract-sockets \ |
michael@12 | 142 | --disable-gcj \ |
michael@12 | 143 | --disable-mono \ |
michael@12 | 144 | --disable-mono-docs \ |
michael@12 | 145 | --disable-python \ |
michael@12 | 146 | --disable-selinux \ |
michael@12 | 147 | --disable-dnotify \ |
michael@12 | 148 | --disable-shared \ |
michael@12 | 149 | --with-xml=libxml \ |
michael@12 | 150 | --with-session-socket-dir=%{l_prefix}/var/dbus/run \ |
michael@12 | 151 | --with-system-pid-file=%{l_prefix}/var/dbus/run/dbus.pid \ |
michael@12 | 152 | --with-system-socket=%{l_prefix}/var/dbus/run/dbus.socket \ |
michael@12 | 153 | --with-console-auth-dir=%{l_prefix}/var/dbus/run \ |
michael@12 | 154 | --with-dbus-user=%{l_rusr} |
michael@12 | 155 | |
michael@12 | 156 | # build package |
michael@12 | 157 | %{l_make} %{l_mflags -O} |
michael@12 | 158 | |
michael@12 | 159 | %install |
michael@12 | 160 | # install package |
michael@12 | 161 | rm -rf $RPM_BUILD_ROOT |
michael@76 | 162 | %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
michael@12 | 163 | |
michael@76 | 164 | # strip binaries of symbols |
michael@12 | 165 | strip $RPM_BUILD_ROOT%{l_prefix}/lib/dbus/bin/* >/dev/null 2>&1 || true |
michael@76 | 166 | strip $RPM_BUILD_ROOT%{l_prefix}/libexec/dbus/bin/* >/dev/null 2>&1 || true |
michael@12 | 167 | |
michael@76 | 168 | # correct the installation hierarchy |
michael@76 | 169 | mv $RPM_BUILD_ROOT%{l_prefix}/share/man \ |
michael@76 | 170 | $RPM_BUILD_ROOT%{l_prefix}/ |
michael@76 | 171 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/share |
michael@76 | 172 | |
michael@76 | 173 | # install runcommand script |
michael@12 | 174 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@12 | 175 | $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d |
michael@12 | 176 | %{l_shtool} install -c -m 755 %{l_value -s -a} \ |
michael@12 | 177 | %{SOURCE rc.dbus} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
michael@12 | 178 | |
michael@12 | 179 | # determine installation files |
michael@12 | 180 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@12 | 181 | %{l_files_std} \ |
michael@12 | 182 | '%config %{l_prefix}/etc/dbus/*.conf' \ |
michael@77 | 183 | '%config %{l_prefix}/etc/dbus/system.d/*.conf' \ |
michael@77 | 184 | '%not %dir %{l_prefix}/lib/pkgconfig' |
michael@12 | 185 | |
michael@12 | 186 | %files -f files |
michael@12 | 187 | |
michael@12 | 188 | %clean |
michael@12 | 189 | rm -rf $RPM_BUILD_ROOT |
michael@12 | 190 | |
michael@12 | 191 | %pre |
michael@12 | 192 | # save status and stop service before upgrade |
michael@12 | 193 | [ $1 -eq 2 ] || exit 0 |
michael@12 | 194 | eval `%{l_rc} dbus status 2>/dev/null | tee %{l_tmpfile}` |
michael@12 | 195 | %{l_rc} dbus stop 2>/dev/null |
michael@12 | 196 | exit 0 |
michael@12 | 197 | |
michael@12 | 198 | %post |
michael@12 | 199 | if [ $1 -eq 2 ]; then |
michael@12 | 200 | # restore status after upgrade |
michael@12 | 201 | eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile} |
michael@12 | 202 | [ ".$dbus_active" = .yes ] && %{l_rc} dbus start |
michael@12 | 203 | fi |
michael@12 | 204 | exit 0 |
michael@12 | 205 | |
michael@12 | 206 | %preun |
michael@12 | 207 | # stop service before erase and remove run files |
michael@12 | 208 | [ $1 -eq 0 ] || exit 0 |
michael@12 | 209 | %{l_rc} dbus stop 2>/dev/null |
michael@12 | 210 | rm -f $RPM_INSTALL_PREFIX/var/dbus/run/* >/dev/null 2>&1 || true |
michael@12 | 211 | exit 0 |
michael@12 | 212 |