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