]>
Commit | Line | Data |
---|---|---|
5eb10616 JB |
1 | # |
2 | # Conditonal build: | |
21d48aec | 3 | %bcond_without initrd # don't build initrd version |
23904b26 | 4 | %bcond_without 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 |
80dfd139 | 10 | Version: 1.4.2 |
be1fa429 | 11 | Release: 2 |
d7593791 | 12 | License: GPL v2 |
6351d6a5 | 13 | Group: Base |
c905abc3 | 14 | #Source0Download: http://code.google.com/p/cryptsetup/downloads/list |
ef897fda | 15 | Source0: http://cryptsetup.googlecode.com/files/%{name}-%{version}.tar.bz2 |
80dfd139 | 16 | # Source0-md5: db2e6189e1b191a279a1f508396d3373 |
ef897fda ER |
17 | Patch0: diet.patch |
18 | Patch1: dont-drag-more-libs.patch | |
79b6c53c | 19 | URL: http://code.google.com/p/cryptsetup/ |
c905abc3 | 20 | BuildRequires: autoconf >= 2.67 |
5fe93676 | 21 | BuildRequires: automake |
79b6c53c JB |
22 | BuildRequires: device-mapper-devel >= 1.02.03 |
23 | BuildRequires: gettext-devel >= 0.15 | |
0b90291e JB |
24 | BuildRequires: libgcrypt-devel >= 1.1.42 |
25 | BuildRequires: libselinux-devel | |
26 | BuildRequires: libsepol-devel | |
c905abc3 | 27 | BuildRequires: libtool >= 2:2.0 |
0b90291e | 28 | BuildRequires: libuuid-devel |
79b6c53c | 29 | BuildRequires: popt-devel >= 1.7 |
ef897fda ER |
30 | Provides: cryptsetup-luks = %{version}-%{release} |
31 | Obsoletes: cryptsetup-luks < 1.4.1-2 | |
882a770e JB |
32 | %if %{with python} |
33 | BuildRequires: python-devel >= 1:2.4 | |
34 | BuildRequires: rpm-pythonprov | |
35 | %endif | |
d07d45f7 | 36 | %if %{with initrd} |
21d48aec JR |
37 | BuildRequires: libgpg-error-static |
38 | %if %{with dietlibc} | |
39 | BuildRequires: device-mapper-dietlibc | |
ef897fda | 40 | BuildRequires: dietlibc-static |
21d48aec JR |
41 | BuildRequires: libgcrypt-dietlibc |
42 | BuildRequires: libuuid-dietlibc | |
43 | BuildRequires: popt-dietlibc | |
44 | %else | |
5eb10616 | 45 | BuildRequires: device-mapper-static >= 1.02.07 |
a6fd3218 | 46 | BuildRequires: libgcrypt-static >= 1.1.42 |
a6fd3218 | 47 | BuildRequires: libselinux-static |
8d9e50de | 48 | BuildRequires: libsepol-static |
a6fd3218 | 49 | BuildRequires: libuuid-static |
50 | BuildRequires: popt-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 | |
119 | Requires: %{name}-libs = %{version}-%{release} | |
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 |
c627e74c | 148 | %patch1 -p1 |
6351d6a5 | 149 | |
c627e74c JB |
150 | %{__rm} po/stamp-po |
151 | ||
6351d6a5 | 152 | %build |
8d9e50de | 153 | %{__gettextize} |
d7593791 | 154 | %{__libtoolize} |
8d9e50de | 155 | %{__aclocal} -I m4 |
156 | %{__autoconf} | |
d7593791 | 157 | %{__autoheader} |
8d9e50de | 158 | %{__automake} |
d07d45f7 ER |
159 | |
160 | %if %{with initrd} | |
802ed4ef | 161 | CC="%{__cc}" |
a6fd3218 | 162 | %configure \ |
21d48aec | 163 | %if %{with dietlibc} |
802ed4ef | 164 | %configure \ |
04af2f11 | 165 | CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \ |
8a7a87e4 | 166 | LIBS="-lcompat" \ |
21d48aec JR |
167 | ac_cv_lib_popt_poptConfigFileToString=yes \ |
168 | ac_cv_lib_sepol_sepol_bool_set=no \ | |
169 | ac_cv_lib_selinux_is_selinux_enabled=no \ | |
802ed4ef ER |
170 | %endif |
171 | %if "%{?configure_cache}" == "1" | |
172 | --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \ | |
21d48aec | 173 | %endif |
8a7a87e4 | 174 | --disable-shared \ |
5eb10616 | 175 | --enable-static \ |
d6925a9f | 176 | --enable-static-cryptsetup \ |
04af2f11 | 177 | --disable-udev \ |
d6925a9f | 178 | --disable-nls |
21d48aec | 179 | |
21d48aec JR |
180 | %{__make} -C lib |
181 | ||
182 | %if %{with dietlibc} | |
183 | # we have to do it by hand cause libtool "know better" and forces | |
184 | # static libs from /usr/lib | |
802ed4ef | 185 | CC="%{__cc}" |
04af2f11 | 186 | diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \ |
593621cb JR |
187 | -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \ |
188 | -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat | |
21d48aec JR |
189 | %else |
190 | %{__make} -C src | |
d07d45f7 | 191 | mv src/cryptsetup cryptsetup-initrd |
21d48aec | 192 | %endif |
23904b26 | 193 | |
d07d45f7 ER |
194 | %{__make} clean |
195 | %endif | |
196 | ||
197 | %configure \ | |
04af2f11 | 198 | --enable-udev \ |
882a770e JB |
199 | --enable-static \ |
200 | %{?with_python:--enable-python} | |
6351d6a5 | 201 | %{__make} |
202 | ||
203 | %install | |
204 | rm -rf $RPM_BUILD_ROOT | |
205 | ||
206 | %{__make} install \ | |
207 | DESTDIR=$RPM_BUILD_ROOT | |
208 | ||
209 | install -d $RPM_BUILD_ROOT/%{_lib} | |
d7593791 JB |
210 | mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib} |
211 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \ | |
6351d6a5 | 212 | $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so |
213 | ||
d07d45f7 | 214 | %if %{with initrd} |
927d0cdf | 215 | install -d $RPM_BUILD_ROOT%{_libdir}/initrd |
802ed4ef | 216 | install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup |
d07d45f7 ER |
217 | %endif |
218 | ||
882a770e JB |
219 | %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.{la,a}} |
220 | ||
ef897fda | 221 | %find_lang %{name} |
6351d6a5 | 222 | |
223 | %clean | |
224 | rm -rf $RPM_BUILD_ROOT | |
225 | ||
226 | %post -p /sbin/ldconfig | |
227 | %postun -p /sbin/ldconfig | |
228 | ||
ef897fda | 229 | %files -f %{name}.lang |
6351d6a5 | 230 | %defattr(644,root,root,755) |
d7593791 | 231 | %doc AUTHORS ChangeLog TODO |
6351d6a5 | 232 | %attr(755,root,root) %{_sbindir}/cryptsetup |
233 | %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.* | |
c6c27d69 | 234 | %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.4 |
d7593791 | 235 | %{_mandir}/man8/cryptsetup.8* |
6351d6a5 | 236 | |
237 | %files devel | |
238 | %defattr(644,root,root,755) | |
239 | %attr(755,root,root) %{_libdir}/libcryptsetup.so | |
240 | %{_libdir}/libcryptsetup.la | |
d7593791 | 241 | %{_includedir}/libcryptsetup.h |
79b6c53c | 242 | %{_pkgconfigdir}/libcryptsetup.pc |
6351d6a5 | 243 | |
a6fd3218 | 244 | %files static |
245 | %defattr(644,root,root,755) | |
246 | %{_libdir}/libcryptsetup.a | |
d07d45f7 | 247 | |
882a770e JB |
248 | %if %{with python} |
249 | %files -n python-pycryptsetup | |
250 | %defattr(644,root,root,755) | |
251 | %attr(755,root,root) %{py_sitedir}/pycryptsetup.so | |
252 | %endif | |
253 | ||
d07d45f7 ER |
254 | %if %{with initrd} |
255 | %files initrd | |
256 | %defattr(644,root,root,755) | |
927d0cdf | 257 | %attr(755,root,root) %{_libdir}/initrd/cryptsetup |
d07d45f7 | 258 | %endif |