]>
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 |
5eb10616 | 5 | # |
d7593791 | 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 |
f5ec273c | 10 | Version: 1.0.6 |
2dd5e1c3 | 11 | Release: 10 |
d7593791 | 12 | License: GPL v2 |
6351d6a5 | 13 | Group: Base |
d7593791 | 14 | Source0: http://luks.endorphin.org/source/%{realname}-%{version}.tar.bz2 |
f5ec273c | 15 | # Source0-md5: 00d452eb7a76e39f5749545d48934a10 |
c25e31b1 JR |
16 | Source1: %{name}-initramfs-root-conf |
17 | Source2: %{name}-initramfs-root-hook | |
18 | Source3: %{name}-initramfs-root-local-top | |
19 | Source4: %{name}-initramfs-passdev-hook | |
20 | Source5: %{name}-initramfs-README | |
5eb10616 | 21 | Patch1: %{name}-nostatic.patch |
311e3692 | 22 | Patch2: %{name}-udev.patch |
2f1a72ff | 23 | Patch3: %{name}-diet.patch |
5616104c | 24 | URL: http://luks.endorphin.org/ |
5fe93676 JB |
25 | BuildRequires: autoconf |
26 | BuildRequires: automake | |
0b90291e | 27 | BuildRequires: device-mapper-devel |
5fe93676 | 28 | BuildRequires: gettext-devel |
0b90291e JB |
29 | BuildRequires: libgcrypt-devel >= 1.1.42 |
30 | BuildRequires: libselinux-devel | |
31 | BuildRequires: libsepol-devel | |
d172f920 | 32 | BuildRequires: libtool |
0b90291e JB |
33 | BuildRequires: libuuid-devel |
34 | BuildRequires: popt-devel | |
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 |
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 | |
8bf4e8eb | 59 | %define _noautoreqdep libcryptsetup.so.0 |
6351d6a5 | 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 | |
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 | |
120 | in cryptsetup - staticaly linked for initrd. | |
121 | ||
ecaa484d JR |
122 | %package initramfs |
123 | Summary: LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools | |
124 | Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla initramfs-tools | |
125 | Group: Base | |
126 | Requires: %{name} = %{version}-%{release} | |
127 | Requires: initramfs-tools | |
128 | ||
129 | %description initramfs | |
130 | LUKS for dm-crypt implemented in cryptsetup - support scripts | |
131 | for initramfs-tools. | |
132 | ||
133 | %description initramfs -l pl.UTF-8 | |
134 | LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla | |
135 | initramfs-tools. | |
136 | ||
6351d6a5 | 137 | %prep |
d7593791 | 138 | %setup -q -n %{realname}-%{version} |
5eb10616 | 139 | %patch1 -p1 |
311e3692 | 140 | %patch2 -p1 |
2f1a72ff | 141 | %patch3 -p1 |
6351d6a5 | 142 | |
ecaa484d JR |
143 | install %{SOURCE5} README.initramfs |
144 | ||
6351d6a5 | 145 | %build |
8d9e50de | 146 | %{__gettextize} |
d7593791 | 147 | %{__libtoolize} |
8d9e50de | 148 | %{__aclocal} -I m4 |
149 | %{__autoconf} | |
d7593791 | 150 | %{__autoheader} |
8d9e50de | 151 | %{__automake} |
d07d45f7 ER |
152 | |
153 | %if %{with initrd} | |
a6fd3218 | 154 | %configure \ |
21d48aec | 155 | %if %{with dietlibc} |
593621cb | 156 | CC="diet %{__cc} %{rpmcflags} %{rpmldflags} -Os" \ |
21d48aec JR |
157 | ac_cv_lib_popt_poptConfigFileToString=yes \ |
158 | ac_cv_lib_sepol_sepol_bool_set=no \ | |
159 | ac_cv_lib_selinux_is_selinux_enabled=no \ | |
160 | %endif | |
d6925a9f | 161 | --disable-shared-library \ |
5eb10616 | 162 | --enable-static \ |
d6925a9f ER |
163 | --enable-static-cryptsetup \ |
164 | --disable-nls | |
21d48aec JR |
165 | |
166 | %{__make} -C luks | |
167 | %{__make} -C lib | |
168 | ||
169 | %if %{with dietlibc} | |
170 | # we have to do it by hand cause libtool "know better" and forces | |
171 | # static libs from /usr/lib | |
593621cb JR |
172 | diet %{__cc} %{rpmcflags} %{rpmldflags} -Os -I./lib -static \ |
173 | -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \ | |
174 | -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat | |
21d48aec JR |
175 | %else |
176 | %{__make} -C src | |
d07d45f7 | 177 | mv src/cryptsetup cryptsetup-initrd |
21d48aec | 178 | %endif |
23904b26 | 179 | |
d07d45f7 ER |
180 | %{__make} clean |
181 | %endif | |
182 | ||
183 | %configure \ | |
184 | --enable-static | |
6351d6a5 | 185 | %{__make} |
186 | ||
187 | %install | |
188 | rm -rf $RPM_BUILD_ROOT | |
ecaa484d | 189 | install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top} |
6351d6a5 | 190 | |
191 | %{__make} install \ | |
192 | DESTDIR=$RPM_BUILD_ROOT | |
193 | ||
194 | install -d $RPM_BUILD_ROOT/%{_lib} | |
d7593791 JB |
195 | mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib} |
196 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \ | |
6351d6a5 | 197 | $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so |
198 | ||
d07d45f7 | 199 | %if %{with initrd} |
927d0cdf JR |
200 | install -d $RPM_BUILD_ROOT%{_libdir}/initrd |
201 | install cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup | |
d07d45f7 ER |
202 | %endif |
203 | ||
ecaa484d JR |
204 | install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup |
205 | install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot | |
206 | install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot | |
207 | install %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev | |
208 | ||
d7593791 | 209 | %find_lang %{realname} |
6351d6a5 | 210 | |
211 | %clean | |
212 | rm -rf $RPM_BUILD_ROOT | |
213 | ||
214 | %post -p /sbin/ldconfig | |
215 | %postun -p /sbin/ldconfig | |
216 | ||
d7593791 | 217 | %files -f %{realname}.lang |
6351d6a5 | 218 | %defattr(644,root,root,755) |
d7593791 | 219 | %doc AUTHORS ChangeLog TODO |
6351d6a5 | 220 | %attr(755,root,root) %{_sbindir}/cryptsetup |
221 | %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.* | |
d7593791 JB |
222 | %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.0 |
223 | %{_mandir}/man8/cryptsetup.8* | |
6351d6a5 | 224 | |
225 | %files devel | |
226 | %defattr(644,root,root,755) | |
227 | %attr(755,root,root) %{_libdir}/libcryptsetup.so | |
228 | %{_libdir}/libcryptsetup.la | |
d7593791 | 229 | %{_includedir}/libcryptsetup.h |
6351d6a5 | 230 | |
a6fd3218 | 231 | %files static |
232 | %defattr(644,root,root,755) | |
233 | %{_libdir}/libcryptsetup.a | |
d07d45f7 ER |
234 | |
235 | %if %{with initrd} | |
236 | %files initrd | |
237 | %defattr(644,root,root,755) | |
927d0cdf | 238 | %attr(755,root,root) %{_libdir}/initrd/cryptsetup |
d07d45f7 | 239 | %endif |
ecaa484d JR |
240 | |
241 | %files initramfs | |
242 | %defattr(644,root,root,755) | |
243 | %doc README.initramfs | |
244 | %attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup | |
245 | %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot | |
246 | %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev | |
247 | %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot |