]> git.pld-linux.org Git - packages/cryptsetup.git/blob - cryptsetup.spec
1c22574551c2db9e74ad03520370c810709b2b8b
[packages/cryptsetup.git] / cryptsetup.spec
1 #
2 # Conditonal build:
3 %bcond_without  initrd          # don't build initrd version
4 %bcond_without  dietlibc        # build initrd version with static glibc instead of dietlibc
5 %bcond_without  python          # Python binding
6
7 Summary:        LUKS for dm-crypt implemented in cryptsetup
8 Summary(pl.UTF-8):      LUKS dla dm-crypta zaimplementowany w cryptsetup
9 Name:           cryptsetup
10 Version:        1.4.1
11 Release:        2
12 License:        GPL v2
13 Group:          Base
14 #Source0Download: http://code.google.com/p/cryptsetup/downloads/list
15 Source0:        http://cryptsetup.googlecode.com/files/%{name}-%{version}.tar.bz2
16 # Source0-md5:  9253b3f29abf5c6f333eb74128b0df1c
17 Source1:        initramfs-root-conf
18 Source2:        initramfs-root-hook
19 Source3:        initramfs-root-local-top
20 Source4:        initramfs-passdev-hook
21 Source5:        initramfs-README
22 Patch0:         diet.patch
23 Patch1:         dont-drag-more-libs.patch
24 URL:            http://code.google.com/p/cryptsetup/
25 BuildRequires:  autoconf >= 2.67
26 BuildRequires:  automake
27 BuildRequires:  device-mapper-devel >= 1.02.03
28 BuildRequires:  gettext-devel >= 0.15
29 BuildRequires:  libgcrypt-devel >= 1.1.42
30 BuildRequires:  libselinux-devel
31 BuildRequires:  libsepol-devel
32 BuildRequires:  libtool >= 2:2.0
33 BuildRequires:  libuuid-devel
34 BuildRequires:  popt-devel >= 1.7
35 Provides:       cryptsetup-luks = %{version}-%{release}
36 Obsoletes:      cryptsetup-luks < 1.4.1-2
37 %if %{with python}
38 BuildRequires:  python-devel >= 1:2.4
39 BuildRequires:  rpm-pythonprov
40 %endif
41 %if %{with initrd}
42 BuildRequires:  libgpg-error-static
43         %if %{with dietlibc}
44 BuildRequires:  device-mapper-dietlibc
45 BuildRequires:  dietlibc-static
46 BuildRequires:  libgcrypt-dietlibc
47 BuildRequires:  libuuid-dietlibc
48 BuildRequires:  popt-dietlibc
49         %else
50 BuildRequires:  device-mapper-static >= 1.02.07
51 BuildRequires:  libgcrypt-static >= 1.1.42
52 BuildRequires:  libselinux-static
53 BuildRequires:  libsepol-static
54 BuildRequires:  libuuid-static
55 BuildRequires:  popt-static
56         %endif
57 %endif
58 Requires:       popt >= 1.7
59 Provides:       cryptsetup = %{version}
60 Obsoletes:      cryptsetup
61 Conflicts:      udev < 1:118-1
62 Conflicts:      udev-core < 1:115
63 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64
65 %define         _sbindir        /sbin
66
67 %description
68 LUKS is the upcoming standard for Linux hard disk encryption. By
69 providing a standard on-disk-format, it does not only facilitate
70 compatibility among distributions, but also provide secure management
71 of multiple user passwords. In contrast to existing solution, LUKS
72 stores all setup necessary setup information in the partition header,
73 enabling the user to transport or migrate his data seamlessly.
74
75 This package contains implementation of LUKS for dm-crypt implemented
76 in cryptsetup.
77
78 %description -l pl.UTF-8
79 LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku.
80 Dostarczając standardowy format danych na dysku nie tylko ułatwia
81 utrzymanie kompatybilności między dystrybucjami, ale także dostarcza
82 bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie
83 do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne
84 informacje o konfiguracji w nagłówku partycji, pozwalając
85 użytkownikowi przenosić lub migrować dane w sposób przezroczysty.
86
87 Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
88 cryptsetup.
89
90 %package devel
91 Summary:        Header files for cryptsetup library
92 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki cryptsetup
93 Group:          Development/Libraries
94 Requires:       %{name} = %{version}-%{release}
95 Requires:       device-mapper-devel
96 Requires:       libgcrypt-devel >= 1.1.42
97 Provides:       cryptsetup-luks-devel = %{version}-%{release}
98 Obsoletes:      cryptsetup-luks-devel < 1.4.1-2
99
100 %description devel
101 Header files for cryptsetup library.
102
103 %description devel -l pl.UTF-8
104 Pliki nagłówkowe biblioteki cryptsetup.
105
106 %package static
107 Summary:        Static cryptsetup library
108 Summary(pl.UTF-8):      Statyczna biblioteka cryptsetup
109 Group:          Development/Libraries
110 Requires:       %{name}-devel = %{version}-%{release}
111 Provides:       cryptsetup-luks-static = %{version}-%{release}
112 Obsoletes:      cryptsetup-luks-static < 1.4.1-2
113
114 %description static
115 Static version of cryptsetup library.
116
117 %description static -l pl.UTF-8
118 Statyczna wersja biblioteki cryptsetup.
119
120 %package -n python-pycryptsetup
121 Summary:        Python binding for cryptsetup library
122 Summary(pl.UTF-8):      Wiązanie Pythona do biblioteki cryptsetup
123 Group:          Libraries/Python
124 Requires:       %{name}-libs = %{version}-%{release}
125 %pyrequires_eq  python-libs
126
127 %description -n python-pycryptsetup
128 Python binding for cryptsetup library.
129
130 %description -n python-pycryptsetup -l pl.UTF-8
131 Wiązanie Pythona do biblioteki cryptsetup.
132
133 %package initrd
134 Summary:        LUKS for dm-crypt implemented in cryptsetup - initrd version
135 Summary(pl.UTF-8):      LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
136 Group:          Base
137 Requires:       udev-initrd >= 1:115
138 Provides:       cryptsetup-luks-initrd = %{version}-%{release}
139 Obsoletes:      cryptsetup-luks-initrd < 1.4.1-2
140 Conflicts:      geninitrd < 10000.10
141
142 %description initrd
143 This package contains implementation of LUKS for dm-crypt implemented
144 in cryptsetup - statically linked for initrd.
145
146 %description initrd -l pl.UTF-8
147 Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną w
148 cryptsetup - wersję statycznie zlinkowaną dla initrd.
149
150 %package initramfs
151 Summary:        LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools
152 Summary(pl.UTF-8):      LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla initramfs-tools
153 Group:          Base
154 Requires:       %{name} = %{version}-%{release}
155 Requires:       initramfs-tools
156 Provides:       cryptsetup-luks-initramfs = %{version}-%{release}
157 Obsoletes:      cryptsetup-luks-initramfs < 1.4.1-2
158
159 %description initramfs
160 LUKS for dm-crypt implemented in cryptsetup - support scripts for
161 initramfs-tools.
162
163 %description initramfs -l pl.UTF-8
164 LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla
165 initramfs-tools.
166
167 %prep
168 %setup -q
169 %patch0 -p1
170 %patch1 -p1
171
172 cp -p %{SOURCE5} README.initramfs
173
174 %{__rm} po/stamp-po
175
176 %build
177 %{__gettextize}
178 %{__libtoolize}
179 %{__aclocal} -I m4
180 %{__autoconf}
181 %{__autoheader}
182 %{__automake}
183
184 %if %{with initrd}
185 CC="%{__cc}"
186 %configure \
187 %if %{with dietlibc}
188 %configure \
189         CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \
190         LIBS="-lcompat" \
191         ac_cv_lib_popt_poptConfigFileToString=yes \
192         ac_cv_lib_sepol_sepol_bool_set=no \
193         ac_cv_lib_selinux_is_selinux_enabled=no \
194 %endif
195 %if "%{?configure_cache}" == "1"
196         --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
197 %endif
198         --disable-shared \
199         --enable-static \
200         --enable-static-cryptsetup \
201         --disable-udev \
202         --disable-nls
203
204 %{__make} -C lib
205
206 %if %{with dietlibc}
207 # we have to do it by hand cause libtool "know better" and forces
208 # static libs from /usr/lib
209 CC="%{__cc}"
210 diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
211         -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
212         -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
213 %else
214 %{__make} -C src
215 mv src/cryptsetup cryptsetup-initrd
216 %endif
217
218 %{__make} clean
219 %endif
220
221 %configure \
222         --enable-udev \
223         --enable-static \
224         %{?with_python:--enable-python}
225 %{__make}
226
227 %install
228 rm -rf $RPM_BUILD_ROOT
229 install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top}
230
231 %{__make} install \
232         DESTDIR=$RPM_BUILD_ROOT
233
234 install -d $RPM_BUILD_ROOT/%{_lib}
235 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
236 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
237         $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
238
239 %if %{with initrd}
240 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
241 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
242 %endif
243
244 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
245 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot
246 install -p %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot
247 install -p %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev
248
249 %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.{la,a}}
250
251 %find_lang %{name}
252
253 %clean
254 rm -rf $RPM_BUILD_ROOT
255
256 %post   -p /sbin/ldconfig
257 %postun -p /sbin/ldconfig
258
259 %files -f %{name}.lang
260 %defattr(644,root,root,755)
261 %doc AUTHORS ChangeLog TODO
262 %attr(755,root,root) %{_sbindir}/cryptsetup
263 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
264 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.4
265 %{_mandir}/man8/cryptsetup.8*
266
267 %files devel
268 %defattr(644,root,root,755)
269 %attr(755,root,root) %{_libdir}/libcryptsetup.so
270 %{_libdir}/libcryptsetup.la
271 %{_includedir}/libcryptsetup.h
272 %{_pkgconfigdir}/libcryptsetup.pc
273
274 %files static
275 %defattr(644,root,root,755)
276 %{_libdir}/libcryptsetup.a
277
278 %if %{with python}
279 %files -n python-pycryptsetup
280 %defattr(644,root,root,755)
281 %attr(755,root,root) %{py_sitedir}/pycryptsetup.so
282 %endif
283
284 %if %{with initrd}
285 %files initrd
286 %defattr(644,root,root,755)
287 %attr(755,root,root) %{_libdir}/initrd/cryptsetup
288 %endif
289
290 %files initramfs
291 %defattr(644,root,root,755)
292 %doc README.initramfs
293 %attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
294 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot
295 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev
296 %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot
This page took 0.034914 seconds and 2 git commands to generate.