| 60 # build information |
60 # build information |
| 61 Prefix: %{l_prefix} |
61 Prefix: %{l_prefix} |
| 62 BuildRoot: %{l_buildroot} |
62 BuildRoot: %{l_buildroot} |
| 63 BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, gcc::with_cxx = yes |
63 BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, gcc::with_cxx = yes |
| 64 PreReq: OpenPKG, openpkg >= 20060823 |
64 PreReq: OpenPKG, openpkg >= 20060823 |
| 65 BuildPreReq: readline, zlib |
65 BuildPreReq: ncurses, readline, zlib |
| 66 PreReq: readline, zlib |
66 PreReq: ncurses, readline, zlib |
| 67 %if "%{with_ssl}" == "yes" |
67 %if "%{with_ssl}" == "yes" |
| 68 BuildPreReq: openssl >= 0.9.8 |
68 BuildPreReq: openssl >= 0.9.8 |
| 69 PreReq: openssl >= 0.9.8 |
69 PreReq: openssl >= 0.9.8 |
| 70 %endif |
70 %endif |
| 71 %if "%{with_wrap}" == "yes" |
71 %if "%{with_wrap}" == "yes" |
| 127 # for the same reason remove version informations from config files |
127 # for the same reason remove version informations from config files |
| 128 %{l_shtool} subst \ |
128 %{l_shtool} subst \ |
| 129 -e "s;For Bacula release @VERSION@ .*;;" \ |
129 -e "s;For Bacula release @VERSION@ .*;;" \ |
| 130 `find . -name "*.conf.in"` |
130 `find . -name "*.conf.in"` |
| 131 |
131 |
| |
132 # help specific platforms find fdatasync(3) |
| |
133 libs="" |
| |
134 case "%{l_platform -t}" in |
| |
135 *-sunos* ) libs="-lrt" ;; |
| |
136 esac |
| |
137 |
| 132 # use localhost as default host |
138 # use localhost as default host |
| 133 %{l_shtool} subst \ |
139 %{l_shtool} subst \ |
| 134 -e 's;hostname=.*;hostname=localhost;g' \ |
140 -e 's;hostname=.*;hostname=localhost;g' \ |
| |
141 -e 's;\(CONS_LIBS="-lreadline.*\)-ltermcap;\1-lncurses;g' \ |
| 135 configure |
142 configure |
| 136 |
143 |
| 137 # configure |
144 # configure |
| 138 LIBS= |
145 LIBS= |
| 139 case "%{l_platform -t}" in |
146 case "%{l_platform -t}" in |
| 140 *-linux*) LIBS="-L/usr/lib/termcap";; |
147 *-linux*) LIBS="-L/usr/lib/termcap";; |
| 141 esac |
148 esac |
| 142 CC="%{l_cc}" \ |
149 CC="%{l_cc}" \ |
| 143 CFLAGS="%{l_cflags -O}" \ |
150 CFLAGS="%{l_cflags -O}" \ |
| 144 CPPFLAGS="%{l_cppflags}" \ |
151 CPPFLAGS="%{l_cppflags ncurses}" \ |
| 145 LDFLAGS="%{l_ldflags} $LIBS" \ |
152 LDFLAGS="%{l_ldflags} $LIBS" \ |
| |
153 LIBS="$libs" \ |
| 146 ./configure \ |
154 ./configure \ |
| 147 --prefix=%{l_prefix} \ |
155 --prefix=%{l_prefix} \ |
| 148 --with-dir-user=%{l_rusr} \ |
156 --with-dir-user=%{l_rusr} \ |
| 149 --with-dir-group=%{l_rgrp} \ |
157 --with-dir-group=%{l_rgrp} \ |
| 150 --with-sd-user=%{l_rusr} \ |
158 --with-sd-user=%{l_rusr} \ |
| 181 %if "%{with_python}" == "yes" || "%{with_dvd}" == "yes" |
189 %if "%{with_python}" == "yes" || "%{with_dvd}" == "yes" |
| 182 --with-python=%{l_prefix} \ |
190 --with-python=%{l_prefix} \ |
| 183 %endif |
191 %endif |
| 184 --enable-wx-console=no \ |
192 --enable-wx-console=no \ |
| 185 --sysconfdir=%{l_prefix}/etc/bacula \ |
193 --sysconfdir=%{l_prefix}/etc/bacula \ |
| |
194 --libexecdir=%{l_prefix}/libexec/bacula \ |
| 186 --mandir=%{l_prefix}/man \ |
195 --mandir=%{l_prefix}/man \ |
| 187 --with-scriptdir=%{l_prefix}/libexec/bacula \ |
196 --with-scriptdir=%{l_prefix}/libexec/bacula \ |
| 188 --with-working-dir=%{l_prefix}/var/bacula \ |
197 --with-working-dir=%{l_prefix}/var/bacula \ |
| 189 --with-pid-dir=%{l_prefix}/var/bacula/run \ |
198 --with-pid-dir=%{l_prefix}/var/bacula/run \ |
| 190 --with-subsys-dir=%{l_prefix}/var/bacula/run/subsys \ |
199 --with-subsys-dir=%{l_prefix}/var/bacula/run/subsys \ |
| |
200 --with-archivedir=/tmp \ |
| |
201 --with-sbin-perm=0755 \ |
| 191 --disable-nls |
202 --disable-nls |
| 192 |
203 |
| 193 # build |
204 # build |
| 194 %{l_make} %{l_mflags -O} |
205 %{l_make} %{l_mflags -O} |
| 195 |
206 |
| 215 |
226 |
| 216 # install |
227 # install |
| 217 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
228 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
| 218 |
229 |
| 219 # strip down installation |
230 # strip down installation |
| 220 # do not strip binaries, to make it easier to diagnose problems |
231 strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true |
| 221 # strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true |
|
| 222 ( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula && |
232 ( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula && |
| 223 for unwanted in bconsole startmysql stopmysql; do |
233 for unwanted in startmysql stopmysql; do |
| 224 rm -f $unwanted |
234 rm -f $unwanted |
| 225 done |
235 done |
| 226 ) || exit $? |
236 ) || exit $? |
| 227 |
237 |
| 228 # install additional files |
238 # install additional files |
| 229 %{l_shtool} install -c -m 754 %{l_value -s -a} \ |
239 %{l_shtool} install -c -m 754 %{l_value -s -a} \ |
| 230 %{SOURCE bexec.sh} $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec |
240 %{SOURCE bexec.sh} $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec |
| 231 |
241 %{l_shtool} install -c -m 640 \ |
| 232 # wrap binaries to avoid to specify "-c" for each run |
242 src/console/bconsole.conf $RPM_BUILD_ROOT%{l_prefix}/etc/bacula/ |
| 233 ( cd $RPM_BUILD_ROOT%{l_prefix}/sbin |
243 |
| 234 for bin in bacula-dir bacula-fd bacula-sd \ |
244 ## wrap binaries to avoid to specify "-c" for each run |
| 235 bconsole bcopy bextract bls bscan dbcheck \ |
245 #( cd $RPM_BUILD_ROOT%{l_prefix}/sbin |
| 236 tray-monitor wx-console; do |
246 # for bin in bacula-dir bacula-fd bacula-sd \ |
| 237 if [ -x $bin ]; then |
247 # bconsole bcopy bextract bls bscan dbcheck \ |
| 238 mv $bin $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula |
248 # tray-monitor wx-console; do |
| 239 ln $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec ./$bin |
249 # if [ -x $bin ]; then |
| 240 fi |
250 # mv $bin $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula |
| 241 done |
251 # ln $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec ./$bin |
| 242 ) || exit $? |
252 # fi |
| |
253 # done |
| |
254 #) || exit $? |
| 243 |
255 |
| 244 # install run-command script |
256 # install run-command script |
| 245 %{l_shtool} install -c -m 755 %{l_value -s -a} \ |
257 %{l_shtool} install -c -m 755 %{l_value -s -a} \ |
| 246 -e 's,@with_server@,%{with_server},g' \ |
258 -e 's,@with_server@,%{with_server},g' \ |
| 247 %{SOURCE rc.bacula} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
259 %{SOURCE rc.bacula} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |