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 Source0: http://luks.endorphin.org/source/%{realname}-%{version}.tar.bz2
15 # Source0-md5: 00d452eb7a76e39f5749545d48934a10
16 Source1: %{name}-initramfs-root-conf
17 Source2: %{name}-initramfs-root-hook
18 Source3: %{name}-initramfs-root-local-top
19 Source4: %{name}-initramfs-passdev-hook
20 Source5: %{name}-initramfs-README
21 Patch1: %{name}-nostatic.patch
22 Patch2: %{name}-udev.patch
23 Patch3: %{name}-diet.patch
24 URL: http://luks.endorphin.org/
25 BuildRequires: autoconf
26 BuildRequires: automake
27 BuildRequires: device-mapper-devel
28 BuildRequires: gettext-devel
29 BuildRequires: libgcrypt-devel >= 1.1.42
30 BuildRequires: libselinux-devel
31 BuildRequires: libsepol-devel
32 BuildRequires: libtool
33 BuildRequires: libuuid-devel
34 BuildRequires: popt-devel
36 BuildRequires: libgpg-error-static
38 BuildRequires: device-mapper-dietlibc
39 BuildRequires: libgcrypt-dietlibc
40 BuildRequires: libuuid-dietlibc
41 BuildRequires: popt-dietlibc
43 BuildRequires: device-mapper-static >= 1.02.07
44 BuildRequires: libgcrypt-static >= 1.1.42
45 BuildRequires: libselinux-static
46 BuildRequires: libsepol-static
47 BuildRequires: libuuid-static
48 BuildRequires: popt-static
51 Provides: cryptsetup = %{version}
53 Conflicts: udev < 1:118-1
54 Conflicts: udev-core < 1:115
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 %define _sbindir /sbin
58 %define _noautoreqdep libcryptsetup.so.0
61 LUKS is the upcoming standard for Linux hard disk encryption. By
62 providing a standard on-disk-format, it does not only facilitate
63 compatibility among distributions, but also provide secure management
64 of multiple user passwords. In contrast to existing solution, LUKS
65 stores all setup necessary setup information in the partition header,
66 enabling the user to transport or migrate his data seamlessly.
68 This package contains implementation of LUKS for dm-crypt implemented
71 %description -l pl.UTF-8
72 LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku.
73 Dostarczając standardowy format danych na dysku nie tylko ułatwia
74 utrzymanie kompatybilności między dystrybucjami, ale także dostarcza
75 bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie
76 do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne
77 informacje o konfiguracji w nagłówku partycji, pozwalając
78 użytkownikowi przenosić lub migrować dane w sposób przezroczysty.
80 Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
84 Summary: Header files for cryptsetup library
85 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cryptsetup
86 Group: Development/Libraries
87 Requires: %{name} = %{version}-%{release}
88 Requires: device-mapper-devel
89 Requires: libgcrypt-devel >= 1.1.42
90 Obsoletes: cryptsetup-devel
93 Header files for cryptsetup library.
95 %description devel -l pl.UTF-8
96 Pliki nagłówkowe biblioteki cryptsetup.
99 Summary: Static cryptsetup library
100 Summary(pl.UTF-8): Statyczna biblioteka cryptsetup
101 Group: Development/Libraries
102 Requires: %{name}-devel = %{version}-%{release}
103 Obsoletes: cryptsetup-static
106 Static version of cryptsetup library.
108 %description static -l pl.UTF-8
109 Statyczna wersja biblioteki cryptsetup.
112 Summary: LUKS for dm-crypt implemented in cryptsetup - initrd version
114 Requires: udev-initrd >= 1:115
115 Conflicts: geninitrd <= 10000.3
118 This package contains implementation of LUKS for dm-crypt implemented
119 in cryptsetup - staticaly linked for initrd.
122 Summary: LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools
123 Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla initramfs-tools
125 Requires: %{name} = %{version}-%{release}
126 Requires: initramfs-tools
128 %description initramfs
129 LUKS for dm-crypt implemented in cryptsetup - support scripts
132 %description initramfs -l pl.UTF-8
133 LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla
137 %setup -q -n %{realname}-%{version}
142 install %{SOURCE5} README.initramfs
155 CC="diet %{__cc} -Os %{rpmldflags}" \
156 ac_cv_lib_popt_poptConfigFileToString=yes \
157 ac_cv_lib_sepol_sepol_bool_set=no \
158 ac_cv_lib_selinux_is_selinux_enabled=no \
160 --disable-shared-library \
162 --enable-static-cryptsetup \
169 # we have to do it by hand cause libtool "know better" and forces
170 # static libs from /usr/lib
171 diet %{__cc} -Os -I./lib -static -o cryptsetup-initrd src/cryptsetup.c \
172 ./lib/.libs/libcryptsetup.a -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
175 mv src/cryptsetup cryptsetup-initrd
186 rm -rf $RPM_BUILD_ROOT
187 install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top}
190 DESTDIR=$RPM_BUILD_ROOT
192 install -d $RPM_BUILD_ROOT/%{_lib}
193 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
194 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
195 $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
198 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
199 install cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
202 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
203 install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot
204 install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot
205 install %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev
207 %find_lang %{realname}
210 rm -rf $RPM_BUILD_ROOT
212 %post -p /sbin/ldconfig
213 %postun -p /sbin/ldconfig
215 %files -f %{realname}.lang
216 %defattr(644,root,root,755)
217 %doc AUTHORS ChangeLog TODO
218 %attr(755,root,root) %{_sbindir}/cryptsetup
219 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
220 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.0
221 %{_mandir}/man8/cryptsetup.8*
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_libdir}/libcryptsetup.so
226 %{_libdir}/libcryptsetup.la
227 %{_includedir}/libcryptsetup.h
230 %defattr(644,root,root,755)
231 %{_libdir}/libcryptsetup.a
235 %defattr(644,root,root,755)
236 %attr(755,root,root) %{_libdir}/initrd/cryptsetup
240 %defattr(644,root,root,755)
241 %doc README.initramfs
242 %attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
243 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot
244 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev
245 %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot