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: d2bc0fd59c1118ec3bfae099af38d333
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 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
36 BuildRequires: libgpg-error-static
38 BuildRequires: device-mapper-dietlibc
39 BuildRequires: dietlibc-static
40 BuildRequires: libgcrypt-dietlibc
41 BuildRequires: libuuid-dietlibc
42 BuildRequires: popt-dietlibc
44 BuildRequires: device-mapper-static >= 1.02.07
45 BuildRequires: libgcrypt-static >= 1.1.42
46 BuildRequires: libselinux-static
47 BuildRequires: libsepol-static
48 BuildRequires: libuuid-static
49 BuildRequires: popt-static
53 Provides: cryptsetup = %{version}
55 Conflicts: udev < 1:118-1
56 Conflicts: udev-core < 1:115
57 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59 %define _sbindir /sbin
62 LUKS is the upcoming standard for Linux hard disk encryption. By
63 providing a standard on-disk-format, it does not only facilitate
64 compatibility among distributions, but also provide secure management
65 of multiple user passwords. In contrast to existing solution, LUKS
66 stores all setup necessary setup information in the partition header,
67 enabling the user to transport or migrate his data seamlessly.
69 This package contains implementation of LUKS for dm-crypt implemented
72 %description -l pl.UTF-8
73 LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku.
74 Dostarczając standardowy format danych na dysku nie tylko ułatwia
75 utrzymanie kompatybilności między dystrybucjami, ale także dostarcza
76 bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie
77 do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne
78 informacje o konfiguracji w nagłówku partycji, pozwalając
79 użytkownikowi przenosić lub migrować dane w sposób przezroczysty.
81 Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
85 Summary: Header files for cryptsetup library
86 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cryptsetup
87 Group: Development/Libraries
88 Requires: %{name} = %{version}-%{release}
89 Requires: device-mapper-devel
90 Requires: libgcrypt-devel >= 1.1.42
91 Obsoletes: cryptsetup-devel
94 Header files for cryptsetup library.
96 %description devel -l pl.UTF-8
97 Pliki nagłówkowe biblioteki cryptsetup.
100 Summary: Static cryptsetup library
101 Summary(pl.UTF-8): Statyczna biblioteka cryptsetup
102 Group: Development/Libraries
103 Requires: %{name}-devel = %{version}-%{release}
104 Obsoletes: cryptsetup-static
107 Static version of cryptsetup library.
109 %description static -l pl.UTF-8
110 Statyczna wersja biblioteki cryptsetup.
113 Summary: LUKS for dm-crypt implemented in cryptsetup - initrd version
114 Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
116 Requires: udev-initrd >= 1:115
117 Conflicts: geninitrd < 10000.10
120 This package contains implementation of LUKS for dm-crypt implemented
121 in cryptsetup - statically linked for initrd.
123 %description initrd -l pl.UTF-8
124 Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną
125 w cryptsetup - wersję statycznie zlinkowaną dla initrd.
128 Summary: LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools
129 Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla initramfs-tools
131 Requires: %{name} = %{version}-%{release}
132 Requires: initramfs-tools
134 %description initramfs
135 LUKS for dm-crypt implemented in cryptsetup - support scripts
138 %description initramfs -l pl.UTF-8
139 LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla
143 %setup -q -n %{realname}-%{version}
147 cp -a %{SOURCE5} README.initramfs
164 CC="diet ${CC#ccache } %{rpmcflags} %{rpmldflags} -Os" \
166 ac_cv_lib_popt_poptConfigFileToString=yes \
167 ac_cv_lib_sepol_sepol_bool_set=no \
168 ac_cv_lib_selinux_is_selinux_enabled=no \
170 %if "%{?configure_cache}" == "1"
171 --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
175 --enable-static-cryptsetup \
181 # we have to do it by hand cause libtool "know better" and forces
182 # static libs from /usr/lib
184 diet ${CC#ccache } %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
185 -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
186 -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
189 mv src/cryptsetup cryptsetup-initrd
200 rm -rf $RPM_BUILD_ROOT
201 install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top}
204 DESTDIR=$RPM_BUILD_ROOT
206 install -d $RPM_BUILD_ROOT/%{_lib}
207 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
208 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
209 $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
212 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
213 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
216 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
217 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot
218 install -p %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot
219 install -p %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev
221 %find_lang %{realname}
224 rm -rf $RPM_BUILD_ROOT
226 %post -p /sbin/ldconfig
227 %postun -p /sbin/ldconfig
229 %files -f %{realname}.lang
230 %defattr(644,root,root,755)
231 %doc AUTHORS ChangeLog TODO
232 %attr(755,root,root) %{_sbindir}/cryptsetup
233 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
234 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.1
235 %{_mandir}/man8/cryptsetup.8*
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_libdir}/libcryptsetup.so
240 %{_libdir}/libcryptsetup.la
241 %{_includedir}/libcryptsetup.h
242 %{_pkgconfigdir}/libcryptsetup.pc
245 %defattr(644,root,root,755)
246 %{_libdir}/libcryptsetup.a
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_libdir}/initrd/cryptsetup
255 %defattr(644,root,root,755)
256 %doc README.initramfs
257 %attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
258 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot
259 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev
260 %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot