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://cryptsetup.googlecode.com/files/%{realname}-%{version}.tar.bz2
15 # Source0-md5: f3928c1f1d49fcee39bb1e8d42fe707a
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 Patch0: %{name}-nostatic.patch
22 URL: http://code.google.com/p/cryptsetup/
23 BuildRequires: autoconf >= 2.57
24 BuildRequires: automake
25 BuildRequires: device-mapper-devel >= 1.02.03
26 BuildRequires: gettext-devel >= 0.15
27 BuildRequires: libgcrypt-devel >= 1.1.42
28 BuildRequires: libselinux-devel
29 BuildRequires: libsepol-devel
30 BuildRequires: libtool
31 BuildRequires: libuuid-devel
32 BuildRequires: popt-devel >= 1.7
34 BuildRequires: libgpg-error-static
36 BuildRequires: device-mapper-dietlibc
37 BuildRequires: dietlibc-static
38 BuildRequires: libgcrypt-dietlibc
39 BuildRequires: libuuid-dietlibc
40 BuildRequires: popt-dietlibc
42 BuildRequires: device-mapper-static >= 1.02.07
43 BuildRequires: libgcrypt-static >= 1.1.42
44 BuildRequires: libselinux-static
45 BuildRequires: libsepol-static
46 BuildRequires: libuuid-static
47 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
60 LUKS is the upcoming standard for Linux hard disk encryption. By
61 providing a standard on-disk-format, it does not only facilitate
62 compatibility among distributions, but also provide secure management
63 of multiple user passwords. In contrast to existing solution, LUKS
64 stores all setup necessary setup information in the partition header,
65 enabling the user to transport or migrate his data seamlessly.
67 This package contains implementation of LUKS for dm-crypt implemented
70 %description -l pl.UTF-8
71 LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku.
72 Dostarczając standardowy format danych na dysku nie tylko ułatwia
73 utrzymanie kompatybilności między dystrybucjami, ale także dostarcza
74 bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie
75 do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne
76 informacje o konfiguracji w nagłówku partycji, pozwalając
77 użytkownikowi przenosić lub migrować dane w sposób przezroczysty.
79 Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
83 Summary: Header files for cryptsetup library
84 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cryptsetup
85 Group: Development/Libraries
86 Requires: %{name} = %{version}-%{release}
87 Requires: device-mapper-devel
88 Requires: libgcrypt-devel >= 1.1.42
89 Obsoletes: cryptsetup-devel
92 Header files for cryptsetup library.
94 %description devel -l pl.UTF-8
95 Pliki nagłówkowe biblioteki cryptsetup.
98 Summary: Static cryptsetup library
99 Summary(pl.UTF-8): Statyczna biblioteka cryptsetup
100 Group: Development/Libraries
101 Requires: %{name}-devel = %{version}-%{release}
102 Obsoletes: cryptsetup-static
105 Static version of cryptsetup library.
107 %description static -l pl.UTF-8
108 Statyczna wersja biblioteki cryptsetup.
111 Summary: LUKS for dm-crypt implemented in cryptsetup - initrd version
112 Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
114 Requires: udev-initrd >= 1:115
115 Conflicts: geninitrd < 10000.10
118 This package contains implementation of LUKS for dm-crypt implemented
119 in cryptsetup - statically linked for initrd.
121 %description initrd -l pl.UTF-8
122 Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną
123 w cryptsetup - wersję statycznie zlinkowaną dla initrd.
126 Summary: LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools
127 Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla initramfs-tools
129 Requires: %{name} = %{version}-%{release}
130 Requires: initramfs-tools
132 %description initramfs
133 LUKS for dm-crypt implemented in cryptsetup - support scripts
136 %description initramfs -l pl.UTF-8
137 LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla
141 %setup -q -n %{realname}-%{version}
144 install %{SOURCE5} README.initramfs
157 CC="diet %{__cc} %{rpmcflags} %{rpmldflags} -Os" \
158 ac_cv_lib_popt_poptConfigFileToString=yes \
159 ac_cv_lib_sepol_sepol_bool_set=no \
160 ac_cv_lib_selinux_is_selinux_enabled=no \
162 --disable-shared-library \
164 --enable-static-cryptsetup \
171 # we have to do it by hand cause libtool "know better" and forces
172 # static libs from /usr/lib
173 diet %{__cc} %{rpmcflags} %{rpmldflags} -Os -I./lib -static \
174 -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
175 -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
178 mv src/cryptsetup cryptsetup-initrd
189 rm -rf $RPM_BUILD_ROOT
190 install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top}
193 DESTDIR=$RPM_BUILD_ROOT
195 install -d $RPM_BUILD_ROOT/%{_lib}
196 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
197 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
198 $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
201 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
202 install cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
205 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
206 install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot
207 install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot
208 install %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev
210 %find_lang %{realname}
213 rm -rf $RPM_BUILD_ROOT
215 %post -p /sbin/ldconfig
216 %postun -p /sbin/ldconfig
218 %files -f %{realname}.lang
219 %defattr(644,root,root,755)
220 %doc AUTHORS ChangeLog TODO
221 %attr(755,root,root) %{_sbindir}/cryptsetup
222 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
223 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.1
224 %{_mandir}/man8/cryptsetup.8*
227 %defattr(644,root,root,755)
228 %attr(755,root,root) %{_libdir}/libcryptsetup.so
229 %{_libdir}/libcryptsetup.la
230 %{_includedir}/libcryptsetup.h
231 %{_pkgconfigdir}/libcryptsetup.pc
234 %defattr(644,root,root,755)
235 %{_libdir}/libcryptsetup.a
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/initrd/cryptsetup
244 %defattr(644,root,root,755)
245 %doc README.initramfs
246 %attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
247 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot
248 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev
249 %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot