3 %bcond_without initrd # don't build initrd version
4 %bcond_without dietlibc # build initrd version with static glibc instead of dietlibc
6 %define realname cryptsetup
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/%{realname}-%{version}.tar.bz2
16 # Source0-md5: 1f5b5a9d538e8a3c191fb7dd85b9b013
17 Source1: %{name}-initramfs-root-conf
18 Source2: %{name}-initramfs-root-hook
19 Source3: %{name}-initramfs-root-local-top
20 Source4: %{name}-initramfs-passdev-hook
21 Source5: %{name}-initramfs-README
22 Patch0: %{name}-diet.patch
23 Patch1: %{name}-pl.po-update.patch
24 Patch2: %{name}-dont-drag-more-libs.patch
25 URL: http://code.google.com/p/cryptsetup/
26 BuildRequires: autoconf >= 2.67
27 BuildRequires: automake
28 BuildRequires: device-mapper-devel >= 1.02.03
29 BuildRequires: gettext-devel >= 0.15
30 BuildRequires: libgcrypt-devel >= 1.1.42
31 BuildRequires: libselinux-devel
32 BuildRequires: libsepol-devel
33 BuildRequires: libtool >= 2:2.0
34 BuildRequires: libuuid-devel
35 BuildRequires: popt-devel >= 1.7
37 BuildRequires: libgpg-error-static
39 BuildRequires: device-mapper-dietlibc
40 BuildRequires: dietlibc-static
41 BuildRequires: libgcrypt-dietlibc
42 BuildRequires: libuuid-dietlibc
43 BuildRequires: popt-dietlibc
45 BuildRequires: device-mapper-static >= 1.02.07
46 BuildRequires: libgcrypt-static >= 1.1.42
47 BuildRequires: libselinux-static
48 BuildRequires: libsepol-static
49 BuildRequires: libuuid-static
50 BuildRequires: popt-static
54 Provides: cryptsetup = %{version}
56 Conflicts: udev < 1:118-1
57 Conflicts: udev-core < 1:115
58 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60 %define _sbindir /sbin
63 LUKS is the upcoming standard for Linux hard disk encryption. By
64 providing a standard on-disk-format, it does not only facilitate
65 compatibility among distributions, but also provide secure management
66 of multiple user passwords. In contrast to existing solution, LUKS
67 stores all setup necessary setup information in the partition header,
68 enabling the user to transport or migrate his data seamlessly.
70 This package contains implementation of LUKS for dm-crypt implemented
73 %description -l pl.UTF-8
74 LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku.
75 Dostarczając standardowy format danych na dysku nie tylko ułatwia
76 utrzymanie kompatybilności między dystrybucjami, ale także dostarcza
77 bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie
78 do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne
79 informacje o konfiguracji w nagłówku partycji, pozwalając
80 użytkownikowi przenosić lub migrować dane w sposób przezroczysty.
82 Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
86 Summary: Header files for cryptsetup library
87 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cryptsetup
88 Group: Development/Libraries
89 Requires: %{name} = %{version}-%{release}
90 Requires: device-mapper-devel
91 Requires: libgcrypt-devel >= 1.1.42
92 Obsoletes: cryptsetup-devel
95 Header files for cryptsetup library.
97 %description devel -l pl.UTF-8
98 Pliki nagłówkowe biblioteki cryptsetup.
101 Summary: Static cryptsetup library
102 Summary(pl.UTF-8): Statyczna biblioteka cryptsetup
103 Group: Development/Libraries
104 Requires: %{name}-devel = %{version}-%{release}
105 Obsoletes: cryptsetup-static
108 Static version of cryptsetup library.
110 %description static -l pl.UTF-8
111 Statyczna wersja biblioteki cryptsetup.
114 Summary: LUKS for dm-crypt implemented in cryptsetup - initrd version
115 Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
117 Requires: udev-initrd >= 1:115
118 Conflicts: geninitrd < 10000.10
121 This package contains implementation of LUKS for dm-crypt implemented
122 in cryptsetup - statically linked for initrd.
124 %description initrd -l pl.UTF-8
125 Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną
126 w cryptsetup - wersję statycznie zlinkowaną dla initrd.
129 Summary: LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools
130 Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla initramfs-tools
132 Requires: %{name} = %{version}-%{release}
133 Requires: initramfs-tools
135 %description initramfs
136 LUKS for dm-crypt implemented in cryptsetup - support scripts
139 %description initramfs -l pl.UTF-8
140 LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla
144 %setup -q -n %{realname}-%{version}
149 cp -a %{SOURCE5} README.initramfs
166 CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \
168 ac_cv_lib_popt_poptConfigFileToString=yes \
169 ac_cv_lib_sepol_sepol_bool_set=no \
170 ac_cv_lib_selinux_is_selinux_enabled=no \
172 %if "%{?configure_cache}" == "1"
173 --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
177 --enable-static-cryptsetup \
178 --with-crypto_backend=kernel \
185 # we have to do it by hand cause libtool "know better" and forces
186 # static libs from /usr/lib
188 diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
189 -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
190 -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
193 mv src/cryptsetup cryptsetup-initrd
205 rm -rf $RPM_BUILD_ROOT
206 install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top}
209 DESTDIR=$RPM_BUILD_ROOT
211 install -d $RPM_BUILD_ROOT/%{_lib}
212 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
213 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
214 $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
217 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
218 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
221 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
222 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot
223 install -p %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot
224 install -p %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev
226 %find_lang %{realname}
229 rm -rf $RPM_BUILD_ROOT
231 %post -p /sbin/ldconfig
232 %postun -p /sbin/ldconfig
234 %files -f %{realname}.lang
235 %defattr(644,root,root,755)
236 %doc AUTHORS ChangeLog TODO
237 %attr(755,root,root) %{_sbindir}/cryptsetup
238 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
239 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.1
240 %{_mandir}/man8/cryptsetup.8*
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{_libdir}/libcryptsetup.so
245 %{_libdir}/libcryptsetup.la
246 %{_includedir}/libcryptsetup.h
247 %{_pkgconfigdir}/libcryptsetup.pc
250 %defattr(644,root,root,755)
251 %{_libdir}/libcryptsetup.a
255 %defattr(644,root,root,755)
256 %attr(755,root,root) %{_libdir}/initrd/cryptsetup
260 %defattr(644,root,root,755)
261 %doc README.initramfs
262 %attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
263 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot
264 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev
265 %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot