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