]> git.pld-linux.org Git - packages/device-mapper.git/blame - device-mapper.spec
- rel 2
[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#
5b31c0e8 9%ifarch sparc sparcv9 sparc64
10%undefine with_uclibc
11%endif
12
24effc5a 13Summary: Userspace support for the device-mapper
a2ba3b1a 14Summary(pl.UTF-8): Wsparcie dla mapowania urządzeń w przestrzeni użytkownika
24effc5a 15Name: device-mapper
183f112a 16Version: 1.02.22
f9f61c66 17Release: 2
183f112a 18License: LGPL v2.1 (library), GPL v2 (executables)
24effc5a 19Group: Applications/System
e8083e24 20Source0: ftp://sources.redhat.com/pub/dm/%{name}.%{version}.tgz
183f112a 21# Source0-md5: 6b94db57cdc9022af1583b3f2acb91cd
af449e2d 22# http://www.redhat.com/archives/dm-devel/2005-March/msg00022.html
7db152f4
AM
23Patch0: %{name}-disable_dynamic_link.patch
24Patch1: %{name}-klibc.patch
25Patch2: %{name}-getopt.patch
23814d9f 26Patch3: %{name}-ac.patch
b0069eb2 27Patch4: %{name}-force-local-headers.patch
bc05beb9 28Patch5: %{name}-linking.patch
0f6d8388 29URL: http://sources.redhat.com/dm/
82ab75b9
JB
30BuildRequires: autoconf
31BuildRequires: automake
8ae4c2e7 32%{?with_initrd:BuildRequires: klibc-static}
e2b16e78 33%{?with_selinux:BuildRequires: libselinux-devel >= 1.10}
28737e6a
AM
34%if %{with initrd} && %{with uclibc}
35BuildRequires: uClibc-static >= 0.9.26
36%endif
f104c9f0 37# /usr/include/klibc/libdevmapper.h is included first before currently built version with klcc
47656ea8 38BuildConflicts: device-mapper-initrd-devel < 1.02.17
e2b16e78 39%{?with_selinux:Requires: libselinux >= 1.10}
bd7310b0 40Conflicts: dev < 2.9.0-8
24effc5a
JR
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
8ae4c2e7 43%undefine configure_cache
3f80d918 44%define _sbindir /sbin
24effc5a
JR
45
46%description
8ae4c2e7
ER
47The goal of this driver is to support volume management. The driver
48enables the definition of new block devices composed of ranges of
49sectors of existing devices. This can be used to define disk
50partitions - or logical volumes. This light-weight kernel component
51can support user-space tools for logical volume management.
24effc5a 52
249e98b8
JR
53%description -l pl.UTF-8
54Celem tego sterownika jest obsługa zarządzania wolumenami. Sterownik
55włącza definiowanie nowych urządzeń blokowych złożonych z przedziałów
56sektorów na istniejących urządzeniach. Może to być wykorzystane do
57definiowania partycji na dysku lub logicznych wolumenów. Ten lekki
58składnik jądra może wspierać działające w przestrzeni użytkownika
59narzędzia do zarządzania logicznymi wolumenami.
82ab75b9 60
64485ac5
JK
61%package initrd
62Summary: Userspace support for the device-mapper - static dmsetup for initrd
a2ba3b1a 63Summary(pl.UTF-8): Wsparcie dla mapowania urządzeń w przestrzeni użytkownika - statyczne dmsetup dla initrd
183f112a 64License: GPL v2
64485ac5
JK
65Group: Applications/System
66Requires: %{name} = %{version}-%{release}
67
68%description initrd
1a143708
JB
69Userspace support for the device-mapper - static dmsetup binary for
70initrd.
64485ac5 71
249e98b8
JR
72%description initrd -l pl.UTF-8
73Wsparcie dla mapowania urządzeń w przestrzeni użytkownika - statyczna
1a143708 74wersja dmsetup dla initrd.
64485ac5 75
3f80d918
JR
76%package devel
77Summary: Header files and development documentation for %{name}
a2ba3b1a 78Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do %{name}
183f112a 79License: LGPL v2.1
3f80d918 80Group: Development/Libraries
2560a7ef 81Requires: %{name} = %{version}-%{release}
3f80d918
JR
82
83%description devel
84Header files and development documentation for %{name}.
85
249e98b8
JR
86%description devel -l pl.UTF-8
87Pliki nagłówkowe i dokumentacja do %{name}.
3f80d918 88
7858f662 89%package static
5a698747 90Summary: Static devmapper library
a2ba3b1a 91Summary(pl.UTF-8): Statyczna biblioteka devmapper
183f112a 92License: LGPL v2.1
7858f662 93Group: Development/Libraries
2560a7ef 94Requires: %{name}-devel = %{version}-%{release}
7858f662
AF
95
96%description static
5a698747
JB
97Static devmapper library.
98
249e98b8 99%description static -l pl.UTF-8
5a698747 100Statyczna biblioteka devmapper.
7858f662 101
af449e2d
JK
102%package initrd-devel
103Summary: Static devmapper library and header files for initrd applications
a2ba3b1a 104Summary(pl.UTF-8): Statyczna biblioteka devmapper i jej pliki nagłówkowe dla aplikacji initrd
183f112a 105License: LGPL v2.1
af449e2d
JK
106Group: Development/Libraries
107Requires: %{name}-devel = %{version}-%{release}
108Requires: klibc
109
110%description initrd-devel
1a143708
JB
111Static devmapper library and its header files for initrd applications
112linked with klibc.
af449e2d 113
249e98b8 114%description initrd-devel -l pl.UTF-8
1a143708 115Statyczna, zlinkowana z klibc biblioteka devmapper oraz jej pliki
249e98b8 116nagłówkowe dla aplikacji używanych w initrd.
af449e2d 117
e4b9886f 118%package scripts
119Summary: Additional scripts
a2ba3b1a 120Summary(pl.UTF-8): Dodatkowe skrypty
183f112a 121License: GPL v2
e4b9886f 122Group: Applications/System
e4b9886f 123Requires: %{name} = %{version}-%{release}
5de8a2b5 124Requires: util-linux
e4b9886f 125
126%description scripts
127Additional scripts.
128
249e98b8 129%description scripts -l pl.UTF-8
5de8a2b5 130Dodatkowe skrypty.
e4b9886f 131
24effc5a
JR
132%prep
133%setup -q -n %{name}.%{version}
5108239d 134%patch0 -p1
af449e2d
JK
135%patch1 -p1
136%patch2 -p1
23814d9f 137%patch3 -p1
b0069eb2 138%patch4 -p1
bc05beb9 139%patch5 -p1
0281e413 140
24effc5a 141%build
7c94dbf3 142cp -f /usr/share/automake/config.sub autoconf
ac7f2b07
TP
143%{__aclocal}
144%{__autoconf}
64485ac5
JK
145
146%if %{with initrd}
44d58241 147# kcc
d536b3d1 148%configure \
c4009345 149 CC="klcc -static" \
0f8f5516 150 CLDFLAGS="%{rpmldflags}" \
64485ac5 151 --disable-selinux \
c4009345
JB
152 --disable-dynamic_link \
153 --enable-static_link \
64485ac5
JK
154 --with-optimisation="%{rpmcflags}" \
155 --with-user=%(id -u) \
156 --with-group=%(id -g) \
d831393d
ER
157 --with-interface=ioctl \
158 --disable-nls
c4009345 159sed -i -e 's#rpl_malloc#malloc#g' include/configure.h
64485ac5
JK
160%{__make}
161
162cp -a dmsetup/dmsetup.static initrd-dmsetup
44d58241
ER
163cp -a lib/ioctl/libdevmapper.a initrd-libdevmapper-klibc.a
164%{__make} clean
165
28737e6a 166%if %{with uclibc}
44d58241
ER
167# uclibc (for lvm2)
168%configure \
bd502012 169 CC="%{_target_cpu}-uclibc-gcc" \
0f8f5516 170 CLDFLAGS="%{rpmldflags}" \
44d58241 171 --disable-selinux \
bd502012
ER
172 --disable-dynamic_link \
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.113854 seconds and 4 git commands to generate.