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