]> git.pld-linux.org Git - packages/device-mapper.git/blob - device-mapper.spec
- adds '--disable-dynamic-link' option to device-mapper's configure script
[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 %bcond_with     glibc           # build glibc-based initrd version
6 #
7 %ifnarch %{ix86}
8 %define with_glibc 1
9 %endif
10 Summary:        Userspace support for the device-mapper
11 Summary(pl):    Wsparcie dla mapowania urz±dzeñ w przestrzeni u¿ytkownika
12 Name:           device-mapper
13 Version:        1.01.03
14 Release:        2
15 License:        GPL
16 Group:          Applications/System
17 Source0:        ftp://sources.redhat.com/pub/dm/%{name}.%{version}.tgz
18 # Source0-md5:  10469034e2f1f1483fd3d80fb3883af2
19 Patch0:         %{name}-stack.patch
20 URL:            http://sources.redhat.com/dm/
21 BuildRequires:  autoconf
22 BuildRequires:  automake
23 %{?with_selinux:BuildRequires:  libselinux-devel >= 1.10}
24 %{?with_selinux:Requires:       libselinux >= 1.10}
25 %if %{with initrd}
26 %{?with_glibc:BuildRequires:    glibc-static}
27 %{?!with_glibc:BuildRequires:   uClibc-static}
28 %endif
29 Conflicts:      dev < 2.9.0-8
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %define         _sbindir        /sbin
33
34 %description
35 The goal of this driver is to support volume management.
36 The driver enables the definition of new block devices composed of
37 ranges of sectors of existing devices. This can be used to define
38 disk partitions - or logical volumes. This light-weight kernel
39 component can support user-space tools for logical volume management.
40
41 %description -l pl
42 Celem tego sterownika jest obs³uga zarz±dzania wolumenami.
43 Sterownik w³±cza definiowanie nowych urz±dzeñ blokowych z³o¿onych z
44 przedzia³ów sektorów na istniej±cych urz±dzeniach. Mo¿e to byæ
45 wykorzystane do definiowania partycji na dysku lub logicznych
46 wolumenów. Ten lekki sk³adnik j±dra mo¿e wspieraæ dzia³aj±ce w
47 przestrzeni u¿ytkownika narzêdzia do zarz±dzania logicznymi
48 wolumenami.
49
50 %package initrd
51 Summary:        Userspace support for the device-mapper - static dmsetup for initrd
52 Summary(pl):    Wsparcie dla mapowania urz±dzeñ w przestrzeni u¿ytkownika - statyczne dmsetup dla initrd
53 Group:          Applications/System
54 Requires:       %{name} = %{version}-%{release}
55
56 %description initrd
57 Userspace support for the device-mapper - static dmsetup binary for initrd.
58
59 %description initrd -l pl
60 Wsparcie dla mapowania urz±dzeñ w przestrzeni u¿ytkownika - statyczna wersja
61 dmsetup dla initrd.
62
63 %package devel
64 Summary:        Header files and development documentation for %{name}
65 Summary(pl):    Pliki nag³ówkowe i dokumentacja do %{name}
66 Group:          Development/Libraries
67 Requires:       %{name} = %{version}-%{release}
68
69 %description devel
70 Header files and development documentation for %{name}.
71
72 %description devel -l pl
73 Pliki nag³ówkowe i dokumentacja do %{name}.
74
75 %package static
76 Summary:        Static devmapper library
77 Summary(pl):    Statyczna biblioteka devmapper
78 Group:          Development/Libraries
79 Requires:       %{name}-devel = %{version}-%{release}
80
81 %description static
82 Static devmapper library.
83
84 %description static -l pl
85 Statyczna biblioteka devmapper.
86
87 %package scripts
88 Summary:        Additional scripts
89 Summary(pl):    Dodatkowe skrypty
90 Group:          Applications/System
91 Requires:       %{name} = %{version}-%{release}
92 Requires:       util-linux
93
94 %description scripts
95 Additional scripts.
96
97 %description scripts -l pl
98 Dodatkowe skrypty.
99
100 %prep
101 %setup -q -n %{name}.%{version}
102 %patch0 -p1
103
104 %build
105 cp -f /usr/share/automake/config.sub autoconf
106 %{__aclocal}
107 %{__autoconf}
108
109 %if %{with initrd}
110 %configure \
111         --disable-selinux \
112         --with-optimisation="%{rpmcflags}" \
113         --with-user=%(id -u) \
114         --with-group=%(id -g) \
115         --with-interface=ioctl \
116         --enable-static_link \
117         %{?!with_glibc:CC="%{_target_cpu}-uclibc-gcc"}
118 %{__make}
119
120 cp -a dmsetup/dmsetup.static initrd-dmsetup
121 %{__make} clean
122 %endif
123
124 %configure \
125         --%{?with_selinux:en}%{!?with_selinux:dis}able-selinux \
126         --with-optimisation="%{rpmcflags}" \
127         --with-user=%(id -u) \
128         --with-group=%(id -g) \
129         --with-interface=ioctl
130 %{__make}
131
132 ar cru libdevmapper.a lib/ioctl/*.o lib/*.o
133 ranlib libdevmapper.a
134
135 %install
136 rm -rf $RPM_BUILD_ROOT
137 install -d $RPM_BUILD_ROOT/{%{_lib},%{_libdir}/%{name}}
138
139 %{__make} install \
140         DESTDIR=$RPM_BUILD_ROOT
141
142 SONAME=$(basename $(ls -1 $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.*))
143 ln -sf /%{_lib}/${SONAME} $RPM_BUILD_ROOT%{_libdir}/libdevmapper.so
144 mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.* $RPM_BUILD_ROOT/%{_lib}
145 install scripts/* $RPM_BUILD_ROOT/%{_libdir}/%{name}
146
147 install libdevmapper.a $RPM_BUILD_ROOT%{_libdir}
148 %{?with_initrd:install initrd-dmsetup $RPM_BUILD_ROOT%{_sbindir}}
149
150 %clean
151 rm -rf $RPM_BUILD_ROOT
152
153 %post   -p /sbin/ldconfig
154 %postun -p /sbin/ldconfig
155
156 %files
157 %defattr(644,root,root,755)
158 %doc INTRO INSTALL README scripts/*
159 %attr(755,root,root) %{_sbindir}/dmsetup
160 %attr(755,root,root) /%{_lib}/lib*.so.*.*
161 %{_mandir}/man8/*
162
163 %files devel
164 %defattr(644,root,root,755)
165 %attr(755,root,root) %{_libdir}/libdevmapper.so
166 %{_includedir}/*.h
167
168 %files static
169 %defattr(644,root,root,755)
170 %{_libdir}/lib*.a
171
172 %files scripts
173 %defattr(644,root,root,755)
174 %dir %{_libdir}/%{name}
175 %{_libdir}/%{name}/*
176
177 %files initrd
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_sbindir}/initrd-dmsetup
This page took 0.283319 seconds and 3 git commands to generate.