X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=cryptsetup.spec;h=ddd1052bcd66d837fad745604c276c57b9d97e90;hb=8509e703b2f58df960e3673dd0fee95088beb535;hp=332d9d6b15199766a5325590e07c3f4711ded566;hpb=93ddfe397e029b2862261f196060ef049bd3cd15;p=packages%2Fcryptsetup.git diff --git a/cryptsetup.spec b/cryptsetup.spec index 332d9d6..ddd1052 100644 --- a/cryptsetup.spec +++ b/cryptsetup.spec @@ -1,18 +1,24 @@ # # Conditonal build: -%bcond_with static # link cryptsetup statically +%bcond_without initrd # don't build initrd version # %define realname cryptsetup Summary: LUKS for dm-crypt implemented in cryptsetup Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup Name: cryptsetup-luks Version: 1.0.6 -Release: 3 +Release: 8 License: GPL v2 Group: Base Source0: http://luks.endorphin.org/source/%{realname}-%{version}.tar.bz2 # Source0-md5: 00d452eb7a76e39f5749545d48934a10 +Source1: %{name}-initramfs-root-conf +Source2: %{name}-initramfs-root-hook +Source3: %{name}-initramfs-root-local-top +Source4: %{name}-initramfs-passdev-hook +Source5: %{name}-initramfs-README Patch1: %{name}-nostatic.patch +Patch2: %{name}-udev.patch URL: http://luks.endorphin.org/ BuildRequires: autoconf BuildRequires: automake @@ -24,7 +30,7 @@ BuildRequires: libsepol-devel BuildRequires: libtool BuildRequires: libuuid-devel BuildRequires: popt-devel -%if %{with static} +%if %{with initrd} BuildRequires: device-mapper-static >= 1.02.07 BuildRequires: libgcrypt-static >= 1.1.42 BuildRequires: libgpg-error-static @@ -35,6 +41,8 @@ BuildRequires: popt-static %endif Provides: cryptsetup = %{version} Obsoletes: cryptsetup +Conflicts: udev < 1:118-1 +Conflicts: udev-core < 1:115 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _sbindir /sbin @@ -91,9 +99,36 @@ Static version of cryptsetup library. %description static -l pl.UTF-8 Statyczna wersja biblioteki cryptsetup. +%package initrd +Summary: LUKS for dm-crypt implemented in cryptsetup - initrd version +Group: Base +Requires: udev-initrd >= 1:115 + +%description initrd +This package contains implementation of LUKS for dm-crypt implemented +in cryptsetup - staticaly linked for initrd. + +%package initramfs +Summary: LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools +Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla initramfs-tools +Group: Base +Requires: %{name} = %{version}-%{release} +Requires: initramfs-tools + +%description initramfs +LUKS for dm-crypt implemented in cryptsetup - support scripts +for initramfs-tools. + +%description initramfs -l pl.UTF-8 +LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla +initramfs-tools. + %prep %setup -q -n %{realname}-%{version} %patch1 -p1 +%patch2 -p1 + +install %{SOURCE5} README.initramfs %build %{__gettextize} @@ -102,13 +137,25 @@ Statyczna wersja biblioteki cryptsetup. %{__autoconf} %{__autoheader} %{__automake} + +%if %{with initrd} %configure \ + --disable-shared-library \ --enable-static \ - %{?with_static:--enable-static-cryptsetup} + --enable-static-cryptsetup \ + --disable-nls +%{__make} +mv src/cryptsetup cryptsetup-initrd +%{__make} clean +%endif + +%configure \ + --enable-static %{__make} %install rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT @@ -118,6 +165,15 @@ mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib} ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \ $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so +%if %{with initrd} +install cryptsetup-initrd $RPM_BUILD_ROOT%{_sbindir} +%endif + +install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup +install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot +install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot +install %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev + %find_lang %{realname} %clean @@ -143,3 +199,17 @@ rm -rf $RPM_BUILD_ROOT %files static %defattr(644,root,root,755) %{_libdir}/libcryptsetup.a + +%if %{with initrd} +%files initrd +%defattr(644,root,root,755) +%attr(755,root,root) %{_sbindir}/cryptsetup-initrd +%endif + +%files initramfs +%defattr(644,root,root,755) +%doc README.initramfs +%attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup +%attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot +%attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev +%attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot