forked from sheepdog/sheepdog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sheepdog.spec.in
75 lines (59 loc) · 1.61 KB
/
sheepdog.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Name: sheepdog
Summary: The Sheepdog Distributed Storage System for KVM/QEMU
Version: @version@
Release: 1%{?dist}
License: GPLv2 and GPLv2+
Group: System Environment/Base
URL: http://www.osrg.net/sheepdog
Source0: http://downloads.sourceforge.net/project/sheepdog/%{name}/%{version}/%{name}-%{version}.tar.gz
# Runtime bits
Requires: corosync
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
# Build bits
BuildRequires: autoconf automake
BuildRequires: corosync corosynclib corosynclib-devel
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%description
This package contains the Sheepdog server, and command line tool which offer
a distributed object storage system for KVM.
%prep
%setup -q
%build
./autogen.sh
%{configure} --with-initddir=%{_initrddir}
make %{_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
## tree fixup
# drop static libs
rm -f %{buildroot}%{_libdir}/*.a
%clean
rm -rf %{buildroot}
%post
/sbin/chkconfig --add sheepdog
%preun
if [ $1 -eq 0 ] ; then
/sbin/service sheepdog stop >/dev/null 2>&1
/sbin/chkconfig --del sheepdog
fi
%postun
if [ "$1" -ge "1" ] ; then
/sbin/service sheepdog condrestart >/dev/null 2>&1 || :
fi
%files
%defattr(-,root,root,-)
%doc COPYING README INSTALL
%{_sbindir}/sheep
%{_sbindir}/sheepfs
%{_sbindir}/collie
%attr(755,-,-)%config %{_initddir}/sheepdog
%dir %{_localstatedir}/lib/sheepdog
%{_mandir}/man8/sheep.8*
%{_mandir}/man8/sheepfs.8*
%{_mandir}/man8/collie.8*
%changelog
* @date@ Autotools generated version <[email protected]> - @version@-1.@alphatag@
- Autotools generated version