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