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