18
18
# except for patch macros in the setup section
19
19
#--------------------------------------------------------------------------
22
%{?single_dir_install:%define single_dir 1}
24
%define _prefix /opt/bacula
21
29
# third party packagers
22
30
%define _packager D. Scott Barninger <barninger@fairfieldcomputers.com>
23
31
%{?contrib_packager:%define _packager %{contrib_packager}}
49
58
%define blurb7 features that make it easy to find and recover lost or damaged files.
50
59
%define blurb8 Bacula source code has been released under the GPL version 2 license.
53
%define sqlite_bindir %_libdir/bacula/sqlite
61
# source directory locations
54
62
%define _docsrc ../%{name}-docs-%{docs_version}
55
63
%define _rescuesrc ../%{name}-rescue-%{_rescuever}
56
64
%define depkgs ../depkgs
68
%define _sbindir /opt/bacula
69
%define _subsysdir /opt/bacula/working
70
%define sqlite_bindir /opt/bacula/sqlite
57
71
%define _mandir /usr/share/man
59
# directory locations for FHS-compatibility
72
%define sysconf_dir /opt/bacula
73
%define script_dir /opt/bacula/scripts
74
%define working_dir /opt/bacula/working
75
%define pid_dir /opt/bacula/working
77
%define _sbindir %_prefix/sbin
78
%define _subsysdir /var/lock/subsys
79
%define sqlite_bindir %_libdir/bacula/sqlite
80
%define _mandir %_prefix/share/man
60
81
%define sysconf_dir /etc/bacula
61
82
%define script_dir %_libdir/bacula
62
83
%define working_dir /var/lib/bacula
63
84
%define pid_dir /var/run
65
87
# NOTE these defines are used in some rather complex useradd and groupadd
66
88
# commands. If you change them examine the post scripts for consequences.
249
271
# specifically disallow gconsole if desired
250
272
%{?nobuild_gconsole:%define gconsole 0}
274
# specifically disallow rescue files if desired
276
%{?nobuild_rescue:%define rescue 0}
252
278
# Should we build wxconsole, only wxWidgets >=2.6 is supported
253
279
# SuSE 10 and FC4 and newer
254
280
%define wxconsole 0
1457
1482
--disable-batch-insert \
1459
1484
--mandir=%{_mandir} \
1460
--with-subsys-dir=/var/lock/subsys \
1485
--with-subsys-dir=%{_subsysdir} \
1461
1486
--with-dir-user=%{director_daemon_user} \
1462
1487
--with-dir-group=%{daemon_group} \
1463
1488
--with-sd-user=%{storage_daemon_user} \
1510
prefix=$RPM_BUILD_ROOT/usr \
1511
sbindir=$RPM_BUILD_ROOT/usr/sbin \
1535
prefix=$RPM_BUILD_ROOT%{_prefix} \
1536
sbindir=$RPM_BUILD_ROOT%{_sbindir} \
1512
1537
sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
1513
1538
scriptdir=$RPM_BUILD_ROOT%{script_dir} \
1514
1539
working_dir=$RPM_BUILD_ROOT%{working_dir} \
1519
1544
%if ! %{client_only} && %{mtx}
1522
prefix=$RPM_BUILD_ROOT/usr \
1523
sbindir=$RPM_BUILD_ROOT/usr/sbin \
1547
prefix=$RPM_BUILD_ROOT%{_prefix} \
1548
sbindir=$RPM_BUILD_ROOT%{_sbindir} \
1524
1549
sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
1525
1550
scriptdir=$RPM_BUILD_ROOT%{script_dir} \
1526
1551
working_dir=$RPM_BUILD_ROOT%{working_dir} \
1572
1597
rm -f $RPM_BUILD_ROOT%{script_dir}/gconsole
1575
rm -f $RPM_BUILD_ROOT/usr/sbin/static-bacula-fd
1600
rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
1577
1602
# install the init scripts
1578
1603
%if %{su9} || %{su10} || %{su102} || %{su103} || %{su110}
1725
1751
touch $RPM_BUILD_ROOT%{script_dir}/rescue/linux/cdrom/rpm_release
1726
1752
cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT%{script_dir}/rescue/linux/cdrom/bacula/bin/bacula-fd
1727
1753
rm -f src/filed/static-bacula-fd
1729
1756
# install bat since make doesn't at the moment
1731
cp -p src/qt-console/bat $RPM_BUILD_ROOT/usr/sbin/bat
1758
cp -p src/qt-console/bat $RPM_BUILD_ROOT%{_sbindir}/bat
1732
1759
cp -p src/qt-console/bat.conf $RPM_BUILD_ROOT%{sysconf_dir}/bat.conf
1762
# install docs for single dir installation
1764
mkdir $RPM_BUILD_ROOT%{_prefix}/doc
1765
cp COPYING $RPM_BUILD_ROOT%{_prefix}/doc/
1766
cp ChangeLog $RPM_BUILD_ROOT%{_prefix}/doc/
1767
cp ReleaseNotes $RPM_BUILD_ROOT%{_prefix}/doc/
1768
cp VERIFYING $RPM_BUILD_ROOT%{_prefix}/doc/
1769
cp kernstodo $RPM_BUILD_ROOT%{_prefix}/doc/
1770
cp %{_docsrc}/manual/bacula.pdf $RPM_BUILD_ROOT%{_prefix}/doc/
1771
cp %{_docsrc}/developers/developers.pdf $RPM_BUILD_ROOT%{_prefix}/doc/
1772
cp -r %{_docsrc}/manual/bacula $RPM_BUILD_ROOT%{_prefix}/doc/
1773
cp ../Release_Notes-%{version}-%{release}.txt $RPM_BUILD_ROOT%{_prefix}/doc/
1735
1776
# now clean up permissions that are left broken by the install
1736
1777
chmod o-rwx $RPM_BUILD_ROOT%{working_dir}
1737
1778
%if %{gconsole} && ! %{rh8}
1738
chmod 755 $RPM_BUILD_ROOT/usr/sbin/bacula-tray-monitor
1779
chmod 755 $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor
1739
1780
chmod 644 $RPM_BUILD_ROOT%{sysconf_dir}/tray-monitor.conf
1813
1854
%attr(-, root, %{daemon_group}) %{script_dir}/delete_catalog_backup
1814
1855
%attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
1815
1856
%attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
1816
%attr(-, root, %{daemon_group}) %{script_dir}/rescue
1817
1857
%attr(-, root, %{daemon_group}) %{script_dir}/disk-changer
1818
1858
%attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-dir
1819
1859
%attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-fd
1824
1864
%attr(-, root, %{storage_daemon_group}) /etc/init.d/bacula-sd
1825
1865
%attr(-, root, %{storage_daemon_group}) %{script_dir}/mtx-changer
1827
%doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo
1828
%doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1830
1867
/etc/logrotate.d/bacula
1831
1868
/etc/log.d/scripts/services/bacula
1832
1869
%attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-dir.conf
1840
1877
%attr(-, %{storage_daemon_user}, %{daemon_group}) %dir %{working_dir}
1842
/usr/sbin/bacula-dir
1850
/usr/sbin/btraceback
1879
%{_sbindir}/bacula-dir
1880
%{_sbindir}/bacula-fd
1881
%{_sbindir}/bacula-sd
1883
%{_sbindir}/bextract
1887
%{_sbindir}/btraceback
1888
%{_sbindir}/bconsole
1856
1893
%{_mandir}/man8/bacula-fd.8.%{manpage_ext}
1857
1894
%{_mandir}/man8/bacula-dir.8.%{manpage_ext}
1858
1895
%{_mandir}/man8/bacula-sd.8.%{manpage_ext}
1868
1905
%{_mandir}/man1/bsmtp.1.%{manpage_ext}
1908
%if ! %{client_only} && %{rescue}
1909
%attr(-, root, %{daemon_group}) %{script_dir}/rescue
1912
%if ! %{client_only} && ! %{single_dir}
1913
%doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo
1914
%doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1917
%if ! %{client_only} && %{single_dir}
1873
1923
# test for bacula database older than version 9
2119
2169
%if ! %{client_only} && %{mtx}
2121
2171
%defattr(-,root,root)
2122
%attr(-, root, %{storage_daemon_group}) /usr/sbin/loaderinfo
2123
%attr(-, root, %{storage_daemon_group}) /usr/sbin/mtx
2124
%attr(-, root, %{storage_daemon_group}) /usr/sbin/scsitape
2125
%attr(-, root, %{storage_daemon_group}) /usr/sbin/tapeinfo
2126
%attr(-, root, %{storage_daemon_group}) /usr/sbin/nsmhack
2127
%attr(-, root, %{storage_daemon_group}) /usr/sbin/scsieject
2172
%attr(-, root, %{storage_daemon_group}) %{_sbindir}/loaderinfo
2173
%attr(-, root, %{storage_daemon_group}) %{_sbindir}/mtx
2174
%attr(-, root, %{storage_daemon_group}) %{_sbindir}/scsitape
2175
%attr(-, root, %{storage_daemon_group}) %{_sbindir}/tapeinfo
2176
%attr(-, root, %{storage_daemon_group}) %{_sbindir}/nsmhack
2177
%attr(-, root, %{storage_daemon_group}) %{_sbindir}/scsieject
2128
2178
%{_mandir}/man1/loaderinfo.1.%{manpage_ext}
2129
2179
%{_mandir}/man1/mtx.1.%{manpage_ext}
2130
2180
%{_mandir}/man1/scsitape.1.%{manpage_ext}
2136
2186
%defattr(-,root,root)
2137
2187
%attr(-, root, %{daemon_group}) %dir %{script_dir}
2138
%attr(-, root, %{daemon_group}) %{script_dir}/bconsole
2139
2188
%{script_dir}/bacula-ctl-fd
2140
2189
/etc/init.d/bacula-fd
2141
2191
%attr(-, root, %{daemon_group}) %{script_dir}/rescue
2143
2195
%doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo
2144
2196
%doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
2146
2201
/etc/logrotate.d/bacula
2151
2206
%attr(-, root, %{daemon_group}) %dir %{working_dir}
2154
/usr/sbin/btraceback
2208
%{_sbindir}/bacula-fd
2209
%{_sbindir}/btraceback
2155
2210
%attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
2156
2211
%attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
2212
%{_sbindir}/bconsole
2158
2213
%{_mandir}/man8/bacula-fd.8.%{manpage_ext}
2159
2214
%{_mandir}/man8/bacula.8.%{manpage_ext}
2160
2215
%{_mandir}/man8/bconsole.8.%{manpage_ext}
2232
2287
%if %{gconsole}
2233
2288
%files gconsole
2234
2289
%defattr(-,root,root)
2235
/usr/sbin/bgnome-console
2290
%{_sbindir}/bgnome-console
2236
2291
%attr(-, root, %{daemon_group}) %dir %{script_dir}
2237
2292
%attr(-, root, %{daemon_group}) %{script_dir}/gconsole
2238
2293
%attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bgnome-console.conf
2244
2299
%if %{gconsole} && ! %{rh8}
2245
/usr/sbin/bacula-tray-monitor
2300
%{_sbindir}/bacula-tray-monitor
2246
2301
%config(noreplace) %{sysconf_dir}/tray-monitor.conf
2247
2302
/usr/share/pixmaps/bacula-tray-monitor.xpm
2248
2303
/usr/share/applications/bacula-tray-monitor.desktop
2286
2341
%if %{wxconsole}
2287
2342
%files wxconsole
2288
2343
%defattr(-,root,root)
2289
/usr/sbin/bwx-console
2344
%{_sbindir}/bwx-console
2290
2345
%attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
2291
2346
%attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bwx-console.conf
2292
2347
/usr/share/pixmaps/wxwin16x16.xpm
2333
2388
%defattr(-,root,root)
2335
2390
%attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
2336
2391
%attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bat.conf
2337
2392
/usr/share/pixmaps/bat_icon.png
2432
* Sun Sep 07 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2433
- adjust /opt/bacula install
2434
- add build switch to supress rescue package
2435
* Sun Aug 24 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2436
- add support for install to /opt/bacula
2437
* Sun Aug 17 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2438
- remove libtermcap dependancy for FC9
2439
* Mon Aug 04 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2440
- fix bat dependencies
2377
2441
* Sat Jun 28 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2378
2442
- add su110 target
2379
2443
* Sat May 24 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>