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