]> git.pld-linux.org Git - packages/dmraid.git/blob - dmraid.spec
- dmraid-1.0.0.rc13
[packages/dmraid.git] / dmraid.spec
1 #
2 # Conditional build:
3 %bcond_without  initrd  # without initrd version
4 %bcond_without  selinux # build without SELinux support
5 #
6 Summary:        Device-mapper RAID tool
7 Summary(pl):    Narzêdzie do RAID-u opartego o device-mapper
8 Name:           dmraid
9 Version:        1.0.0
10 %define _rc     rc13
11 Release:        0.%{_rc}.1
12 License:        GPL
13 Group:          Base
14 Source0:        http://people.redhat.com/~heinzm/sw/dmraid/src/%{name}-%{version}.%{_rc}.tar.bz2
15 # Source0-md5:  a2a8948de7717e2e76a1291fc1daf9d1
16 Patch0:         %{name}-selinux-static.patch
17 Patch1:         %{name}-fix.patch
18 Patch2:         %{name}-optflags.patch
19 Patch3:         %{name}-as-needed.patch
20 URL:            http://people.redhat.com/~heinzm/sw/dmraid/
21 BuildRequires:  autoconf
22 BuildRequires:  automake
23 BuildRequires:  device-mapper-devel >= 1.01.01
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
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
36 %description -l pl
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
39 device-mappera.
40
41 %package devel
42 Summary:        Header files for dmraid library
43 Summary(pl):    Pliki nag³ówkowe biblioteki dmraid
44 Group:          Development/Libraries
45 Requires:       %{name} = %{version}-%{release}
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
51 %description devel -l pl
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
54 ATARAID.
55
56 %package static
57 Summary:        Static library for dmraid
58 Summary(pl):    Statyczna biblioteka dmraid
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
66 %description static -l pl
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
69 ATARAID.
70
71 %package initrd
72 Summary:        Device-mapper RAID tool - statically linked version
73 Summary(pl):    Narzêdzie do RAID-u opartego o device-mapper - wersja statyczna
74 Group:          Base
75
76 %description initrd
77 Statically linked version of dmraid utility.
78
79 %description initrd -l pl
80 Statycznie skonsolidowana wersja programu narzêdziowego dmraid.
81
82 %prep
83 %setup -q -n %{name}
84 mv */* ./
85 %{?with_selinux:%patch0 -p2}
86 %patch1 -p1
87 %patch2 -p1
88 %patch3 -p1
89
90 %build
91 cp -f /usr/share/automake/config.sub autoconf
92 %{__aclocal}
93 %{__autoconf}
94
95 %if %{with initrd}
96 %configure \
97         --enable-static_link
98 %{__make} -j1
99 cp -f tools/dmraid{,-initrd}
100 %{__make} clean
101 %endif
102
103 %configure \
104         --enable-shared_lib
105 %{__make} -j1
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109
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}
115
116 %if %{with initrd}
117 install -D tools/dmraid-initrd $RPM_BUILD_ROOT/sbin/dmraid-initrd
118 %endif
119
120 %clean
121 rm -rf $RPM_BUILD_ROOT
122
123 %post   -p /sbin/ldconfig
124 %postun -p /sbin/ldconfig
125
126 %files
127 %defattr(644,root,root,755)
128 %doc README TODO doc/dmraid_design.txt
129 %attr(755,root,root) %{_sbindir}/dmraid
130 %attr(755,root,root) %{_libdir}/libdmraid.so.*.*.*
131 %{_mandir}/man8/*
132
133 %files devel
134 %defattr(644,root,root,755)
135 %attr(755,root,root) %{_libdir}/libdmraid.so
136 %{_includedir}/dmraid
137
138 %files static
139 %defattr(644,root,root,755)
140 %{_libdir}/libdmraid.a
141
142 %if %{with initrd}
143 %files initrd
144 %defattr(644,root,root,755)
145 %attr(755,root,root) /sbin/dmraid-initrd
146 %endif
This page took 0.057138 seconds and 3 git commands to generate.