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