66 |
66 |
67 %prep |
67 %prep |
68 %setup -q |
68 %setup -q |
69 %patch -p0 |
69 %patch -p0 |
70 |
70 |
71 # adjust filesystem layout |
71 # correct build configuration logic |
72 %{l_shtool} subst \ |
72 %{l_shtool} subst \ |
73 -e 's;^\(cat[^|]*|\).*;\1 sed -e "s/\\(<listen>unix:tmpdir=\\)\[^<\]\*/\\1\\/tmp/" | \\;' \ |
73 -e 's;^\(cat[^|]*|\).*;\1 sed -e "s/\\(<listen>unix:tmpdir=\\)\[^<\]\*/\\1\\/tmp/" | \\;' \ |
74 -e 's;#! /bin/bash;#!%{l_bash};' \ |
74 -e 's;#! /bin/bash;#!%{l_bash};' \ |
75 tools/run-with-tmp-session-bus.sh |
75 tools/run-with-tmp-session-bus.sh |
76 %{l_shtool} subst \ |
76 %{l_shtool} subst \ |
77 -e 's;/dbus-1\.0;;g' \ |
77 -e 's;/dbus-1\.0;;g' \ |
|
78 -e 's;/dbus-1;;g' \ |
78 -e 's;dbus-1;dbus;g' \ |
79 -e 's;dbus-1;dbus;g' \ |
79 -e 's;\(-I\${libdir}\).*;\1/dbus/include;g' \ |
80 -e 's;\(-I\${libdir}\).*;\1/dbus/include;g' \ |
|
81 -e 's;\(-I\${includedir}\).*;\1/dbus;g' \ |
80 dbus-1.pc.in |
82 dbus-1.pc.in |
81 %{l_shtool} subst \ |
83 %{l_shtool} subst \ |
|
84 -e 's;/dbus-1\.0;;g' \ |
|
85 dbus/Makefile.in |
|
86 %{l_shtool} subst \ |
82 -e 's;-1\.la;.la;g' \ |
87 -e 's;-1\.la;.la;g' \ |
83 test/name-test/Makefile.in dbus/Makefile.in tools/Makefile.in |
88 dbus/Makefile.in tools/Makefile.in |
84 %{l_shtool} subst \ |
89 %{l_shtool} subst \ |
85 -e 's;/dbus-1\.0;;g' \ |
|
86 -e 's;/dbus-1;;g' \ |
90 -e 's;/dbus-1;;g' \ |
87 dbus/Makefile.in tools/Makefile.in bus/Makefile.in bus/session.conf.in bus/dbus-daemon.1.in |
91 configure |
|
92 %{l_shtool} subst \ |
|
93 -e 's;/*dbus-1;;g' \ |
|
94 dbus/Makefile.in \ |
|
95 tools/Makefile.in \ |
|
96 bus/Makefile.in \ |
|
97 bus/dbus-daemon.1.in \ |
|
98 bus/config-parser.c \ |
|
99 dbus/dbus-sysdeps-unix.c |
88 %{l_shtool} subst \ |
100 %{l_shtool} subst \ |
89 -e 's;\(\$(localstatedir)/run\)/dbus;\1;g' \ |
101 -e 's;\(\$(localstatedir)/run\)/dbus;\1;g' \ |
90 bus/Makefile.in |
102 bus/Makefile.in |
91 %{l_shtool} subst \ |
103 %{l_shtool} subst \ |
92 -e 's;^\(dbusarchincludedir *= *\$(libdir)\)\(/include/dbus\);\1/dbus\2;g' \ |
104 -e 's;^\(dbusarchincludedir *= *\$(libdir)\)\(/include/dbus\);\1/dbus\2;g' \ |
93 dbus/Makefile.in |
105 dbus/Makefile.in |
94 %{l_shtool} subst \ |
|
95 -e 's;^\(LIBTOOL=.\)[^\ ]*;\1/bin/sh;' \ |
|
96 configure |
|
97 |
106 |
98 # platform specific fixes |
107 # platform specific fixes |
99 case "%{l_platform -t}" in |
108 case "%{l_platform -t}" in |
100 *-sunos* ) |
109 *-sunos* ) |
101 %{l_shtool} subst \ |
|
102 -e 's;readdir_r;__posix_readdir_r;' \ |
|
103 dbus/dbus-sysdeps-util-unix.c |
|
104 %{l_shtool} subst \ |
110 %{l_shtool} subst \ |
105 -e 's;^\(Libs: -L\${libdir} -ldbus[^ ]*\);\1 -lsocket -lnsl;' \ |
111 -e 's;^\(Libs: -L\${libdir} -ldbus[^ ]*\);\1 -lsocket -lnsl;' \ |
106 dbus-1.pc.in |
112 dbus-1.pc.in |
107 ;; |
113 ;; |
108 esac |
114 esac |
151 %{l_make} %{l_mflags -O} |
157 %{l_make} %{l_mflags -O} |
152 |
158 |
153 %install |
159 %install |
154 # install package |
160 # install package |
155 rm -rf $RPM_BUILD_ROOT |
161 rm -rf $RPM_BUILD_ROOT |
156 %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" |
162 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
157 |
163 |
158 # strip down package |
164 # strip binaries of symbols |
159 strip $RPM_BUILD_ROOT%{l_prefix}/lib/dbus/bin/* >/dev/null 2>&1 || true |
165 strip $RPM_BUILD_ROOT%{l_prefix}/lib/dbus/bin/* >/dev/null 2>&1 || true |
160 |
166 strip $RPM_BUILD_ROOT%{l_prefix}/libexec/dbus/bin/* >/dev/null 2>&1 || true |
161 # install run-command script |
167 |
|
168 # correct the installation hierarchy |
|
169 mv $RPM_BUILD_ROOT%{l_prefix}/share/man \ |
|
170 $RPM_BUILD_ROOT%{l_prefix}/ |
|
171 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share |
|
172 |
|
173 # install runcommand script |
162 %{l_shtool} mkdir -f -p -m 755 \ |
174 %{l_shtool} mkdir -f -p -m 755 \ |
163 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d |
175 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d |
164 %{l_shtool} install -c -m 755 %{l_value -s -a} \ |
176 %{l_shtool} install -c -m 755 %{l_value -s -a} \ |
165 %{SOURCE rc.dbus} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
177 %{SOURCE rc.dbus} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
166 |
178 |