]>
Commit | Line | Data |
---|---|---|
ee894230 PS |
1 | Summary: ggaoed - ATA over Ethernet target implementation for Linux |
2 | Name: ggaoed | |
3 | Version: 1.1 | |
c2f96ad1 | 4 | Release: 1 |
ee894230 | 5 | License: GPL v2 |
2b764317 | 6 | Group: Networking/Daemons |
ee894230 PS |
7 | Source0: http://ggaoed.googlecode.com/files/%{name}-%{version}.tar.gz |
8 | # Source0-md5: 9d46d1b274e96547bb93bc5360a1db54 | |
14904075 PS |
9 | Source1: %{name}.init |
10 | Source2: %{name}.sysconfig | |
ee894230 PS |
11 | Patch0: %{name}-build.patch |
12 | URL: http://code.google.com/p/ggaoed/ | |
13 | BuildRequires: docbook2X >= 0.8 | |
14 | BuildRequires: glib2-devel >= 2.12 | |
15 | BuildRequires: libaio-devel >= 0.3.107 | |
16 | BuildRequires: libatomic_ops >= 1.2 | |
14904075 PS |
17 | Requires(post,preun): /sbin/chkconfig |
18 | Requires: rc-scripts | |
ee894230 PS |
19 | Requires: uname(release) >= 2.6.31 |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %description | |
23 | ggaoed is an AoE (ATA over Ethernet) target implementation for Linux. | |
24 | It utilizes Linux kernel AIO, memory mapped sockets and other Linux | |
25 | features to provide the best performance. | |
26 | ||
27 | %prep | |
28 | %setup -q | |
29 | %patch0 -p1 | |
30 | ||
31 | %build | |
32 | %configure | |
33 | %{__make} | |
34 | ||
35 | %install | |
36 | rm -rf $RPM_BUILD_ROOT | |
14904075 | 37 | install -d $RPM_BUILD_ROOT%{_sharedstatedir}/ggaoed |
ee894230 PS |
38 | |
39 | %{__make} install \ | |
40 | datarootdir=$RPM_BUILD_ROOT%{_datadir} \ | |
41 | sbindir=$RPM_BUILD_ROOT%{_sbindir} \ | |
42 | mandir=$RPM_BUILD_ROOT%{_mandir} | |
43 | ||
14904075 PS |
44 | install -D ggaoed.conf.dist $RPM_BUILD_ROOT%{_sysconfdir}/ggaoed.conf |
45 | install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ggaoed | |
46 | install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ggaoed | |
ee894230 PS |
47 | |
48 | %clean | |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | ||
14904075 PS |
51 | %post |
52 | /sbin/chkconfig --add ggaoed | |
53 | /sbin/chkconfig ggaoed off | |
54 | %service ggaoed restart | |
55 | ||
56 | %preun | |
57 | if [ "$1" = "0" ]; then | |
58 | /sbin/chkconfig --del ggaoed | |
59 | %service ggaoed stop | |
60 | # nuke config cache if uninstalling | |
61 | rm -rf %{_sharedstatedir}/ggaoed/* | |
62 | fi | |
63 | ||
ee894230 PS |
64 | %files |
65 | %defattr(644,root,root,755) | |
66 | %doc NEWS README | |
14904075 PS |
67 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ggaoed.conf |
68 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ggaoed | |
69 | %attr(754,root,root) /etc/rc.d/init.d/ggaoed | |
ee894230 PS |
70 | %attr(755,root,root) %{_sbindir}/ggaoectl |
71 | %attr(755,root,root) %{_sbindir}/ggaoed | |
72 | %{_mandir}/man5/ggaoed.conf.5* | |
73 | %{_mandir}/man8/ggaoectl.8* | |
74 | %{_mandir}/man8/ggaoed.8* | |
14904075 | 75 | %dir %{_sharedstatedir}/ggaoed |