]> git.pld-linux.org Git - packages/cryptsetup.git/blob - cryptsetup.spec
2d6d0399d80e31895d62b582462ffcd4c16c2bd0
[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.6.5
13 Release:        1
14 License:        GPL v2
15 Group:          Base
16 Source0:        https://www.kernel.org/pub/linux/utils/cryptsetup/v1.6/%{name}-%{version}.tar.xz
17 # Source0-md5:  128a5f63284ca3a26b4d4ffe821fa235
18 Patch0:         diet.patch
19 URL:            http://code.google.com/p/cryptsetup/
20 BuildRequires:  autoconf >= 2.67
21 BuildRequires:  automake >= 1:1.12
22 BuildRequires:  device-mapper-devel >= 1.02.27
23 BuildRequires:  gettext-devel >= 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-shared \
181         --enable-static \
182         --enable-static-cryptsetup
183
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
189 CC="%{__cc}"
190 diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
191         -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
192         -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
193 %else
194 %{__make} -C src
195 mv src/cryptsetup cryptsetup-initrd
196 %endif
197
198 %{__make} clean
199 %endif
200
201 %configure \
202         --enable-udev \
203         --enable-static \
204         %{?with_python:--enable-python} \
205         %{?with_pwquality:--with-pwquality}
206 %{__make}
207
208 %{?with_tests:%{__make} check}
209
210 %install
211 rm -rf $RPM_BUILD_ROOT
212
213 %{__make} install \
214         DESTDIR=$RPM_BUILD_ROOT
215
216 install -d $RPM_BUILD_ROOT/%{_lib}
217 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
218 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
219         $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
220
221 %if %{with initrd}
222 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
223 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
224 %endif
225
226 %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.la}
227
228 %find_lang %{name}
229
230 %clean
231 rm -rf $RPM_BUILD_ROOT
232
233 %post   -p /sbin/ldconfig
234 %postun -p /sbin/ldconfig
235
236 %files -f %{name}.lang
237 %defattr(644,root,root,755)
238 %doc AUTHORS ChangeLog FAQ README TODO docs/{ChangeLog.old,v*-ReleaseNotes,on-disk-format.pdf}
239 %attr(755,root,root) %{_sbindir}/cryptsetup
240 %attr(755,root,root) %{_sbindir}/veritysetup
241 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
242 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.4
243 %{_mandir}/man8/cryptsetup.8*
244 %{_mandir}/man8/veritysetup.8*
245
246 %files devel
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_libdir}/libcryptsetup.so
249 %{_libdir}/libcryptsetup.la
250 %{_includedir}/libcryptsetup.h
251 %{_pkgconfigdir}/libcryptsetup.pc
252
253 %files static
254 %defattr(644,root,root,755)
255 %{_libdir}/libcryptsetup.a
256
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
263 %if %{with initrd}
264 %files initrd
265 %defattr(644,root,root,755)
266 %attr(755,root,root) %{_libdir}/initrd/cryptsetup
267 %endif
This page took 0.033697 seconds and 2 git commands to generate.