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
7 Summary: LUKS for dm-crypt implemented in cryptsetup
8 Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup
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
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
38 BuildRequires: python-devel >= 1:2.4
39 BuildRequires: rpm-pythonprov
42 BuildRequires: libgpg-error-static
44 BuildRequires: device-mapper-dietlibc
45 BuildRequires: dietlibc-static
46 BuildRequires: libgcrypt-dietlibc
47 BuildRequires: libuuid-dietlibc
48 BuildRequires: popt-dietlibc
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
59 Provides: cryptsetup = %{version}
61 Conflicts: udev < 1:118-1
62 Conflicts: udev-core < 1:115
63 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65 %define _sbindir /sbin
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.
75 This package contains implementation of LUKS for dm-crypt implemented
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.
87 Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
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
101 Header files for cryptsetup library.
103 %description devel -l pl.UTF-8
104 Pliki nagłówkowe biblioteki cryptsetup.
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
115 Static version of cryptsetup library.
117 %description static -l pl.UTF-8
118 Statyczna wersja biblioteki cryptsetup.
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
127 %description -n python-pycryptsetup
128 Python binding for cryptsetup library.
130 %description -n python-pycryptsetup -l pl.UTF-8
131 Wiązanie Pythona do biblioteki cryptsetup.
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
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
143 This package contains implementation of LUKS for dm-crypt implemented
144 in cryptsetup - statically linked for initrd.
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.
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
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
159 %description initramfs
160 LUKS for dm-crypt implemented in cryptsetup - support scripts for
163 %description initramfs -l pl.UTF-8
164 LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla
172 cp -p %{SOURCE5} README.initramfs
189 CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \
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 \
195 %if "%{?configure_cache}" == "1"
196 --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
200 --enable-static-cryptsetup \
207 # we have to do it by hand cause libtool "know better" and forces
208 # static libs from /usr/lib
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
215 mv src/cryptsetup cryptsetup-initrd
224 %{?with_python:--enable-python}
228 rm -rf $RPM_BUILD_ROOT
229 install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top}
232 DESTDIR=$RPM_BUILD_ROOT
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
240 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
241 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
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
249 %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.{la,a}}
254 rm -rf $RPM_BUILD_ROOT
256 %post -p /sbin/ldconfig
257 %postun -p /sbin/ldconfig
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*
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
275 %defattr(644,root,root,755)
276 %{_libdir}/libcryptsetup.a
279 %files -n python-pycryptsetup
280 %defattr(644,root,root,755)
281 %attr(755,root,root) %{py_sitedir}/pycryptsetup.so
286 %defattr(644,root,root,755)
287 %attr(755,root,root) %{_libdir}/initrd/cryptsetup
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