]> git.pld-linux.org Git - packages/cryptsetup.git/blame - cryptsetup.spec
- updated to 1.6.3
[packages/cryptsetup.git] / cryptsetup.spec
CommitLineData
5eb10616
JB
1#
2# Conditonal build:
3ee30d05 3%bcond_with initrd # don't build initrd version
c2608e02 4%bcond_with dietlibc # build initrd version with static glibc instead of dietlibc
196834e2 5%bcond_with pwquality # password quality checking
882a770e 6%bcond_without python # Python binding
2b412273 7%bcond_without tests # "make check" run
ef897fda 8
2488c838 9Summary: LUKS for dm-crypt implemented in cryptsetup
29f5822a 10Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup
ef897fda 11Name: cryptsetup
d4db5a85 12Version: 1.6.3
df4d3321 13Release: 1
d7593791 14License: GPL v2
6351d6a5 15Group: Base
28c8b65f 16# Source0Download: http://code.google.com/p/cryptsetup/downloads/list
ef897fda 17Source0: http://cryptsetup.googlecode.com/files/%{name}-%{version}.tar.bz2
d4db5a85 18# Source0-md5: a7aeb549a543eeac433eadfb6bc67837
ef897fda 19Patch0: diet.patch
79b6c53c 20URL: http://code.google.com/p/cryptsetup/
c905abc3 21BuildRequires: autoconf >= 2.67
d4db5a85
JB
22BuildRequires: automake >= 1:1.12
23BuildRequires: device-mapper-devel >= 1.02.27
79b6c53c 24BuildRequires: gettext-devel >= 0.15
d4db5a85
JB
25BuildRequires: libgcrypt-devel >= 1.6.0
26BuildRequires: libgpg-error-devel
196834e2 27%{?with_pwquality:BuildRequires: libpwquality-devel >= 1.0.0}
0b90291e
JB
28BuildRequires: libselinux-devel
29BuildRequires: libsepol-devel
c905abc3 30BuildRequires: libtool >= 2:2.0
0b90291e 31BuildRequires: libuuid-devel
d4db5a85 32BuildRequires: pkgconfig
79b6c53c 33BuildRequires: popt-devel >= 1.7
882a770e
JB
34%if %{with python}
35BuildRequires: python-devel >= 1:2.4
36BuildRequires: rpm-pythonprov
37%endif
d07d45f7 38%if %{with initrd}
21d48aec
JR
39BuildRequires: libgpg-error-static
40 %if %{with dietlibc}
df4d3321 41BuildRequires: device-mapper-dietlibc >= 1.02.27
ef897fda 42BuildRequires: dietlibc-static
d4db5a85 43BuildRequires: libgcrypt-dietlibc >= 1.6.0
21d48aec
JR
44BuildRequires: libuuid-dietlibc
45BuildRequires: popt-dietlibc
46 %else
df4d3321 47BuildRequires: device-mapper-static >= 1.02.27
d4db5a85 48BuildRequires: libgcrypt-static >= 1.6.0
a6fd3218 49BuildRequires: libselinux-static
8d9e50de 50BuildRequires: libsepol-static
a6fd3218 51BuildRequires: libuuid-static
52BuildRequires: popt-static
c2608e02 53BuildRequires: udev-static
21d48aec 54 %endif
5eb10616 55%endif
d4db5a85 56Requires: libgcrypt >= 1.6.0
196834e2 57%{?with_pwquality:Requires: libpwquality >= 1.0.0}
79b6c53c 58Requires: popt >= 1.7
f96aa109
JR
59Provides: cryptsetup-luks = %{version}-%{release}
60Obsoletes: cryptsetup-luks < 1.4.1-2
3ee30d05 61%{!?with_initrd:Obsoletes: cryptsetup-initrd < %{version}-%{release}}
751c89df
ER
62Conflicts: udev < 1:118-1
63Conflicts: udev-core < 1:115
6351d6a5 64BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66%define _sbindir /sbin
67
68%description
6e98e6fb 69LUKS is the upcoming standard for Linux hard disk encryption. By
70providing a standard on-disk-format, it does not only facilitate
71compatibility among distributions, but also provide secure management
72of multiple user passwords. In contrast to existing solution, LUKS
73stores all setup necessary setup information in the partition header,
74enabling the user to transport or migrate his data seamlessly.
6351d6a5 75
6e98e6fb 76This package contains implementation of LUKS for dm-crypt implemented
77in cryptsetup.
6351d6a5 78
77f30028
JR
79%description -l pl.UTF-8
80LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku.
81Dostarczając standardowy format danych na dysku nie tylko ułatwia
82utrzymanie kompatybilności między dystrybucjami, ale także dostarcza
83bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie
84do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne
85informacje o konfiguracji w nagłówku partycji, pozwalając
86użytkownikowi przenosić lub migrować dane w sposób przezroczysty.
12cca230 87
77f30028 88Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
12cca230
JB
89cryptsetup.
90
6351d6a5 91%package devel
92Summary: Header files for cryptsetup library
29f5822a 93Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cryptsetup
6351d6a5 94Group: Development/Libraries
95Requires: %{name} = %{version}-%{release}
d4db5a85
JB
96Requires: device-mapper-devel >= 1.02.27
97Requires: libgcrypt-devel >= 1.6.0
ef897fda
ER
98Provides: cryptsetup-luks-devel = %{version}-%{release}
99Obsoletes: cryptsetup-luks-devel < 1.4.1-2
6351d6a5 100
101%description devel
102Header files for cryptsetup library.
103
77f30028
JR
104%description devel -l pl.UTF-8
105Pliki nagłówkowe biblioteki cryptsetup.
6351d6a5 106
107%package static
108Summary: Static cryptsetup library
29f5822a 109Summary(pl.UTF-8): Statyczna biblioteka cryptsetup
6351d6a5 110Group: Development/Libraries
111Requires: %{name}-devel = %{version}-%{release}
ef897fda
ER
112Provides: cryptsetup-luks-static = %{version}-%{release}
113Obsoletes: cryptsetup-luks-static < 1.4.1-2
6351d6a5 114
115%description static
116Static version of cryptsetup library.
117
77f30028 118%description static -l pl.UTF-8
6351d6a5 119Statyczna wersja biblioteki cryptsetup.
120
882a770e
JB
121%package -n python-pycryptsetup
122Summary: Python binding for cryptsetup library
123Summary(pl.UTF-8): Wiązanie Pythona do biblioteki cryptsetup
124Group: Libraries/Python
28c8b65f 125Requires: %{name} = %{version}-%{release}
882a770e
JB
126%pyrequires_eq python-libs
127
128%description -n python-pycryptsetup
129Python binding for cryptsetup library.
130
131%description -n python-pycryptsetup -l pl.UTF-8
132Wiązanie Pythona do biblioteki cryptsetup.
133
d07d45f7
ER
134%package initrd
135Summary: LUKS for dm-crypt implemented in cryptsetup - initrd version
1c89131c 136Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
d07d45f7 137Group: Base
311e3692 138Requires: udev-initrd >= 1:115
ef897fda
ER
139Provides: cryptsetup-luks-initrd = %{version}-%{release}
140Obsoletes: cryptsetup-luks-initrd < 1.4.1-2
2dd5e1c3 141Conflicts: geninitrd < 10000.10
d07d45f7
ER
142
143%description initrd
144This package contains implementation of LUKS for dm-crypt implemented
1c89131c
JB
145in cryptsetup - statically linked for initrd.
146
147%description initrd -l pl.UTF-8
ef897fda
ER
148Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną w
149cryptsetup - wersję statycznie zlinkowaną dla initrd.
d07d45f7 150
6351d6a5 151%prep
ef897fda 152%setup -q
396f27d3 153%{?with_diet:%patch0 -p1}
6351d6a5 154
c627e74c
JB
155%{__rm} po/stamp-po
156
6351d6a5 157%build
8d9e50de 158%{__gettextize}
d7593791 159%{__libtoolize}
8d9e50de 160%{__aclocal} -I m4
161%{__autoconf}
d7593791 162%{__autoheader}
8d9e50de 163%{__automake}
d07d45f7
ER
164
165%if %{with initrd}
802ed4ef 166CC="%{__cc}"
a6fd3218 167%configure \
21d48aec 168%if %{with dietlibc}
04af2f11 169 CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \
8a7a87e4 170 LIBS="-lcompat" \
21d48aec
JR
171 ac_cv_lib_popt_poptConfigFileToString=yes \
172 ac_cv_lib_sepol_sepol_bool_set=no \
173 ac_cv_lib_selinux_is_selinux_enabled=no \
802ed4ef
ER
174%endif
175%if "%{?configure_cache}" == "1"
176 --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
21d48aec 177%endif
196834e2 178 --disable-nls \
8a7a87e4 179 --disable-shared \
5eb10616 180 --enable-static \
196834e2 181 --enable-static-cryptsetup
21d48aec 182
21d48aec
JR
183%{__make} -C lib
184
185%if %{with dietlibc}
186# we have to do it by hand cause libtool "know better" and forces
187# static libs from /usr/lib
802ed4ef 188CC="%{__cc}"
04af2f11 189diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
593621cb
JR
190 -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
191 -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
21d48aec
JR
192%else
193%{__make} -C src
d07d45f7 194mv src/cryptsetup cryptsetup-initrd
21d48aec 195%endif
23904b26 196
d07d45f7
ER
197%{__make} clean
198%endif
199
200%configure \
04af2f11 201 --enable-udev \
882a770e 202 --enable-static \
196834e2
JB
203 %{?with_python:--enable-python} \
204 %{?with_pwquality:--with-pwquality}
6351d6a5 205%{__make}
206
b0d1eeaa
AM
207%{?with_tests:%{__make} check}
208
6351d6a5 209%install
210rm -rf $RPM_BUILD_ROOT
211
212%{__make} install \
213 DESTDIR=$RPM_BUILD_ROOT
214
215install -d $RPM_BUILD_ROOT/%{_lib}
d7593791
JB
216mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
217ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
6351d6a5 218 $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
219
d07d45f7 220%if %{with initrd}
927d0cdf 221install -d $RPM_BUILD_ROOT%{_libdir}/initrd
802ed4ef 222install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
d07d45f7
ER
223%endif
224
5da1c8e9 225%{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.la}
882a770e 226
ef897fda 227%find_lang %{name}
6351d6a5 228
229%clean
230rm -rf $RPM_BUILD_ROOT
231
232%post -p /sbin/ldconfig
233%postun -p /sbin/ldconfig
234
ef897fda 235%files -f %{name}.lang
6351d6a5 236%defattr(644,root,root,755)
d4db5a85 237%doc AUTHORS ChangeLog FAQ README TODO docs/{ChangeLog.old,v*-ReleaseNotes,on-disk-format.pdf}
6351d6a5 238%attr(755,root,root) %{_sbindir}/cryptsetup
56c60c79 239%attr(755,root,root) %{_sbindir}/veritysetup
6351d6a5 240%attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
c6c27d69 241%attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.4
d7593791 242%{_mandir}/man8/cryptsetup.8*
56c60c79 243%{_mandir}/man8/veritysetup.8*
6351d6a5 244
245%files devel
246%defattr(644,root,root,755)
247%attr(755,root,root) %{_libdir}/libcryptsetup.so
248%{_libdir}/libcryptsetup.la
d7593791 249%{_includedir}/libcryptsetup.h
79b6c53c 250%{_pkgconfigdir}/libcryptsetup.pc
6351d6a5 251
a6fd3218 252%files static
253%defattr(644,root,root,755)
254%{_libdir}/libcryptsetup.a
d07d45f7 255
882a770e
JB
256%if %{with python}
257%files -n python-pycryptsetup
258%defattr(644,root,root,755)
259%attr(755,root,root) %{py_sitedir}/pycryptsetup.so
260%endif
261
d07d45f7
ER
262%if %{with initrd}
263%files initrd
264%defattr(644,root,root,755)
927d0cdf 265%attr(755,root,root) %{_libdir}/initrd/cryptsetup
d07d45f7 266%endif
This page took 0.114891 seconds and 4 git commands to generate.