]>
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 |
88fb31ab | 11 | Release: 0.%{_rc}.2 |
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 | ||
35 | %description | |
36 | DMRAID supports device discovery, set activation and display of | |
37 | properties for ATARAID on Linux >= 2.4 using device-mapper. | |
38 | ||
c95e574d JR |
39 | %description -l pl.UTF-8 |
40 | DMRAID obsługuje wykrywanie urządzeń, ustawianie aktywacji i | |
41 | wyświetlanie właściwości ATARAID-u na Linuksie >= 2.4 przy użyciu | |
ebec4317 JB |
42 | device-mappera. |
43 | ||
36674070 | 44 | %package devel |
ebaa32bf | 45 | Summary: Header files for dmraid library |
121078cd | 46 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki dmraid |
36674070 | 47 | Group: Development/Libraries |
07712890 | 48 | Requires: %{name} = %{version}-%{release} |
36674070 ER |
49 | |
50 | %description devel | |
51 | dmraid-devel provides a library interface for RAID device discovery, | |
52 | RAID set activation and display of properties for ATARAID volumes. | |
53 | ||
c95e574d JR |
54 | %description devel -l pl.UTF-8 |
55 | Ten pakiet udostępnia interfejs biblioteczny do wykrywania urządzeń | |
56 | RAID, włączania zestawu RAID i wyświetlania właściwości wolumenów | |
ebaa32bf JB |
57 | ATARAID. |
58 | ||
36674070 | 59 | %package static |
ebaa32bf | 60 | Summary: Static library for dmraid |
121078cd | 61 | Summary(pl.UTF-8): Statyczna biblioteka dmraid |
36674070 ER |
62 | Group: Development/Libraries |
63 | Requires: %{name}-devel = %{version}-%{release} | |
64 | ||
65 | %description static | |
66 | dmraid-static provides a library interface for RAID device discovery, | |
67 | RAID set activation and display of properties for ATARAID volumes. | |
68 | ||
c95e574d JR |
69 | %description static -l pl.UTF-8 |
70 | Ten pakiet udostępnia statyczną bibliotekę do wykrywania urządzeń | |
71 | RAID, włączania zestawu RAID i wyświetlania właściwości wolumenów | |
ebaa32bf JB |
72 | ATARAID. |
73 | ||
d8d39b7c | 74 | %package initrd |
75 | Summary: Device-mapper RAID tool - statically linked version | |
121078cd | 76 | Summary(pl.UTF-8): Narzędzie do RAID-u opartego o device-mapper - wersja statyczna |
d8d39b7c | 77 | Group: Base |
78 | ||
79 | %description initrd | |
3f52d642 | 80 | Statically linked version of dmraid utility. |
d8d39b7c | 81 | |
c95e574d JR |
82 | %description initrd -l pl.UTF-8 |
83 | Statycznie skonsolidowana wersja programu narzędziowego dmraid. | |
d8d39b7c | 84 | |
24071a5d JR |
85 | %package initramfs |
86 | Summary: Device-mapper RAID tool - support scripts for initramfs-tools | |
87 | Summary(pl.UTF-8): Narzędzie do RAID-u opartego o device-mapper - skrypty dla initramfs-tools | |
88 | Group: Base | |
89 | Requires: %{name} = %{version}-%{release} | |
90 | Requires: initramfs-tools | |
91 | ||
92 | %description initramfs | |
93 | Device-mapper RAID tool - support scripts for initramfs-tools. | |
94 | ||
95 | %description initramfs -l pl.UTF-8 | |
96 | Narzędzie do RAID-u opartego o device-mapper - skrypty dla initramfs-tools. | |
97 | ||
23d76f1c | 98 | %prep |
99 | %setup -q -n %{name} | |
100 | mv */* ./ | |
b5cee4d5 | 101 | %{?with_selinux:%patch0 -p2} |
56b461b5 JB |
102 | %patch1 -p1 |
103 | %patch2 -p1 | |
3c62db72 | 104 | %patch3 -p1 |
23d76f1c | 105 | |
106 | %build | |
ee76a598 | 107 | cp -f /usr/share/automake/config.sub autoconf |
23d76f1c | 108 | %{__aclocal} |
109 | %{__autoconf} | |
110 | ||
3f52d642 JB |
111 | %if %{with initrd} |
112 | %configure \ | |
113 | --enable-static_link | |
4623ff68 | 114 | %{__make} -j1 |
3f52d642 | 115 | cp -f tools/dmraid{,-initrd} |
d8d39b7c | 116 | %{__make} clean |
3f52d642 JB |
117 | %endif |
118 | ||
56b461b5 JB |
119 | %configure \ |
120 | --enable-shared_lib | |
4623ff68 | 121 | %{__make} -j1 |
23d76f1c | 122 | |
123 | %install | |
124 | rm -rf $RPM_BUILD_ROOT | |
24071a5d | 125 | install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{hooks,scripts/local-top} |
23d76f1c | 126 | |
56b461b5 JB |
127 | %{__make} install \ |
128 | includedir=$RPM_BUILD_ROOT%{_includedir} \ | |
129 | libdir=$RPM_BUILD_ROOT%{_libdir} \ | |
130 | mandir=$RPM_BUILD_ROOT%{_mandir} \ | |
131 | sbindir=$RPM_BUILD_ROOT%{_sbindir} | |
23d76f1c | 132 | |
56b461b5 JB |
133 | %if %{with initrd} |
134 | install -D tools/dmraid-initrd $RPM_BUILD_ROOT/sbin/dmraid-initrd | |
135 | %endif | |
36674070 | 136 | |
24071a5d JR |
137 | install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/dmraid |
138 | install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/dmraid | |
139 | ||
23d76f1c | 140 | %clean |
141 | rm -rf $RPM_BUILD_ROOT | |
142 | ||
56b461b5 JB |
143 | %post -p /sbin/ldconfig |
144 | %postun -p /sbin/ldconfig | |
145 | ||
23d76f1c | 146 | %files |
147 | %defattr(644,root,root,755) | |
148 | %doc README TODO doc/dmraid_design.txt | |
56b461b5 JB |
149 | %attr(755,root,root) %{_sbindir}/dmraid |
150 | %attr(755,root,root) %{_libdir}/libdmraid.so.*.*.* | |
ebec4317 | 151 | %{_mandir}/man8/* |
d8d39b7c | 152 | |
36674070 ER |
153 | %files devel |
154 | %defattr(644,root,root,755) | |
56b461b5 | 155 | %attr(755,root,root) %{_libdir}/libdmraid.so |
36674070 ER |
156 | %{_includedir}/dmraid |
157 | ||
158 | %files static | |
159 | %defattr(644,root,root,755) | |
160 | %{_libdir}/libdmraid.a | |
161 | ||
3f52d642 | 162 | %if %{with initrd} |
d8d39b7c | 163 | %files initrd |
164 | %defattr(644,root,root,755) | |
56b461b5 | 165 | %attr(755,root,root) /sbin/dmraid-initrd |
3f52d642 | 166 | %endif |
24071a5d JR |
167 | |
168 | %files initramfs | |
169 | %defattr(644,root,root,755) | |
170 | %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/dmraid | |
171 | %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/dmraid |