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