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