Changes of Revision 9
[-] | Changed | bacula.spec |
x 1
2 daemons. 3 4 5 -%package server-mysql 6 -License: GPL v2 or later 7 -Summary: Bacula - The Network Backup Solution - server part - mysql 8 -Group: Productivity/Archiving/Backup 9 -Requires: bacula-server = %{version} 10 -Conflicts: bacula-server-postgresql 11 -AutoReqProv: on 12 - 13 -%description server-mysql 14 -Binaries of bacula services linked against mysql. 15 +#%package server-mysql 16 +#License: GPL v2 or later 17 +#Summary: Bacula - The Network Backup Solution - server part - mysql 18 +#Group: Productivity/Archiving/Backup 19 +#Requires: bacula-server = %{version} 20 +#Conflicts: bacula-server-postgresql 21 +#AutoReqProv: on 22 +# 23 +#%description server-mysql 24 +#Binaries of bacula services linked against mysql. 25 26 27 28 -%package server-postgresql 29 -License: GPL v2 or later 30 -Summary: Bacula - The Network Backup Solution - server part - postgresql 31 -Group: Productivity/Archiving/Backup 32 -Requires: bacula-server = %{version} 33 -Conflicts: bacula-server-mysql 34 -AutoReqProv: on 35 +#%package server-postgresql 36 +#License: GPL v2 or later 37 +#Summary: Bacula - The Network Backup Solution - server part - postgresql 38 +#Group: Productivity/Archiving/Backup 39 +#Requires: bacula-server = %{version} 40 +#Conflicts: bacula-server-mysql 41 +#AutoReqProv: on 42 43 -%description server-postgresql 44 -Binaries of bacula services linked against postgresql. 45 +#%description server-postgresql 46 +#Binaries of bacula services linked against postgresql. 47 48 49 50
51 52 %build 53 touch platforms/suse/bacula.spec.in 54 + 55 %install 56 -Build() { 57 +#Build() { 58 CFLAGS="-fno-strict-aliasing $RPM_OPT_FLAGS $(ncurses5-config --cflags)" LDFLAGS="-L/usr/%{_lib}/mysql $(ncurses5-config --libs)" ./configure \ 59 --prefix=%{_prefix} \ 60 --libexecdir=%{_libdir} \ 61
62 --enable-readline \ 63 --with-readline=%{_prefix} \ 64 --enable-shared \ 65 + --with-mysql --with-postgresql 66 "$@" 67 -} 68 +#} 69 # build mysql version 70 -Build --with-mysql --with-postgresql=no 71 +#Build --with-mysql --with-postgresql=no 72 # ##make CFLAGS="$RPM_OPT_FLAGS" 73 %{__make} 74 make DESTDIR=$RPM_BUILD_ROOT install 75 ##mv $RPM_BUILD_ROOT%{_sbindir}/bacula-sd $RPM_BUILD_ROOT%{_sbindir}/bacula-sd.mysql 76 -mv $RPM_BUILD_ROOT%{_sbindir}/bacula-dir $RPM_BUILD_ROOT%{_sbindir}/bacula-dir.mysql 77 +#mv $RPM_BUILD_ROOT%{_sbindir}/bacula-dir $RPM_BUILD_ROOT%{_sbindir}/bacula-dir.mysql 78 ##mv $RPM_BUILD_ROOT%{_sbindir}/bcopy $RPM_BUILD_ROOT%{_sbindir}/bcopy.mysql 79 -mv $RPM_BUILD_ROOT%{_sbindir}/bscan $RPM_BUILD_ROOT%{_sbindir}/bscan.mysql 80 +#mv $RPM_BUILD_ROOT%{_sbindir}/bscan $RPM_BUILD_ROOT%{_sbindir}/bscan.mysql 81 82 # build postgresql version 83 -%{__make} clean 84 -Build --with-postgresql --with-mysql=no 85 -# ##make CFLAGS="$RPM_OPT_FLAGS" 86 -%{__make} 87 -make DESTDIR=$RPM_BUILD_ROOT install 88 -#mv $RPM_BUILD_ROOT%{_sbindir}/bacula-sd $RPM_BUILD_ROOT%{_sbindir}/bacula-sd.postgresql 89 -mv $RPM_BUILD_ROOT%{_sbindir}/bacula-dir $RPM_BUILD_ROOT%{_sbindir}/bacula-dir.postgresql 90 -#mv $RPM_BUILD_ROOT%{_sbindir}/bcopy $RPM_BUILD_ROOT%{_sbindir}/bcopy.postgresql 91 -mv $RPM_BUILD_ROOT%{_sbindir}/bscan $RPM_BUILD_ROOT%{_sbindir}/bscan.postgresql 92 +#%{__make} clean 93 +#Build --with-postgresql --with-mysql=no 94 +## ##make CFLAGS="$RPM_OPT_FLAGS" 95 +#%{__make} 96 +#make DESTDIR=$RPM_BUILD_ROOT install 97 +##mv $RPM_BUILD_ROOT%{_sbindir}/bacula-sd $RPM_BUILD_ROOT%{_sbindir}/bacula-sd.postgresql 98 +#mv $RPM_BUILD_ROOT%{_sbindir}/bacula-dir $RPM_BUILD_ROOT%{_sbindir}/bacula-dir.postgresql 99 +##mv $RPM_BUILD_ROOT%{_sbindir}/bcopy $RPM_BUILD_ROOT%{_sbindir}/bcopy.postgresql 100 +#mv $RPM_BUILD_ROOT%{_sbindir}/bscan $RPM_BUILD_ROOT%{_sbindir}/bscan.postgresql 101 102 # build nagios plugin 103 PREDIR=`pwd` 104
105 /sbin/service bacula-sd restart || : 106 %endif 107 108 -%post server-mysql 109 -if [ -f %{_sbindir}/bacula-dir.mysql ] ;then 110 -ln -sf %{_sbindir}/bacula-dir.mysql %{_sbindir}/bacula-dir 111 -ln -sf %{_libdir}/libbaccats-mysql-%{_sover}.so %{_libdir}/libbaccats-%{_sover}.so 112 -ln -sf %{_libdir}/libbaccats-%{_sover}.so %{_libdir}/libbaccats.so 113 -fi 114 -if [ -f %{_sbindir}/bscan.mysql ] ; then 115 -ln -sf %{_sbindir}/bscan.mysql %{_sbindir}/bscan 116 -fi 117 - 118 - 119 -%post server-postgresql 120 -if [ -f %{_sbindir}/bacula-dir.postgresql ] ;then 121 -ln -sf %{_sbindir}/bacula-dir.postgresql %{_sbindir}/bacula-dir 122 -ln -sf %{_libdir}/libbaccats-postgresql-%{_sover}.so %{_libdir}/libbaccats-%{_sover}.so 123 -ln -sf %{_libdir}/libbaccats-%{_sover}.so %{_libdir}/libbaccats.so 124 -fi 125 -if [ -f %{_sbindir}/bscan.postgresql ] ; then 126 -ln -sf %{_sbindir}/bscan.postgresql %{_sbindir}/bscan 127 -fi 128 - 129 - 130 -%postun server-mysql 131 -%if 0%{?suse_version} 132 -%restart_on_update bacula-dir bacula-sd 133 -%else 134 -/sbin/service bacula-dir restart || : 135 -/sbin/service bacula-sd restart || : 136 -%endif 137 - 138 -%postun server-postgresql 139 -%if 0%{?suse_version} 140 -%restart_on_update bacula-dir bacula-sd 141 -%else 142 -/sbin/service bacula-dir restart || : 143 -/sbin/service bacula-sd restart || : 144 -%endif 145 - 146 -%preun server-mysql 147 -if [ $1 == 0 ] ; then 148 -rm -f %{_sbindir}/bacula-dir 149 -##rm -f %{_sbindir}/bacula-sd 150 -fi 151 - 152 -%preun server-postgresql 153 -if [ $1 == 0 ] ; then 154 -rm -f %{_sbindir}/bacula-dir 155 -##rm -f %{_sbindir}/bacula-sd 156 -fi 157 +#%post server-mysql 158 +#if [ -f %{_sbindir}/bacula-dir.mysql ] ;then 159 +#ln -sf %{_sbindir}/bacula-dir.mysql %{_sbindir}/bacula-dir 160 +#ln -sf %{_libdir}/libbaccats-mysql-%{_sover}.so %{_libdir}/libbaccats-%{_sover}.so 161 +#ln -sf %{_libdir}/libbaccats-%{_sover}.so %{_libdir}/libbaccats.so 162 +#fi 163 +#if [ -f %{_sbindir}/bscan.mysql ] ; then 164 +#ln -sf %{_sbindir}/bscan.mysql %{_sbindir}/bscan 165 +#fi 166 +# 167 +# 168 +#%post server-postgresql 169 +#if [ -f %{_sbindir}/bacula-dir.postgresql ] ;then 170 +#ln -sf %{_sbindir}/bacula-dir.postgresql %{_sbindir}/bacula-dir 171 +#ln -sf %{_libdir}/libbaccats-postgresql-%{_sover}.so %{_libdir}/libbaccats-%{_sover}.so 172 +#ln -sf %{_libdir}/libbaccats-%{_sover}.so %{_libdir}/libbaccats.so 173 +#fi 174 +#if [ -f %{_sbindir}/bscan.postgresql ] ; then 175 +#ln -sf %{_sbindir}/bscan.postgresql %{_sbindir}/bscan 176 +#fi 177 + 178 + 179 +#%postun server-mysql 180 +#%if 0%{?suse_version} 181 +#%restart_on_update bacula-dir bacula-sd 182 +#%else 183 +#/sbin/service bacula-dir restart || : 184 +#/sbin/service bacula-sd restart || : 185 +#%endif 186 +# 187 +#%postun server-postgresql 188 +#%if 0%{?suse_version} 189 +#%restart_on_update bacula-dir bacula-sd 190 +#%else 191 +#/sbin/service bacula-dir restart || : 192 +#/sbin/service bacula-sd restart || : 193 +#%endif 194 + 195 +#%preun server-mysql 196 +#if [ $1 == 0 ] ; then 197 +#rm -f %{_sbindir}/bacula-dir 198 +###rm -f %{_sbindir}/bacula-sd 199 +#fi 200 + 201 |
||
[+] | Added | bacula.spec.bac ^ |
@@ -0,0 +1,509 @@ +# +# spec file for package bacula (Version 5.2.12) +# +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +%define pkgversion 5.2.12 + +Name: bacula +%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services +BuildRequires: gcc-c++ libacl-devel mysql-devel openssl-devel readline-devel xorg-x11-devel bc procps iputils postgresql-devel + +%if 0%{?suse_version} +BuildRequires: tcpd-devel postgresql-libs termcap +%endif + +%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version} +BuildRequires: tcp_wrappers libtermcap-devel +%endif + +%if 0%{?fedora_version} >= 7 || 0%{?rhel_version} >= 600 || 0%{?sl_version} >= 600 || 0%{?centos_version} >= 6 +BuildRequires: tcp_wrappers-devel +%endif + +%define _libver 5_2_12 +%define _sover 5.2.12 + +License: GPL v2 or later +Group: Productivity/Archiving/Backup +AutoReqProv: on +Version: 5.2.12 +Release: 1 +Summary: Bacula--The Network Backup Solution: Client Part +Url: http://www.bacula.org +Source0: %{name}-%{pkgversion}.tar.bz2 +%if 0%{?suse_version} +Source10: bacula-dir.init +Source11: bacula-fd.init +Source12: bacula-sd.init +%endif + +%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version} +Source10: bacula-dir.init.rh +Source11: bacula-fd.init.rh +Source12: bacula-sd.init.rh +%endif + +Source20: bacula-dir.fw +Source21: bacula-fd.fw +Source22: bacula-sd.fw +Source50: bacula-rpmlintrc +Patch1: %{name}-2.4.4-python.diff +Patch3: bacula-compress-man.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +Bacula comes by night and sucks the vital essence from your computers. +Bacula is a set of computer programs that permit you (or the system +administrator) to manage backup, recovery, and verification of computer +data across a network of computers of different kinds. In technical +terms, it is a network client/server-based backup program. Bacula is +relatively easy to use and efficient, while offering many advanced +storage management features that make it easy to find and recover lost +or damaged files. + + + +%package server +License: GPL v2 or later +Summary: Bacula - The Network Backup Solution - server part +Group: Productivity/Archiving/Backup +Requires: bacula = %{version} +AutoReqProv: off + +%description server +Bacula - It comes by night and sucks the vital essence from your +computers. Bacula is a set of computer programs that permit you (or the +system administrator) to manage backup, recovery, and verification of +computer data across a network of computers of different kinds. In +technical terms, it is a network client/server based backup program. +Bacula is relatively easy to use and efficient, while offering many +advanced storage management features that make it easy to find and +recover lost or damaged files. This package contains Bacula server +daemons. + + +%package server-mysql +License: GPL v2 or later +Summary: Bacula - The Network Backup Solution - server part - mysql +Group: Productivity/Archiving/Backup +Requires: bacula-server = %{version} +Conflicts: bacula-server-postgresql +AutoReqProv: on + +%description server-mysql +Binaries of bacula services linked against mysql. + + + +%package server-postgresql +License: GPL v2 or later +Summary: Bacula - The Network Backup Solution - server part - postgresql +Group: Productivity/Archiving/Backup +Requires: bacula-server = %{version} +Conflicts: bacula-server-mysql +AutoReqProv: on + +%description server-postgresql +Binaries of bacula services linked against postgresql. + + + +%package devel +Summary: Bacula devel files +Group: Productivity/Archiving/Backup +Requires: libbac-%{_libver} = %{version} +Requires: libbaccfg-%{_libver} = %{version} +Requires: libbacfind-%{_libver} = %{version} +Requires: libbacpy-%{_libver} = %{version} +Requires: libbacsql-%{_libver} = %{version} +Requires: ncurses-devel +%if 0%{?suse_version} +Requires: tcpd-devel +%endif +Requires: postgresql-devel +Requires: glibc-devel + +%description devel + +%package -n libbaccats-%{_libver} +Summary: Bacula catalog library +Group: Productivity/Archiving/Backup + +%description -n libbaccats-%{_libver} + +%package -n libbac-%{_libver} +Summary: Bacula library +Group: Productivity/Archiving/Backup + +%description -n libbac-%{_libver} + +%package -n libbaccfg-%{_libver} +Summary: Bacula config library +Group: Productivity/Archiving/Backup + +%description -n libbaccfg-%{_libver} + +%package -n libbacfind-%{_libver} +Summary: Bacula find library +Group: Productivity/Archiving/Backup + +%description -n libbacfind-%{_libver} + +%package -n libbacpy-%{_libver} +Summary: Bacula python library +Group: Productivity/Archiving/Backup + +%description -n libbacpy-%{_libver} + +%package -n libbacsql-%{_libver} +Summary: Bacula sql library +Group: Productivity/Archiving/Backup + +%description -n libbacsql-%{_libver} + +%package -n nagios-plugins-bacula +Summary: Bacula nagios plugins +Group: Productivity/Archiving/Backup + +%description -n nagios-plugins-bacula +Nagios/Icinga plugins to check bacula. + +%prep +%setup -q -n %{name}-%{pkgversion} +%patch1 +%patch3 + +%build +touch platforms/suse/bacula.spec.in +%install +Build() { +CFLAGS="-fno-strict-aliasing $RPM_OPT_FLAGS $(ncurses5-config --cflags)" LDFLAGS="-L/usr/%{_lib}/mysql $(ncurses5-config --libs)" ./configure \ + --prefix=%{_prefix} \ + --libexecdir=%{_libdir} \ + --sbindir=%{_sbindir} \ + --bindir=%{_bindir} \ |