]> git.pld-linux.org Git - packages/cryptsetup-luks.git/blobdiff - cryptsetup-luks.spec
- package python binding (as python-pycryptsetup)
[packages/cryptsetup-luks.git] / cryptsetup-luks.spec
index 925e0732fb7b10276be6ec06605a7b0bcec29a7a..e32f8678869589d958edbddb191b0ab049228192 100644 (file)
@@ -2,36 +2,41 @@
 # Conditonal build:
 %bcond_without initrd          # don't build initrd version
 %bcond_without dietlibc        # build initrd version with static glibc instead of dietlibc
+%bcond_without python          # Python binding
 #
-%define        realname        cryptsetup
+%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:       10
+Version:       1.4.1
+Release:       1
 License:       GPL v2
 Group:         Base
-Source0:       http://luks.endorphin.org/source/%{realname}-%{version}.tar.bz2
-# Source0-md5: 00d452eb7a76e39f5749545d48934a10
+#Source0Download: http://code.google.com/p/cryptsetup/downloads/list
+Source0:       http://cryptsetup.googlecode.com/files/%{realname}-%{version}.tar.bz2
+# Source0-md5: 9253b3f29abf5c6f333eb74128b0df1c
 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
-Patch3:                %{name}-diet.patch
-URL:           http://luks.endorphin.org/
-BuildRequires: autoconf
+Patch0:                %{name}-diet.patch
+Patch1:                %{name}-dont-drag-more-libs.patch
+URL:           http://code.google.com/p/cryptsetup/
+BuildRequires: autoconf >= 2.67
 BuildRequires: automake
-BuildRequires: device-mapper-devel
-BuildRequires: gettext-devel
+BuildRequires: device-mapper-devel >= 1.02.03
+BuildRequires: gettext-devel >= 0.15
 BuildRequires: libgcrypt-devel >= 1.1.42
 BuildRequires: libselinux-devel
 BuildRequires: libsepol-devel
-BuildRequires: libtool
+BuildRequires: libtool >= 2:2.0
 BuildRequires: libuuid-devel
-BuildRequires: popt-devel
+BuildRequires: popt-devel >= 1.7
+%if %{with python}
+BuildRequires: python-devel >= 1:2.4
+BuildRequires: rpm-pythonprov
+%endif
 %if %{with initrd}
 BuildRequires: libgpg-error-static
        %if %{with dietlibc}
@@ -49,6 +54,7 @@ BuildRequires:        libuuid-static
 BuildRequires: popt-static
        %endif
 %endif
+Requires:      popt >= 1.7
 Provides:      cryptsetup = %{version}
 Obsoletes:     cryptsetup
 Conflicts:     udev < 1:118-1
@@ -56,7 +62,6 @@ Conflicts:    udev-core < 1:115
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sbindir        /sbin
-%define                _noautoreqdep   libcryptsetup.so.0
 
 %description
 LUKS is the upcoming standard for Linux hard disk encryption. By
@@ -109,15 +114,33 @@ Static version of cryptsetup library.
 %description static -l pl.UTF-8
 Statyczna wersja biblioteki cryptsetup.
 
+%package -n python-pycryptsetup
+Summary:       Python binding for cryptsetup library
+Summary(pl.UTF-8):     Wiązanie Pythona do biblioteki cryptsetup
+Group:         Libraries/Python
+Requires:      %{name}-libs = %{version}-%{release}
+%pyrequires_eq python-libs
+
+%description -n python-pycryptsetup
+Python binding for cryptsetup library.
+
+%description -n python-pycryptsetup -l pl.UTF-8
+Wiązanie Pythona do biblioteki cryptsetup.
+
 %package initrd
 Summary:       LUKS for dm-crypt implemented in cryptsetup - initrd version
+Summary(pl.UTF-8):     LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
 Group:         Base
 Requires:      udev-initrd >= 1:115
 Conflicts:     geninitrd < 10000.10
 
 %description initrd
 This package contains implementation of LUKS for dm-crypt implemented
-in cryptsetup - staticaly linked for initrd.
+in cryptsetup - statically linked for initrd.
+
+%description initrd -l pl.UTF-8
+Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną
+w cryptsetup - wersję statycznie zlinkowaną dla initrd.
 
 %package initramfs
 Summary:       LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools
@@ -136,11 +159,12 @@ initramfs-tools.
 
 %prep
 %setup -q -n %{realname}-%{version}
+%patch0 -p1
 %patch1 -p1
-%patch2 -p1
-%patch3 -p1
 
-install %{SOURCE5} README.initramfs
+cp -a %{SOURCE5} README.initramfs
+
+%{__rm} po/stamp-po
 
 %build
 %{__gettextize}
@@ -151,25 +175,32 @@ install %{SOURCE5} README.initramfs
 %{__automake}
 
 %if %{with initrd}
+CC="%{__cc}"
 %configure \
 %if %{with dietlibc}
-       CC="diet %{__cc} %{rpmcflags} %{rpmldflags} -Os" \
+%configure \
+       CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \
+       LIBS="-lcompat" \
        ac_cv_lib_popt_poptConfigFileToString=yes \
        ac_cv_lib_sepol_sepol_bool_set=no \
        ac_cv_lib_selinux_is_selinux_enabled=no \
 %endif
-       --disable-shared-library \
+%if "%{?configure_cache}" == "1"
+       --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
+%endif
+       --disable-shared \
        --enable-static \
        --enable-static-cryptsetup \
+       --disable-udev \
        --disable-nls
 
-%{__make} -C luks
 %{__make} -C lib
 
 %if %{with dietlibc}
 # we have to do it by hand cause libtool "know better" and forces
 # static libs from /usr/lib
-diet %{__cc} %{rpmcflags} %{rpmldflags} -Os -I./lib -static \
+CC="%{__cc}"
+diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
        -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
        -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
 %else
@@ -181,7 +212,9 @@ mv src/cryptsetup cryptsetup-initrd
 %endif
 
 %configure \
-       --enable-static
+       --enable-udev \
+       --enable-static \
+       %{?with_python:--enable-python}
 %{__make}
 
 %install
@@ -198,13 +231,15 @@ ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
 
 %if %{with initrd}
 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
-install cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
+install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
 %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
+install -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
+install -p %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot
+install -p %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot
+install -p %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev
+
+%{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.{la,a}}
 
 %find_lang %{realname}
 
@@ -219,7 +254,7 @@ rm -rf $RPM_BUILD_ROOT
 %doc AUTHORS ChangeLog TODO
 %attr(755,root,root) %{_sbindir}/cryptsetup
 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
-%attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.0
+%attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.4
 %{_mandir}/man8/cryptsetup.8*
 
 %files devel
@@ -227,11 +262,18 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libcryptsetup.so
 %{_libdir}/libcryptsetup.la
 %{_includedir}/libcryptsetup.h
+%{_pkgconfigdir}/libcryptsetup.pc
 
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libcryptsetup.a
 
+%if %{with python}
+%files -n python-pycryptsetup
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/pycryptsetup.so
+%endif
+
 %if %{with initrd}
 %files initrd
 %defattr(644,root,root,755)
This page took 0.203019 seconds and 4 git commands to generate.