]> git.pld-linux.org Git - packages/device-mapper.git/blob - device-mapper.spec
8e96642d4bfa6da8359bcfca26c2eb7a94057f32
[packages/device-mapper.git] / device-mapper.spec
1 #
2 # Conditional build:
3 %bcond_without  selinux         # build without SELinux support
4 %bcond_without  initrd          # don't build initrd version
5 #
6 Summary:        Userspace support for the device-mapper
7 Summary(pl):    Wsparcie dla mapowania urz±dzeñ w przestrzeni u¿ytkownika
8 Name:           device-mapper
9 Version:        1.02.07
10 Release:        0.1
11 License:        GPL v2
12 Group:          Applications/System
13 Source0:        ftp://sources.redhat.com/pub/dm/%{name}.%{version}.tgz
14 # Source0-md5:  460cc211b03af4048ec90c0de2ecd8f7
15 # http://www.redhat.com/archives/dm-devel/2005-March/msg00022.html
16 Patch0:         %{name}-disable_dynamic_link.patch
17 Patch1:         %{name}-klibc.patch
18 Patch2:         %{name}-getopt.patch
19 URL:            http://sources.redhat.com/dm/
20 BuildRequires:  autoconf
21 BuildRequires:  automake
22 %{?with_initrd:BuildRequires:   klibc-static}
23 %{?with_selinux:BuildRequires:  libselinux-devel >= 1.10}
24 %{?with_selinux:Requires:       libselinux >= 1.10}
25 Conflicts:      dev < 2.9.0-8
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %undefine       configure_cache
29 %define         _sbindir        /sbin
30
31 %description
32 The goal of this driver is to support volume management. The driver
33 enables the definition of new block devices composed of ranges of
34 sectors of existing devices. This can be used to define disk
35 partitions - or logical volumes. This light-weight kernel component
36 can support user-space tools for logical volume management.
37
38 %description -l pl
39 Celem tego sterownika jest obs³uga zarz±dzania wolumenami. Sterownik
40 w³±cza definiowanie nowych urz±dzeñ blokowych z³o¿onych z przedzia³ów
41 sektorów na istniej±cych urz±dzeniach. Mo¿e to byæ wykorzystane do
42 definiowania partycji na dysku lub logicznych wolumenów. Ten lekki
43 sk³adnik j±dra mo¿e wspieraæ dzia³aj±ce w przestrzeni u¿ytkownika
44 narzêdzia do zarz±dzania logicznymi wolumenami.
45
46 %package initrd
47 Summary:        Userspace support for the device-mapper - static dmsetup for initrd
48 Summary(pl):    Wsparcie dla mapowania urz±dzeñ w przestrzeni u¿ytkownika - statyczne dmsetup dla initrd
49 Group:          Applications/System
50 Requires:       %{name} = %{version}-%{release}
51
52 %description initrd
53 Userspace support for the device-mapper - static dmsetup binary for
54 initrd.
55
56 %description initrd -l pl
57 Wsparcie dla mapowania urz±dzeñ w przestrzeni u¿ytkownika - statyczna
58 wersja dmsetup dla initrd.
59
60 %package devel
61 Summary:        Header files and development documentation for %{name}
62 Summary(pl):    Pliki nag³ówkowe i dokumentacja do %{name}
63 Group:          Development/Libraries
64 Requires:       %{name} = %{version}-%{release}
65
66 %description devel
67 Header files and development documentation for %{name}.
68
69 %description devel -l pl
70 Pliki nag³ówkowe i dokumentacja do %{name}.
71
72 %package static
73 Summary:        Static devmapper library
74 Summary(pl):    Statyczna biblioteka devmapper
75 Group:          Development/Libraries
76 Requires:       %{name}-devel = %{version}-%{release}
77
78 %description static
79 Static devmapper library.
80
81 %description static -l pl
82 Statyczna biblioteka devmapper.
83
84 %package initrd-devel
85 Summary:        Static devmapper library and header files for initrd applications
86 Summary(pl):    Statyczna biblioteka devmapper i jej pliki nag³ówkowe dla aplikacji initrd
87 Group:          Development/Libraries
88 Requires:       %{name}-devel = %{version}-%{release}
89 Requires:       klibc
90
91 %description initrd-devel
92 Static devmapper library and its header files for initrd applications
93 linked with klibc.
94
95 %description initrd-devel -l pl
96 Statyczna, zlinkowana z klibc biblioteka devmapper oraz jej pliki
97 nag³ówkowe dla aplikacji u¿ywanych w initrd.
98
99 %package scripts
100 Summary:        Additional scripts
101 Summary(pl):    Dodatkowe skrypty
102 Group:          Applications/System
103 Requires:       %{name} = %{version}-%{release}
104 Requires:       util-linux
105
106 %description scripts
107 Additional scripts.
108
109 %description scripts -l pl
110 Dodatkowe skrypty.
111
112 %prep
113 %setup -q -n %{name}.%{version}
114 %patch0 -p1
115 %patch1 -p1
116 %patch2 -p1
117
118 # klcc puts its own -I before any options, so klibc's <linux/*>
119 # overrides include/linux/*, requiring very fresh kernel headers
120 sed -i -e 's,<linux/dm-ioctl.h>,"../../kernel/ioctl/dm-ioctl.h",' lib/ioctl/libdm-iface.c
121
122 %build
123 cp -f /usr/share/automake/config.sub autoconf
124 %{__aclocal}
125 %{__autoconf}
126
127 %if %{with initrd}
128 %configure \
129         CC="klcc -static" \
130         --disable-selinux \
131         --disable-dynamic_link \
132         --enable-static_link \
133         --with-optimisation="%{rpmcflags}" \
134         --with-user=%(id -u) \
135         --with-group=%(id -g) \
136         --with-interface=ioctl
137 sed -i -e 's#rpl_malloc#malloc#g' include/configure.h
138 %{__make}
139
140 cp -a dmsetup/dmsetup.static initrd-dmsetup
141 cp -a lib/ioctl/libdevmapper.a initrd-libdevmapper.a
142 %{__make} clean
143 %endif
144
145 %configure \
146         --%{?with_selinux:en}%{!?with_selinux:dis}able-selinux \
147         --with-optimisation="%{rpmcflags}" \
148         --with-user=%(id -u) \
149         --with-group=%(id -g) \
150         --with-interface=ioctl \
151         --enable-dmeventd \
152         --disable-klibc
153 %{__make}
154
155 %install
156 rm -rf $RPM_BUILD_ROOT
157 install -d $RPM_BUILD_ROOT/{%{_lib},%{_libdir}/%{name},/usr/{%{_lib},include}/klibc}
158
159 %{__make} install \
160         DESTDIR=$RPM_BUILD_ROOT
161
162 SONAME=$(cd $RPM_BUILD_ROOT%{_libdir}; echo libdevmapper.so.*.*)
163 ln -sf /%{_lib}/${SONAME} $RPM_BUILD_ROOT%{_libdir}/libdevmapper.so
164 SONAME=$(cd $RPM_BUILD_ROOT%{_libdir}; echo libdevmapper-event.so.*.*)
165 ln -sf /%{_lib}/${SONAME} $RPM_BUILD_ROOT%{_libdir}/libdevmapper-event.so
166 mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.* $RPM_BUILD_ROOT/%{_lib}
167 install scripts/* $RPM_BUILD_ROOT%{_libdir}/%{name}
168
169 install lib/ioctl/libdevmapper.a $RPM_BUILD_ROOT%{_libdir}
170 install dmeventd/libdevmapper-event.a $RPM_BUILD_ROOT%{_libdir}
171
172 %if %{with initrd}
173 install initrd-dmsetup $RPM_BUILD_ROOT%{_sbindir}
174 install initrd-libdevmapper.a $RPM_BUILD_ROOT/usr/%{_lib}/klibc/libdevmapper.a
175 install include/libdevmapper.h $RPM_BUILD_ROOT/usr/include/klibc
176 %endif
177
178 %clean
179 rm -rf $RPM_BUILD_ROOT
180
181 %post   -p /sbin/ldconfig
182 %postun -p /sbin/ldconfig
183
184 %files
185 %defattr(644,root,root,755)
186 %doc INTRO INSTALL README scripts/*
187 %attr(755,root,root) %{_sbindir}/dmsetup
188 %attr(755,root,root) /%{_lib}/libdevmapper.so.*.*
189 %attr(755,root,root) /%{_lib}/libdevmapper-event.so.*.*
190 %{_mandir}/man8/*
191
192 %files devel
193 %defattr(644,root,root,755)
194 %attr(755,root,root) %{_libdir}/libdevmapper.so
195 %attr(755,root,root) %{_libdir}/libdevmapper-event.so
196 %{_includedir}/libdevmapper*.h
197
198 %files static
199 %defattr(644,root,root,755)
200 %{_libdir}/libdevmapper.a
201 %{_libdir}/libdevmapper-event.a
202
203 %files scripts
204 %defattr(644,root,root,755)
205 %dir %{_libdir}/%{name}
206 %{_libdir}/%{name}/*
207
208 %if %{with initrd}
209 %files initrd
210 %defattr(644,root,root,755)
211 %attr(755,root,root) %{_sbindir}/initrd-dmsetup
212
213 %files initrd-devel
214 %defattr(644,root,root,755)
215 %{_prefix}/%{_lib}/klibc/libdevmapper.a
216 %{_includedir}/klibc/libdevmapper.h
217 %endif
This page took 0.060476 seconds and 3 git commands to generate.