]> git.pld-linux.org Git - packages/device-mapper.git/blob - device-mapper.spec
- 1.02.07 needs make.tmpl change
[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.4
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_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         --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 %install
157 rm -rf $RPM_BUILD_ROOT
158 install -d $RPM_BUILD_ROOT/{%{_lib},%{_libdir}/%{name},/usr/{%{_lib},include}/klibc}
159
160 %{__make} install \
161         DESTDIR=$RPM_BUILD_ROOT
162
163 SONAME=$(cd $RPM_BUILD_ROOT%{_libdir}; echo libdevmapper.so.*.*)
164 ln -sf /%{_lib}/${SONAME} $RPM_BUILD_ROOT%{_libdir}/libdevmapper.so
165 mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.* $RPM_BUILD_ROOT/%{_lib}
166 install scripts/* $RPM_BUILD_ROOT/%{_libdir}/%{name}
167
168 install lib/ioctl/libdevmapper.a $RPM_BUILD_ROOT%{_libdir}
169 %{?with_initrd:install initrd-dmsetup $RPM_BUILD_ROOT%{_sbindir}}
170 %{?with_initrd:install initrd-libdevmapper.a $RPM_BUILD_ROOT/usr/%{_lib}/klibc/libdevmapper.a}
171 %{?with_initrd:install include/libdevmapper.h $RPM_BUILD_ROOT/usr/include/klibc}
172
173 %clean
174 rm -rf $RPM_BUILD_ROOT
175
176 %post   -p /sbin/ldconfig
177 %postun -p /sbin/ldconfig
178
179 %files
180 %defattr(644,root,root,755)
181 %doc INTRO INSTALL README scripts/*
182 %attr(755,root,root) %{_sbindir}/dmsetup
183 %attr(755,root,root) /%{_lib}/lib*.so.*.*
184 %{_mandir}/man8/*
185
186 %files devel
187 %defattr(644,root,root,755)
188 %attr(755,root,root) %{_libdir}/libdevmapper.so
189 %{_includedir}/*.h
190
191 %files static
192 %defattr(644,root,root,755)
193 %{_libdir}/lib*.a
194
195 %files scripts
196 %defattr(644,root,root,755)
197 %dir %{_libdir}/%{name}
198 %{_libdir}/%{name}/*
199
200 %if %{with initrd}
201 %files initrd
202 %defattr(644,root,root,755)
203 %attr(755,root,root) %{_sbindir}/initrd-dmsetup
204
205 %files initrd-devel
206 %defattr(644,root,root,755)
207 %{_prefix}/%{_lib}/klibc/libdevmapper.a
208 %{_includedir}/klibc/libdevmapper.h
209 %endif
This page took 1.148995 seconds and 3 git commands to generate.