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