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