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