]>
Commit | Line | Data |
---|---|---|
3f52d642 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without initrd # without initrd version | |
31073dd6 | 4 | %bcond_without selinux # build without SELinux support (needs selinux-disabled device-mapper) |
3f52d642 | 5 | # |
ebec4317 | 6 | Summary: Device-mapper RAID tool |
121078cd | 7 | Summary(pl.UTF-8): Narzędzie do RAID-u opartego o device-mapper |
23d76f1c | 8 | Name: dmraid |
9 | Version: 1.0.0 | |
add5855c | 10 | %define _rc rc15 |
6f013d0d | 11 | Release: 0.%{_rc}.3 |
23d76f1c | 12 | License: GPL |
13 | Group: Base | |
bce578ac | 14 | Source0: http://people.redhat.com/~heinzm/sw/dmraid/src/%{name}-%{version}.%{_rc}.tar.bz2 |
add5855c | 15 | # Source0-md5: 2602887205a35f89b59eeba3a868150f |
5f1d2088 JR |
16 | Source1: %{name}-initramfs-hook |
17 | Source2: %{name}-initramfs-local-top | |
4d0aa4a9 | 18 | Patch0: %{name}-selinux-static.patch |
56b461b5 JB |
19 | Patch1: %{name}-fix.patch |
20 | Patch2: %{name}-optflags.patch | |
3c62db72 | 21 | Patch3: %{name}-as-needed.patch |
23d76f1c | 22 | URL: http://people.redhat.com/~heinzm/sw/dmraid/ |
23 | BuildRequires: autoconf | |
ebec4317 | 24 | BuildRequires: automake |
add5855c | 25 | BuildRequires: device-mapper-devel >= 1.02.02 |
1a668278 | 26 | BuildRequires: zlib-devel |
b5cee4d5 | 27 | %if %{with initrd} |
28 | BuildRequires: device-mapper-static >= 1.02.05-0.4 | |
29 | BuildRequires: glibc-static | |
30 | %{?with_selinux:BuildRequires: libselinux-static} | |
31 | %{?with_selinux:BuildRequires: libsepol-static} | |
32 | %endif | |
23d76f1c | 33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
6f013d0d JR |
35 | %define _sbindir /sbin |
36 | ||
23d76f1c | 37 | %description |
38 | DMRAID supports device discovery, set activation and display of | |
39 | properties for ATARAID on Linux >= 2.4 using device-mapper. | |
40 | ||
c95e574d JR |
41 | %description -l pl.UTF-8 |
42 | DMRAID obsługuje wykrywanie urządzeń, ustawianie aktywacji i | |
43 | wyświetlanie właściwości ATARAID-u na Linuksie >= 2.4 przy użyciu | |
ebec4317 JB |
44 | device-mappera. |
45 | ||
36674070 | 46 | %package devel |
ebaa32bf | 47 | Summary: Header files for dmraid library |
121078cd | 48 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki dmraid |
36674070 | 49 | Group: Development/Libraries |
07712890 | 50 | Requires: %{name} = %{version}-%{release} |
36674070 ER |
51 | |
52 | %description devel | |
53 | dmraid-devel provides a library interface for RAID device discovery, | |
54 | RAID set activation and display of properties for ATARAID volumes. | |
55 | ||
c95e574d JR |
56 | %description devel -l pl.UTF-8 |
57 | Ten pakiet udostępnia interfejs biblioteczny do wykrywania urządzeń | |
58 | RAID, włączania zestawu RAID i wyświetlania właściwości wolumenów | |
ebaa32bf JB |
59 | ATARAID. |
60 | ||
36674070 | 61 | %package static |
ebaa32bf | 62 | Summary: Static library for dmraid |
121078cd | 63 | Summary(pl.UTF-8): Statyczna biblioteka dmraid |
36674070 ER |
64 | Group: Development/Libraries |
65 | Requires: %{name}-devel = %{version}-%{release} | |
66 | ||
67 | %description static | |
68 | dmraid-static provides a library interface for RAID device discovery, | |
69 | RAID set activation and display of properties for ATARAID volumes. | |
70 | ||
c95e574d JR |
71 | %description static -l pl.UTF-8 |
72 | Ten pakiet udostępnia statyczną bibliotekę do wykrywania urządzeń | |
73 | RAID, włączania zestawu RAID i wyświetlania właściwości wolumenów | |
ebaa32bf JB |
74 | ATARAID. |
75 | ||
d8d39b7c | 76 | %package initrd |
77 | Summary: Device-mapper RAID tool - statically linked version | |
121078cd | 78 | Summary(pl.UTF-8): Narzędzie do RAID-u opartego o device-mapper - wersja statyczna |
d8d39b7c | 79 | Group: Base |
80 | ||
81 | %description initrd | |
3f52d642 | 82 | Statically linked version of dmraid utility. |
d8d39b7c | 83 | |
c95e574d JR |
84 | %description initrd -l pl.UTF-8 |
85 | Statycznie skonsolidowana wersja programu narzędziowego dmraid. | |
d8d39b7c | 86 | |
24071a5d JR |
87 | %package initramfs |
88 | Summary: Device-mapper RAID tool - support scripts for initramfs-tools | |
89 | Summary(pl.UTF-8): Narzędzie do RAID-u opartego o device-mapper - skrypty dla initramfs-tools | |
90 | Group: Base | |
91 | Requires: %{name} = %{version}-%{release} | |
92 | Requires: initramfs-tools | |
93 | ||
94 | %description initramfs | |
95 | Device-mapper RAID tool - support scripts for initramfs-tools. | |
96 | ||
97 | %description initramfs -l pl.UTF-8 | |
98 | Narzędzie do RAID-u opartego o device-mapper - skrypty dla initramfs-tools. | |
99 | ||
23d76f1c | 100 | %prep |
101 | %setup -q -n %{name} | |
102 | mv */* ./ | |
b5cee4d5 | 103 | %{?with_selinux:%patch0 -p2} |
56b461b5 JB |
104 | %patch1 -p1 |
105 | %patch2 -p1 | |
3c62db72 | 106 | %patch3 -p1 |
23d76f1c | 107 | |
108 | %build | |
ee76a598 | 109 | cp -f /usr/share/automake/config.sub autoconf |
23d76f1c | 110 | %{__aclocal} |
111 | %{__autoconf} | |
112 | ||
3f52d642 JB |
113 | %if %{with initrd} |
114 | %configure \ | |
115 | --enable-static_link | |
4623ff68 | 116 | %{__make} -j1 |
3f52d642 | 117 | cp -f tools/dmraid{,-initrd} |
d8d39b7c | 118 | %{__make} clean |
3f52d642 JB |
119 | %endif |
120 | ||
56b461b5 JB |
121 | %configure \ |
122 | --enable-shared_lib | |
4623ff68 | 123 | %{__make} -j1 |
23d76f1c | 124 | |
125 | %install | |
126 | rm -rf $RPM_BUILD_ROOT | |
6f013d0d | 127 | install -d $RPM_BUILD_ROOT{/%{_lib},%{_datadir}/initramfs-tools/{hooks,scripts/local-top}} |
23d76f1c | 128 | |
56b461b5 JB |
129 | %{__make} install \ |
130 | includedir=$RPM_BUILD_ROOT%{_includedir} \ | |
131 | libdir=$RPM_BUILD_ROOT%{_libdir} \ | |
132 | mandir=$RPM_BUILD_ROOT%{_mandir} \ | |
133 | sbindir=$RPM_BUILD_ROOT%{_sbindir} | |
23d76f1c | 134 | |
6f013d0d JR |
135 | mv $RPM_BUILD_ROOT%{_libdir}/libdmraid.so.* $RPM_BUILD_ROOT/%{_lib} |
136 | ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib} ; echo libdmraid.so.*.*.*) \ | |
137 | $RPM_BUILD_ROOT%{_libdir}/libdmraid.so | |
138 | ||
56b461b5 JB |
139 | %if %{with initrd} |
140 | install -D tools/dmraid-initrd $RPM_BUILD_ROOT/sbin/dmraid-initrd | |
141 | %endif | |
36674070 | 142 | |
24071a5d JR |
143 | install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/dmraid |
144 | install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/dmraid | |
145 | ||
23d76f1c | 146 | %clean |
147 | rm -rf $RPM_BUILD_ROOT | |
148 | ||
56b461b5 JB |
149 | %post -p /sbin/ldconfig |
150 | %postun -p /sbin/ldconfig | |
151 | ||
23d76f1c | 152 | %files |
153 | %defattr(644,root,root,755) | |
154 | %doc README TODO doc/dmraid_design.txt | |
56b461b5 | 155 | %attr(755,root,root) %{_sbindir}/dmraid |
6f013d0d | 156 | %attr(755,root,root) /%{_lib}/libdmraid.so.*.*.* |
ebec4317 | 157 | %{_mandir}/man8/* |
d8d39b7c | 158 | |
36674070 ER |
159 | %files devel |
160 | %defattr(644,root,root,755) | |
56b461b5 | 161 | %attr(755,root,root) %{_libdir}/libdmraid.so |
36674070 ER |
162 | %{_includedir}/dmraid |
163 | ||
164 | %files static | |
165 | %defattr(644,root,root,755) | |
166 | %{_libdir}/libdmraid.a | |
167 | ||
3f52d642 | 168 | %if %{with initrd} |
d8d39b7c | 169 | %files initrd |
170 | %defattr(644,root,root,755) | |
56b461b5 | 171 | %attr(755,root,root) /sbin/dmraid-initrd |
3f52d642 | 172 | %endif |
24071a5d JR |
173 | |
174 | %files initramfs | |
175 | %defattr(644,root,root,755) | |
176 | %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/dmraid | |
177 | %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/dmraid |