]> git.pld-linux.org Git - packages/device-mapper.git/blame - device-mapper.spec
- rel 1
[packages/device-mapper.git] / device-mapper.spec
CommitLineData
f104c9f0
ER
1# TODO
2# - add fix to drop BuildConflicts: device-mapper-initrd-devel
e2b16e78
ER
3#
4# Conditional build:
5%bcond_without selinux # build without SELinux support
64485ac5 6%bcond_without initrd # don't build initrd version
e2b16e78 7#
24effc5a 8Summary: Userspace support for the device-mapper
a2ba3b1a 9Summary(pl.UTF-8): Wsparcie dla mapowania urządzeń w przestrzeni użytkownika
24effc5a 10Name: device-mapper
f4b41109 11Version: 1.02.18
dbc72a35 12Release: 1
2d831627 13License: GPL v2
24effc5a 14Group: Applications/System
e8083e24 15Source0: ftp://sources.redhat.com/pub/dm/%{name}.%{version}.tgz
f4b41109 16# Source0-md5: 8ccb87923a9f33580205e5a9b39c8d58
af449e2d 17# http://www.redhat.com/archives/dm-devel/2005-March/msg00022.html
7db152f4
AM
18Patch0: %{name}-disable_dynamic_link.patch
19Patch1: %{name}-klibc.patch
20Patch2: %{name}-getopt.patch
23814d9f 21Patch3: %{name}-ac.patch
b0069eb2 22Patch4: %{name}-force-local-headers.patch
bc05beb9 23Patch5: %{name}-linking.patch
0f6d8388 24URL: http://sources.redhat.com/dm/
82ab75b9
JB
25BuildRequires: autoconf
26BuildRequires: automake
8ae4c2e7 27%{?with_initrd:BuildRequires: klibc-static}
e2b16e78 28%{?with_selinux:BuildRequires: libselinux-devel >= 1.10}
44d58241 29%{?with_initrd:BuildRequires: uClibc-static >= 0.9.26}
f104c9f0 30# /usr/include/klibc/libdevmapper.h is included first before currently built version with klcc
47656ea8 31BuildConflicts: device-mapper-initrd-devel < 1.02.17
e2b16e78 32%{?with_selinux:Requires: libselinux >= 1.10}
bd7310b0 33Conflicts: dev < 2.9.0-8
24effc5a
JR
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
8ae4c2e7 36%undefine configure_cache
3f80d918 37%define _sbindir /sbin
24effc5a
JR
38
39%description
8ae4c2e7
ER
40The goal of this driver is to support volume management. The driver
41enables the definition of new block devices composed of ranges of
42sectors of existing devices. This can be used to define disk
43partitions - or logical volumes. This light-weight kernel component
44can support user-space tools for logical volume management.
24effc5a 45
249e98b8
JR
46%description -l pl.UTF-8
47Celem tego sterownika jest obsługa zarządzania wolumenami. Sterownik
48włącza definiowanie nowych urządzeń blokowych złożonych z przedziałów
49sektorów na istniejących urządzeniach. Może to być wykorzystane do
50definiowania partycji na dysku lub logicznych wolumenów. Ten lekki
51składnik jądra może wspierać działające w przestrzeni użytkownika
52narzędzia do zarządzania logicznymi wolumenami.
82ab75b9 53
64485ac5
JK
54%package initrd
55Summary: Userspace support for the device-mapper - static dmsetup for initrd
a2ba3b1a 56Summary(pl.UTF-8): Wsparcie dla mapowania urządzeń w przestrzeni użytkownika - statyczne dmsetup dla initrd
64485ac5
JK
57Group: Applications/System
58Requires: %{name} = %{version}-%{release}
59
60%description initrd
1a143708
JB
61Userspace support for the device-mapper - static dmsetup binary for
62initrd.
64485ac5 63
249e98b8
JR
64%description initrd -l pl.UTF-8
65Wsparcie dla mapowania urządzeń w przestrzeni użytkownika - statyczna
1a143708 66wersja dmsetup dla initrd.
64485ac5 67
3f80d918
JR
68%package devel
69Summary: Header files and development documentation for %{name}
a2ba3b1a 70Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do %{name}
3f80d918 71Group: Development/Libraries
2560a7ef 72Requires: %{name} = %{version}-%{release}
3f80d918
JR
73
74%description devel
75Header files and development documentation for %{name}.
76
249e98b8
JR
77%description devel -l pl.UTF-8
78Pliki nagłówkowe i dokumentacja do %{name}.
3f80d918 79
7858f662 80%package static
5a698747 81Summary: Static devmapper library
a2ba3b1a 82Summary(pl.UTF-8): Statyczna biblioteka devmapper
7858f662 83Group: Development/Libraries
2560a7ef 84Requires: %{name}-devel = %{version}-%{release}
7858f662
AF
85
86%description static
5a698747
JB
87Static devmapper library.
88
249e98b8 89%description static -l pl.UTF-8
5a698747 90Statyczna biblioteka devmapper.
7858f662 91
af449e2d
JK
92%package initrd-devel
93Summary: Static devmapper library and header files for initrd applications
a2ba3b1a 94Summary(pl.UTF-8): Statyczna biblioteka devmapper i jej pliki nagłówkowe dla aplikacji initrd
af449e2d
JK
95Group: Development/Libraries
96Requires: %{name}-devel = %{version}-%{release}
97Requires: klibc
98
99%description initrd-devel
1a143708
JB
100Static devmapper library and its header files for initrd applications
101linked with klibc.
af449e2d 102
249e98b8 103%description initrd-devel -l pl.UTF-8
1a143708 104Statyczna, zlinkowana z klibc biblioteka devmapper oraz jej pliki
249e98b8 105nagłówkowe dla aplikacji używanych w initrd.
af449e2d 106
e4b9886f 107%package scripts
108Summary: Additional scripts
a2ba3b1a 109Summary(pl.UTF-8): Dodatkowe skrypty
e4b9886f 110Group: Applications/System
e4b9886f 111Requires: %{name} = %{version}-%{release}
5de8a2b5 112Requires: util-linux
e4b9886f 113
114%description scripts
115Additional scripts.
116
249e98b8 117%description scripts -l pl.UTF-8
5de8a2b5 118Dodatkowe skrypty.
e4b9886f 119
24effc5a
JR
120%prep
121%setup -q -n %{name}.%{version}
5108239d 122%patch0 -p1
af449e2d
JK
123%patch1 -p1
124%patch2 -p1
23814d9f 125%patch3 -p1
b0069eb2 126%patch4 -p1
bc05beb9 127%patch5 -p1
0281e413 128
24effc5a 129%build
7c94dbf3 130cp -f /usr/share/automake/config.sub autoconf
ac7f2b07
TP
131%{__aclocal}
132%{__autoconf}
64485ac5
JK
133
134%if %{with initrd}
44d58241 135# kcc
d536b3d1 136%configure \
c4009345 137 CC="klcc -static" \
0f8f5516 138 CLDFLAGS="%{rpmldflags}" \
64485ac5 139 --disable-selinux \
c4009345
JB
140 --disable-dynamic_link \
141 --enable-static_link \
64485ac5
JK
142 --with-optimisation="%{rpmcflags}" \
143 --with-user=%(id -u) \
144 --with-group=%(id -g) \
d831393d
ER
145 --with-interface=ioctl \
146 --disable-nls
c4009345 147sed -i -e 's#rpl_malloc#malloc#g' include/configure.h
64485ac5
JK
148%{__make}
149
150cp -a dmsetup/dmsetup.static initrd-dmsetup
44d58241
ER
151cp -a lib/ioctl/libdevmapper.a initrd-libdevmapper-klibc.a
152%{__make} clean
153
154# uclibc (for lvm2)
155%configure \
bd502012 156 CC="%{_target_cpu}-uclibc-gcc" \
0f8f5516 157 CLDFLAGS="%{rpmldflags}" \
44d58241 158 --disable-selinux \
bd502012
ER
159 --disable-dynamic_link \
160 --with-optimisation="-Os" \
161 --with-interface=ioctl \
44d58241
ER
162 --disable-nls
163sed -i -e 's#rpl_malloc#malloc#g' include/configure.h
164%{__make}
165
166cp -a lib/ioctl/libdevmapper.a initrd-libdevmapper-uclibc.a
64485ac5
JK
167%{__make} clean
168%endif
169
170%configure \
0f8f5516 171 CLDFLAGS="%{rpmldflags}" \
64485ac5 172 --%{?with_selinux:en}%{!?with_selinux:dis}able-selinux \
c4009345 173 --with-optimisation="%{rpmcflags}" \
9dfe67ca
PS
174 --with-user=%(id -u) \
175 --with-group=%(id -g) \
af449e2d 176 --with-interface=ioctl \
20f45f1d 177 --enable-dmeventd \
af449e2d 178 --disable-klibc
24effc5a
JR
179%{__make}
180
181%install
182rm -rf $RPM_BUILD_ROOT
44d58241 183install -d $RPM_BUILD_ROOT/{%{_lib},%{_libdir}/%{name}}
24effc5a 184
2b3200b7
PG
185%{__make} install \
186 DESTDIR=$RPM_BUILD_ROOT
24effc5a 187
fddd209a 188SONAME=$(cd $RPM_BUILD_ROOT%{_libdir}; echo libdevmapper.so.*.*)
a4826f8d 189ln -sf /%{_lib}/${SONAME} $RPM_BUILD_ROOT%{_libdir}/libdevmapper.so
c4009345
JB
190SONAME=$(cd $RPM_BUILD_ROOT%{_libdir}; echo libdevmapper-event.so.*.*)
191ln -sf /%{_lib}/${SONAME} $RPM_BUILD_ROOT%{_libdir}/libdevmapper-event.so
9b4e9149 192mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.* $RPM_BUILD_ROOT/%{_lib}
c4009345 193install scripts/* $RPM_BUILD_ROOT%{_libdir}/%{name}
3f80d918 194
bc9650f9 195install lib/ioctl/libdevmapper.a $RPM_BUILD_ROOT%{_libdir}
c4009345
JB
196install dmeventd/libdevmapper-event.a $RPM_BUILD_ROOT%{_libdir}
197
198%if %{with initrd}
7f0aa7db 199install -d $RPM_BUILD_ROOT/usr/{{%{_lib},include}/klibc,%{_target_cpu}-linux-uclibc/usr/{lib,include}}
c4009345 200install initrd-dmsetup $RPM_BUILD_ROOT%{_sbindir}
44d58241 201install initrd-libdevmapper-klibc.a $RPM_BUILD_ROOT/usr/%{_lib}/klibc/libdevmapper.a
7f0aa7db 202install initrd-libdevmapper-uclibc.a $RPM_BUILD_ROOT/usr/%{_target_cpu}-linux-uclibc/usr/lib/libdevmapper.a
c4009345 203install include/libdevmapper.h $RPM_BUILD_ROOT/usr/include/klibc
44d58241 204install include/libdevmapper.h $RPM_BUILD_ROOT/usr/%{_target_cpu}-linux-uclibc/usr/include
c4009345 205%endif
7858f662 206
24effc5a
JR
207%clean
208rm -rf $RPM_BUILD_ROOT
209
82ab75b9 210%post -p /sbin/ldconfig
3f80d918
JR
211%postun -p /sbin/ldconfig
212
24effc5a
JR
213%files
214%defattr(644,root,root,755)
4b55423a 215%doc INTRO INSTALL README scripts/*
47656ea8 216%attr(755,root,root) %{_sbindir}/dmeventd
64485ac5 217%attr(755,root,root) %{_sbindir}/dmsetup
c4009345
JB
218%attr(755,root,root) /%{_lib}/libdevmapper.so.*.*
219%attr(755,root,root) /%{_lib}/libdevmapper-event.so.*.*
3f80d918
JR
220%{_mandir}/man8/*
221
222%files devel
223%defattr(644,root,root,755)
9dfe67ca 224%attr(755,root,root) %{_libdir}/libdevmapper.so
c4009345
JB
225%attr(755,root,root) %{_libdir}/libdevmapper-event.so
226%{_includedir}/libdevmapper*.h
7858f662
AF
227
228%files static
229%defattr(644,root,root,755)
c4009345
JB
230%{_libdir}/libdevmapper.a
231%{_libdir}/libdevmapper-event.a
e4b9886f 232
233%files scripts
234%defattr(644,root,root,755)
235%dir %{_libdir}/%{name}
236%{_libdir}/%{name}/*
64485ac5 237
79c38c76 238%if %{with initrd}
64485ac5
JK
239%files initrd
240%defattr(644,root,root,755)
241%attr(755,root,root) %{_sbindir}/initrd-dmsetup
af449e2d
JK
242
243%files initrd-devel
244%defattr(644,root,root,755)
8ae4c2e7 245%{_prefix}/%{_lib}/klibc/libdevmapper.a
7f0aa7db 246%{_prefix}/%{_target_cpu}-linux-uclibc/usr/lib/libdevmapper.a
8ae4c2e7 247%{_includedir}/klibc/libdevmapper.h
44d58241 248%{_prefix}/%{_target_cpu}-linux-uclibc/usr/include/libdevmapper.h
79c38c76 249%endif
This page took 0.159431 seconds and 4 git commands to generate.