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 \
184 # we have to do it by hand cause libtool "know better" and forces
185 # static libs from /usr/lib
187 diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
188 -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
189 -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
192 mv src/cryptsetup cryptsetup-initrd
204 rm -rf $RPM_BUILD_ROOT
205 install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top}
208 DESTDIR=$RPM_BUILD_ROOT
210 install -d $RPM_BUILD_ROOT/%{_lib}
211 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
212 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
213 $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
216 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
217 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
220 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
221 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot
222 install -p %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot
223 install -p %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev
225 %find_lang %{realname}
228 rm -rf $RPM_BUILD_ROOT
230 %post -p /sbin/ldconfig
231 %postun -p /sbin/ldconfig
233 %files -f %{realname}.lang
234 %defattr(644,root,root,755)
235 %doc AUTHORS ChangeLog TODO
236 %attr(755,root,root) %{_sbindir}/cryptsetup
237 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
238 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.1
239 %{_mandir}/man8/cryptsetup.8*
242 %defattr(644,root,root,755)
243 %attr(755,root,root) %{_libdir}/libcryptsetup.so
244 %{_libdir}/libcryptsetup.la
245 %{_includedir}/libcryptsetup.h
246 %{_pkgconfigdir}/libcryptsetup.pc
249 %defattr(644,root,root,755)
250 %{_libdir}/libcryptsetup.a
254 %defattr(644,root,root,755)
255 %attr(755,root,root) %{_libdir}/initrd/cryptsetup
259 %defattr(644,root,root,755)
260 %doc README.initramfs
261 %attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
262 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot
263 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev
264 %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot