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