]> git.pld-linux.org Git - packages/device-mapper.git/blob - device-mapper.spec
d8dd234b25c0471d0695806f2f08cef8ae20258c
[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.05
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:  e5cfc57a6e36af883dfedd9e9106f97e
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_selinux:BuildRequires:  libselinux-devel >= 1.10}
23 %{?with_selinux:Requires:       libselinux >= 1.10}
24 %{?with_initrd:BuildRequires:   klibc-static}
25 Conflicts:      dev < 2.9.0-8
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define         _sbindir        /sbin
29
30 %description
31 The goal of this driver is to support volume management.
32 The driver enables the definition of new block devices composed of
33 ranges of sectors of existing devices. This can be used to define
34 disk partitions - or logical volumes. This light-weight kernel
35 component can support user-space tools for logical volume management.
36
37 %description -l pl
38 Celem tego sterownika jest obs³uga zarz±dzania wolumenami.
39 Sterownik w³±cza definiowanie nowych urz±dzeñ blokowych z³o¿onych z
40 przedzia³ów sektorów na istniej±cych urz±dzeniach. Mo¿e to byæ
41 wykorzystane do definiowania partycji na dysku lub logicznych
42 wolumenów. Ten lekki sk³adnik j±dra mo¿e wspieraæ dzia³aj±ce w
43 przestrzeni u¿ytkownika narzêdzia do zarz±dzania logicznymi
44 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         --disable-selinux \
130         --with-optimisation="%{rpmcflags}" \
131         --with-user=%(id -u) \
132         --with-group=%(id -g) \
133         --with-interface=ioctl \
134         --enable-static_link \
135         --disable-dynamic_link \
136         --enable-klibc \
137         CC="klcc -static"
138 sed -i -e 's#-Dmalloc=rpl_malloc##g' make.tmpl
139 %{__make}
140
141 cp -a dmsetup/dmsetup.static initrd-dmsetup
142 cp -a lib/ioctl/libdevmapper.a initrd-libdevmapper.a
143 %{__make} clean
144 %endif
145
146 %configure \
147         --%{?with_selinux:en}%{!?with_selinux:dis}able-selinux \
148         --with-optimisation="%{rpmcflags} -DHAVE_GETOPTLONG" \
149         --with-user=%(id -u) \
150         --with-group=%(id -g) \
151         --with-interface=ioctl \
152         --enable-dmeventd \
153         --disable-klibc
154 %{__make}
155
156 ar cru libdevmapper.a lib/ioctl/*.o lib/*.o
157 ranlib libdevmapper.a
158
159 %install
160 rm -rf $RPM_BUILD_ROOT
161 install -d $RPM_BUILD_ROOT/{%{_lib},%{_libdir}/%{name},/usr/{%{_lib},include}/klibc}
162
163 %{__make} install \
164         DESTDIR=$RPM_BUILD_ROOT
165
166 SONAME=$(basename $(ls -1 $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.*))
167 ln -sf /%{_lib}/${SONAME} $RPM_BUILD_ROOT%{_libdir}/libdevmapper.so
168 mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.* $RPM_BUILD_ROOT/%{_lib}
169 install scripts/* $RPM_BUILD_ROOT/%{_libdir}/%{name}
170
171 install libdevmapper.a $RPM_BUILD_ROOT%{_libdir}
172 %{?with_initrd:install initrd-dmsetup $RPM_BUILD_ROOT%{_sbindir}}
173 %{?with_initrd:install initrd-libdevmapper.a $RPM_BUILD_ROOT/usr/%{_lib}/klibc/libdevmapper.a}
174 %{?with_initrd:install include/libdevmapper.h $RPM_BUILD_ROOT/usr/include/klibc}
175
176 %clean
177 rm -rf $RPM_BUILD_ROOT
178
179 %post   -p /sbin/ldconfig
180 %postun -p /sbin/ldconfig
181
182 %files
183 %defattr(644,root,root,755)
184 %doc INTRO INSTALL README scripts/*
185 %attr(755,root,root) %{_sbindir}/dmsetup
186 %attr(755,root,root) /%{_lib}/lib*.so.*.*
187 %{_mandir}/man8/*
188
189 %files devel
190 %defattr(644,root,root,755)
191 %attr(755,root,root) %{_libdir}/libdevmapper.so
192 %{_includedir}/*.h
193
194 %files static
195 %defattr(644,root,root,755)
196 %{_libdir}/lib*.a
197
198 %files scripts
199 %defattr(644,root,root,755)
200 %dir %{_libdir}/%{name}
201 %{_libdir}/%{name}/*
202
203 %if %{with initrd}
204 %files initrd
205 %defattr(644,root,root,755)
206 %attr(755,root,root) %{_sbindir}/initrd-dmsetup
207
208 %files initrd-devel
209 %defattr(644,root,root,755)
210 /usr/%{_lib}/klibc/libdevmapper.a
211 /usr/include/klibc/libdevmapper.h
212 %endif
This page took 0.070061 seconds and 2 git commands to generate.