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