Logoj0ke.net Open Build Service > Projects > home:jg:backup > amanda > Changes
Sign Up | Log In

Changes of Revision 16

[-] Added amanda.spec
x
 
1
@@ -0,0 +1,977 @@
2
+%define _libexecdir %{_libdir}
3
+%{!?defconfig:%define defconfig DailySet1}
4
+%{!?indexserver:%define indexserver amandahost}
5
+%{!?tapeserver:%define tapeserver %{indexserver}}
6
+%{!?amanda_user:%define amanda_user amandabackup}
7
+%{!?amanda_group:%define amanda_group disk}
8
+
9
+Summary: A network-capable tape backup solution
10
+Name: amanda
11
+Version: 3.3.0
12
+Release: 16.1
13
+Source: http://downloads.sourceforge.net/amanda/amanda-%%{version}.tar.gz
14
+Source1: amanda.crontab
15
+Source4: disklist
16
+Source5: amanda-xinetd
17
+Source8: amandahosts
18
+Patch2: amanda-3.1.1-xattrs.patch
19
+Patch3: amanda-3.1.1-tcpport.patch
20
+Patch6: amanda-3.2.0-config-dir.patch
21
+Patch7: amanda-3.3.0-qw.patch
22
+Patch8: amanda-3.3.0-match_disk.patch
23
+Patch9: amanda-3.3.0-glib.patch
24
+License: BSD and GPLv3+ and GPLv2+ and GPLv2
25
+Group: Applications/System
26
+URL: http://www.amanda.org
27
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
28
+BuildRequires: automake autoconf libtool
29
+BuildRequires: dump gnuplot cups samba-client tar grep fileutils
30
+BuildRequires: gcc-c++ readline-devel
31
+BuildRequires: krb5-devel rsh openssh-clients ncompress mtx mt-st
32
+BuildRequires: perl-devel perl(ExtUtils::Embed) perl(Test::Simple)
33
+BuildRequires: glib2-devel openssl-devel swig bison flex
34
+BuildRequires: libcurl-devel
35
+Requires(pre): shadow-utils
36
+Requires(post): grep sed
37
+Requires: fileutils grep initscripts tar /bin/mail xinetd
38
+Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
39
+Obsoletes: amanda-devel < 2.6.1p2-5
40
+Provides: amanda-devel = 2.6.1p2-5
41
+
42
+%global __perl_provides /bin/sh -c "/usr/lib/rpm/perl.prov | grep -v \\\"perl(Math::BigInt)\\\""
43
+
44
+%description 
45
+AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a
46
+backup system that allows the administrator of a LAN to set up a
47
+single master backup server to back up multiple hosts to one or more
48
+tape drives or disk files.  AMANDA uses native dump and/or GNU tar
49
+facilities and can back up a large number of workstations running
50
+multiple versions of Unix.  Newer versions of AMANDA (including this
51
+version) can use SAMBA to back up Microsoft(TM) Windows95/NT hosts.
52
+The amanda package contains the core AMANDA programs and will need to
53
+be installed on both AMANDA clients and AMANDA servers.  Note that you
54
+will have to install the amanda-client and/or amanda-server packages as
55
+well.
56
+
57
+%package client
58
+Summary: The client component of the AMANDA tape backup system
59
+Group: Applications/System
60
+Requires: fileutils grep /sbin/service
61
+Requires(pre): amanda = %{version}-%{release}
62
+
63
+%description client
64
+The Amanda-client package should be installed on any machine that will
65
+be backed up by AMANDA (including the server if it also needs to be
66
+backed up).  You will also need to install the amanda package on each
67
+AMANDA client machine.
68
+
69
+%package server
70
+Summary: The server side of the AMANDA tape backup system
71
+Group: Applications/System
72
+Requires: fileutils grep /sbin/service
73
+Requires(pre): amanda = %{version}-%{release}
74
+
75
+%description server
76
+The amanda-server package should be installed on the AMANDA server,
77
+the machine attached to the device(s) (such as a tape drive) where backups
78
+will be written. You will also need to install the amanda package on
79
+the AMANDA server machine.  And, if the server is also to be backed up, the
80
+server also needs to have the amanda-client package installed.
81
+
82
+%prep
83
+%setup -q -n %{name}-%{version}
84
+%patch2 -p1 -b .xattrs
85
+%patch3 -p1 -b .tcpport
86
+%patch6 -p1 -b .config
87
+%patch7 -p3 -b .qw
88
+%patch8 -p3 -b .match_disk
89
+%patch9 -p2 -b .glib
90
+./autogen
91
+
92
+%build
93
+export MAILER=/bin/mail CFLAGS="$RPM_OPT_FLAGS -fPIE" LDFLAGS=-pie
94
+
95
+%configure --enable-shared \
96
+           --disable-rpath \
97
+           --disable-static \
98
+           --disable-dependency-tracking \
99
+           --disable-installperms \
100
+           --with-amdatadir=%{_localstatedir}/lib/amanda \
101
+           --with-amlibdir=%{_libdir} \
102
+           --with-amperldir=%{perl_vendorarch} \
103
+           --with-index-server=%{indexserver} \
104
+           --with-tape-server=%{tapeserver} \
105
+           --with-config=%{defconfig} \
106
+           --with-gnutar-listdir=%{_localstatedir}/lib/amanda/gnutar-lists \
107
+           --with-smbclient=%{_bindir}/smbclient \
108
+           --with-amandates=%{_localstatedir}/lib/amanda/amandates \
109
+           --with-amandahosts \
110
+           --with-user=%amanda_user \
111
+           --with-group=%amanda_group \
112
+           --with-tmpdir=/var/log/amanda \
113
+           --with-gnutar=/bin/tar \
114
+           --with-ssh-security \
115
+           --with-rsh-security \
116
+           --with-bsdtcp-security \
117
+           --with-bsdudp-security \
118
+           --with-krb5-security
119
+        
120
+make %{?_smp_mflags}
121
+
122
+
123
+%install
124
+rm -rf ${RPM_BUILD_ROOT}
125
+
126
+make install BINARY_OWNER=%(id -un) SETUID_GROUP=%(id -gn) DESTDIR=$RPM_BUILD_ROOT
127
+
128
+mkdir -p $RPM_BUILD_ROOT/etc/amanda
129
+mkdir -p $RPM_BUILD_ROOT/etc/xinetd.d
130
+cp %SOURCE5 $RPM_BUILD_ROOT/etc/xinetd.d/amanda
131
+chmod 644 $RPM_BUILD_ROOT/etc/xinetd.d/amanda
132
+mkdir -p $RPM_BUILD_ROOT/var/log/amanda
133
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/amanda
134
+install -m 600 %SOURCE8 $RPM_BUILD_ROOT%{_localstatedir}/lib/amanda/.amandahosts
135
+
136
+ln -s %{_libexecdir}/amanda/amandad $RPM_BUILD_ROOT%{_sbindir}/amandad
137
+ln -s amrecover.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/amoldrecover.8
138
+
139
+pushd ${RPM_BUILD_ROOT}
140
+  mv .%{_localstatedir}/lib/amanda/example .%{_sysconfdir}/amanda/%defconfig
141
+  cp ${RPM_SOURCE_DIR}/amanda.crontab .%{_sysconfdir}/amanda/crontab.sample
142
+  cp ${RPM_SOURCE_DIR}/disklist .%{_sysconfdir}/amanda/%defconfig
143
+  cp ${RPM_SOURCE_DIR}/disklist .%{_sysconfdir}/amanda/%defconfig
144
+  rm -f .%{_sysconfdir}/amanda/%defconfig/xinetd*
145
+  rm -f .%{_sysconfdir}/amanda/%defconfig/inetd*
146
+
147
+  mkdir -p .%{_localstatedir}/lib/amanda/gnutar-lists
148
+  mkdir -p .%{_localstatedir}/lib/amanda/%defconfig/index
149
+  touch .%{_localstatedir}/lib/amanda/amandates
150
+popd
151
+rm -rf $RPM_BUILD_ROOT/usr/share/amanda
152
+find $RPM_BUILD_ROOT -name \*.la | xargs rm
153
+
154
+%check
155
+make check
156
+
157
+%clean 
158
+rm -rf ${RPM_BUILD_ROOT}
159
+
160
+%pre
161
+/usr/sbin/useradd -M -N -g %amanda_group -o -r -d %{_localstatedir}/lib/amanda -s /bin/bash \
162
+        -c "Amanda user" -u 33 %amanda_user >/dev/null 2>&1 || :
163
+/usr/bin/gpasswd -a %amanda_user tape >/dev/null 2>&1 || :
164
+
165
+%post
166
+/sbin/ldconfig
167
+[ -f /var/lock/subsys/xinetd ] && /sbin/service xinetd reload > /dev/null 2>&1 || :
168
+
169
+%postun
170
+/sbin/ldconfig
171
+[ -f /var/lock/subsys/xinetd ] && /sbin/service xinetd reload > /dev/null 2>&1 || :
172
+
173
+%post client -p /sbin/ldconfig
174
+
175
+%post server -p /sbin/ldconfig
176
+
177
+%postun client -p /sbin/ldconfig
178
+
179
+%postun server -p /sbin/ldconfig
180
+
181
+%files
182
+%defattr(-,root,root)
183
+%doc COPYRIGHT* NEWS README
184
+%config(noreplace) /etc/xinetd.d/amanda
185
+
186
+%{_libdir}/libamanda-*.so
187
+%{_libdir}/libamanda.so
188
+%{_libdir}/libamandad*.so
189
+%{_libdir}/libamar*.so
190
+%{_libdir}/libamglue*.so
191
+%{_libdir}/libamxfer*.so
192
+%{_libdir}/libndmjob*.so
193
+%{_libdir}/libndmlib*.so
194
+
195
+%dir %{_libexecdir}/amanda
196
+%{_libexecdir}/amanda/amandad
197
+%{_libexecdir}/amanda/amanda-sh-lib.sh
198
+%{_libexecdir}/amanda/amcat.awk
199
+%{_libexecdir}/amanda/amndmjob
200
+%{_libexecdir}/amanda/amplot.awk
201
[+] Added amanda-3.1.1-tcpport.patch ^
[+] Added amanda-3.1.1-xattrs.patch ^
[+] Added amanda-3.2.0-config-dir.patch ^
[+] Added amanda-3.3.0-glib.patch ^
[+] Added amanda-3.3.0-match_disk.patch ^
[+] Added amanda-3.3.0-qw.patch ^
Added amanda-3.3.0.tar.gz ^
[+] Added amanda-xinetd ^
[+] Added amanda.crontab ^
[+] Added amandahosts ^
[+] Added disklist ^