]> git.pld-linux.org Git - packages/device-mapper.git/blob - device-mapper.spec
aa6d8348669be4be9b0edde834eac7712c159bf4
[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.01.04
10 Release:        1
11 License:        GPL
12 Group:          Applications/System
13 Source0:        ftp://sources.redhat.com/pub/dm/%{name}.%{version}.tgz
14 # Source0-md5:  42dd0610e24d4b4f2409a32a04e6e37f
15 Patch0:         %{name}-stack.patch
16 # http://www.redhat.com/archives/dm-devel/2005-March/msg00022.html
17 Patch1:         %{name}-disable_dynamic_link.patch
18 Patch2:         %{name}-klibc.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}
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 %build
119 cp -f /usr/share/automake/config.sub autoconf
120 %{__aclocal}
121 %{__autoconf}
122
123 %if %{with initrd}
124 %configure \
125         --disable-selinux \
126         --with-optimisation="%{rpmcflags}" \
127         --with-user=%(id -u) \
128         --with-group=%(id -g) \
129         --with-interface=ioctl \
130         --enable-static_link \
131         --disable-dynamic_link \
132         --enable-klibc \
133         CC="klcc"
134 %{__make}
135
136 cp -a dmsetup/dmsetup.static initrd-dmsetup
137 cp -a lib/ioctl/libdevmapper.a initrd-libdevmapper.a
138 %{__make} clean
139 %endif
140
141 %configure \
142         --%{?with_selinux:en}%{!?with_selinux:dis}able-selinux \
143         --with-optimisation="%{rpmcflags}" \
144         --with-user=%(id -u) \
145         --with-group=%(id -g) \
146         --with-interface=ioctl \
147         --disable-klibc
148 %{__make}
149
150 ar cru libdevmapper.a lib/ioctl/*.o lib/*.o
151 ranlib libdevmapper.a
152
153 %install
154 rm -rf $RPM_BUILD_ROOT
155 install -d $RPM_BUILD_ROOT/{%{_lib},%{_libdir}/%{name},/usr/{%{_lib},include}/klibc}
156
157 %{__make} install \
158         DESTDIR=$RPM_BUILD_ROOT
159
160 SONAME=$(basename $(ls -1 $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.*))
161 ln -sf /%{_lib}/${SONAME} $RPM_BUILD_ROOT%{_libdir}/libdevmapper.so
162 mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.* $RPM_BUILD_ROOT/%{_lib}
163 install scripts/* $RPM_BUILD_ROOT/%{_libdir}/%{name}
164
165 install libdevmapper.a $RPM_BUILD_ROOT%{_libdir}
166 %{?with_initrd:install initrd-dmsetup $RPM_BUILD_ROOT%{_sbindir}}
167 %{?with_initrd:install initrd-libdevmapper.a $RPM_BUILD_ROOT/usr/%{_lib}/klibc/libdevmapper.a}
168 %{?with_initrd:install include/libdevmapper.h $RPM_BUILD_ROOT/usr/include/klibc}
169
170 %clean
171 rm -rf $RPM_BUILD_ROOT
172
173 %post   -p /sbin/ldconfig
174 %postun -p /sbin/ldconfig
175
176 %files
177 %defattr(644,root,root,755)
178 %doc INTRO INSTALL README scripts/*
179 %attr(755,root,root) %{_sbindir}/dmsetup
180 %attr(755,root,root) /%{_lib}/lib*.so.*.*
181 %{_mandir}/man8/*
182
183 %files devel
184 %defattr(644,root,root,755)
185 %attr(755,root,root) %{_libdir}/libdevmapper.so
186 %{_includedir}/*.h
187
188 %files static
189 %defattr(644,root,root,755)
190 %{_libdir}/lib*.a
191
192 %files scripts
193 %defattr(644,root,root,755)
194 %dir %{_libdir}/%{name}
195 %{_libdir}/%{name}/*
196
197 %files initrd
198 %defattr(644,root,root,755)
199 %attr(755,root,root) %{_sbindir}/initrd-dmsetup
200
201 %files initrd-devel
202 %defattr(644,root,root,755)
203 /usr/%{_lib}/klibc/libdevmapper.a
204 /usr/include/klibc/libdevmapper.h
This page took 0.052437 seconds and 2 git commands to generate.