forked from sheepdog/sheepdog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsheepdog.spec.in
81 lines (65 loc) · 1.82 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
76
77
78
79
80
81
Name: sheepdog
Summary: The Sheepdog Distributed Storage System for 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}
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
# Build bits
BuildRequires: autoconf automake
BuildRequires: corosynclib-devel userspace-rcu-devel %{_buildrequires}
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 QEMU.
%prep
%setup -q
%build
./autogen.sh
%{configure} --with-initddir=%{_initrddir} %{_configopts}
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
ln -s -f %{_sbindir}/dog %{_sbindir}/collie
%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 || :
else
rm -f /usr/sbin/collie
fi
%files
%defattr(-,root,root,-)
%doc COPYING README INSTALL
%{_sbindir}/sheep
%{_sbindir}/sheepfs
%{_sbindir}/dog
%{_sbindir}/shepherd
%attr(755,-,-)%config %{_initddir}/sheepdog
%dir %{_localstatedir}/lib/sheepdog
%config %{_sysconfdir}/bash_completion.d/dog
%{_mandir}/man8/sheep.8*
%{_mandir}/man8/sheepfs.8*
%{_mandir}/man8/dog.8*
%{_prefix}/lib/systemd/system/sheepdog.service
%changelog
* @date@ Autotools generated version <[email protected]> - @version@-1.@alphatag@
- Autotools generated version