]>
Commit | Line | Data |
---|---|---|
5eb10616 JB |
1 | # |
2 | # Conditonal build: | |
21d48aec | 3 | %bcond_without initrd # don't build initrd version |
694efac5 | 4 | %bcond_with dietlibc # build initrd version with dietlibc (currently creates broken program) |
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 |
21d48aec | 11 | Release: 9 |
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 | |
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 |
c0cc5702 | 51 | Provides: cryptsetup = %{version} |
12cca230 | 52 | Obsoletes: cryptsetup |
751c89df ER |
53 | Conflicts: udev < 1:118-1 |
54 | Conflicts: udev-core < 1:115 | |
6351d6a5 | 55 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
56 | ||
57 | %define _sbindir /sbin | |
8bf4e8eb | 58 | %define _noautoreqdep libcryptsetup.so.0 |
6351d6a5 | 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 | |
113 | Group: Base | |
311e3692 | 114 | Requires: udev-initrd >= 1:115 |
d07d45f7 ER |
115 | |
116 | %description initrd | |
117 | This package contains implementation of LUKS for dm-crypt implemented | |
118 | in cryptsetup - staticaly linked for initrd. | |
119 | ||
ecaa484d JR |
120 | %package initramfs |
121 | Summary: LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools | |
122 | Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla initramfs-tools | |
123 | Group: Base | |
124 | Requires: %{name} = %{version}-%{release} | |
125 | Requires: initramfs-tools | |
126 | ||
127 | %description initramfs | |
128 | LUKS for dm-crypt implemented in cryptsetup - support scripts | |
129 | for initramfs-tools. | |
130 | ||
131 | %description initramfs -l pl.UTF-8 | |
132 | LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla | |
133 | initramfs-tools. | |
134 | ||
6351d6a5 | 135 | %prep |
d7593791 | 136 | %setup -q -n %{realname}-%{version} |
5eb10616 | 137 | %patch1 -p1 |
311e3692 | 138 | %patch2 -p1 |
2f1a72ff | 139 | %patch3 -p1 |
6351d6a5 | 140 | |
ecaa484d JR |
141 | install %{SOURCE5} README.initramfs |
142 | ||
6351d6a5 | 143 | %build |
8d9e50de | 144 | %{__gettextize} |
d7593791 | 145 | %{__libtoolize} |
8d9e50de | 146 | %{__aclocal} -I m4 |
147 | %{__autoconf} | |
d7593791 | 148 | %{__autoheader} |
8d9e50de | 149 | %{__automake} |
d07d45f7 ER |
150 | |
151 | %if %{with initrd} | |
a6fd3218 | 152 | %configure \ |
21d48aec JR |
153 | %if %{with dietlibc} |
154 | CC="diet %{__cc} -Os %{rpmldflags}" \ | |
155 | ac_cv_lib_popt_poptConfigFileToString=yes \ | |
156 | ac_cv_lib_sepol_sepol_bool_set=no \ | |
157 | ac_cv_lib_selinux_is_selinux_enabled=no \ | |
158 | %endif | |
d6925a9f | 159 | --disable-shared-library \ |
5eb10616 | 160 | --enable-static \ |
d6925a9f ER |
161 | --enable-static-cryptsetup \ |
162 | --disable-nls | |
21d48aec JR |
163 | |
164 | %{__make} -C luks | |
165 | %{__make} -C lib | |
166 | ||
167 | %if %{with dietlibc} | |
168 | # we have to do it by hand cause libtool "know better" and forces | |
169 | # static libs from /usr/lib | |
170 | diet %{__cc} -Os -I./lib -static -o cryptsetup-initrd src/cryptsetup.c \ | |
171 | ./lib/.libs/libcryptsetup.a -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat | |
172 | %else | |
173 | %{__make} -C src | |
d07d45f7 | 174 | mv src/cryptsetup cryptsetup-initrd |
21d48aec | 175 | %endif |
2f1a72ff | 176 | exit 1 |
d07d45f7 ER |
177 | %{__make} clean |
178 | %endif | |
179 | ||
180 | %configure \ | |
181 | --enable-static | |
6351d6a5 | 182 | %{__make} |
183 | ||
184 | %install | |
185 | rm -rf $RPM_BUILD_ROOT | |
ecaa484d | 186 | install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top} |
6351d6a5 | 187 | |
188 | %{__make} install \ | |
189 | DESTDIR=$RPM_BUILD_ROOT | |
190 | ||
191 | install -d $RPM_BUILD_ROOT/%{_lib} | |
d7593791 JB |
192 | mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib} |
193 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \ | |
6351d6a5 | 194 | $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so |
195 | ||
d07d45f7 ER |
196 | %if %{with initrd} |
197 | install cryptsetup-initrd $RPM_BUILD_ROOT%{_sbindir} | |
198 | %endif | |
199 | ||
ecaa484d JR |
200 | install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup |
201 | install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot | |
202 | install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot | |
203 | install %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev | |
204 | ||
d7593791 | 205 | %find_lang %{realname} |
6351d6a5 | 206 | |
207 | %clean | |
208 | rm -rf $RPM_BUILD_ROOT | |
209 | ||
210 | %post -p /sbin/ldconfig | |
211 | %postun -p /sbin/ldconfig | |
212 | ||
d7593791 | 213 | %files -f %{realname}.lang |
6351d6a5 | 214 | %defattr(644,root,root,755) |
d7593791 | 215 | %doc AUTHORS ChangeLog TODO |
6351d6a5 | 216 | %attr(755,root,root) %{_sbindir}/cryptsetup |
217 | %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.* | |
d7593791 JB |
218 | %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.0 |
219 | %{_mandir}/man8/cryptsetup.8* | |
6351d6a5 | 220 | |
221 | %files devel | |
222 | %defattr(644,root,root,755) | |
223 | %attr(755,root,root) %{_libdir}/libcryptsetup.so | |
224 | %{_libdir}/libcryptsetup.la | |
d7593791 | 225 | %{_includedir}/libcryptsetup.h |
6351d6a5 | 226 | |
a6fd3218 | 227 | %files static |
228 | %defattr(644,root,root,755) | |
229 | %{_libdir}/libcryptsetup.a | |
d07d45f7 ER |
230 | |
231 | %if %{with initrd} | |
232 | %files initrd | |
233 | %defattr(644,root,root,755) | |
234 | %attr(755,root,root) %{_sbindir}/cryptsetup-initrd | |
235 | %endif | |
ecaa484d JR |
236 | |
237 | %files initramfs | |
238 | %defattr(644,root,root,755) | |
239 | %doc README.initramfs | |
240 | %attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup | |
241 | %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot | |
242 | %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev | |
243 | %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot |