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