]>
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 |
79b6c53c JB |
10 | Version: 1.1.2 |
11 | Release: 1 | |
d7593791 | 12 | License: GPL v2 |
6351d6a5 | 13 | Group: Base |
79b6c53c JB |
14 | Source0: http://cryptsetup.googlecode.com/files/%{realname}-%{version}.tar.bz2 |
15 | # Source0-md5: f3928c1f1d49fcee39bb1e8d42fe707a | |
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 | |
79b6c53c JB |
21 | Patch0: %{name}-nostatic.patch |
22 | URL: http://code.google.com/p/cryptsetup/ | |
23 | BuildRequires: autoconf >= 2.57 | |
5fe93676 | 24 | BuildRequires: automake |
79b6c53c JB |
25 | BuildRequires: device-mapper-devel >= 1.02.03 |
26 | BuildRequires: gettext-devel >= 0.15 | |
0b90291e JB |
27 | BuildRequires: libgcrypt-devel >= 1.1.42 |
28 | BuildRequires: libselinux-devel | |
29 | BuildRequires: libsepol-devel | |
d172f920 | 30 | BuildRequires: libtool |
0b90291e | 31 | BuildRequires: libuuid-devel |
79b6c53c | 32 | BuildRequires: popt-devel >= 1.7 |
d07d45f7 | 33 | %if %{with initrd} |
21d48aec JR |
34 | BuildRequires: libgpg-error-static |
35 | %if %{with dietlibc} | |
36 | BuildRequires: device-mapper-dietlibc | |
52d14f29 | 37 | BuildRequires: dietlibc-static |
21d48aec JR |
38 | BuildRequires: libgcrypt-dietlibc |
39 | BuildRequires: libuuid-dietlibc | |
40 | BuildRequires: popt-dietlibc | |
41 | %else | |
5eb10616 | 42 | BuildRequires: device-mapper-static >= 1.02.07 |
a6fd3218 | 43 | BuildRequires: libgcrypt-static >= 1.1.42 |
a6fd3218 | 44 | BuildRequires: libselinux-static |
8d9e50de | 45 | BuildRequires: libsepol-static |
a6fd3218 | 46 | BuildRequires: libuuid-static |
47 | BuildRequires: popt-static | |
21d48aec | 48 | %endif |
5eb10616 | 49 | %endif |
79b6c53c | 50 | Requires: popt >= 1.7 |
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 | |
58 | ||
59 | %description | |
6e98e6fb | 60 | LUKS is the upcoming standard for Linux hard disk encryption. By |
61 | providing a standard on-disk-format, it does not only facilitate | |
62 | compatibility among distributions, but also provide secure management | |
63 | of multiple user passwords. In contrast to existing solution, LUKS | |
64 | stores all setup necessary setup information in the partition header, | |
65 | enabling the user to transport or migrate his data seamlessly. | |
6351d6a5 | 66 | |
6e98e6fb | 67 | This package contains implementation of LUKS for dm-crypt implemented |
68 | in cryptsetup. | |
6351d6a5 | 69 | |
77f30028 JR |
70 | %description -l pl.UTF-8 |
71 | LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku. | |
72 | Dostarczając standardowy format danych na dysku nie tylko ułatwia | |
73 | utrzymanie kompatybilności między dystrybucjami, ale także dostarcza | |
74 | bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie | |
75 | do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne | |
76 | informacje o konfiguracji w nagłówku partycji, pozwalając | |
77 | użytkownikowi przenosić lub migrować dane w sposób przezroczysty. | |
12cca230 | 78 | |
77f30028 | 79 | Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w |
12cca230 JB |
80 | cryptsetup. |
81 | ||
6351d6a5 | 82 | %package devel |
83 | Summary: Header files for cryptsetup library | |
29f5822a | 84 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cryptsetup |
6351d6a5 | 85 | Group: Development/Libraries |
86 | Requires: %{name} = %{version}-%{release} | |
87 | Requires: device-mapper-devel | |
88 | Requires: libgcrypt-devel >= 1.1.42 | |
12cca230 | 89 | Obsoletes: cryptsetup-devel |
6351d6a5 | 90 | |
91 | %description devel | |
92 | Header files for cryptsetup library. | |
93 | ||
77f30028 JR |
94 | %description devel -l pl.UTF-8 |
95 | Pliki nagłówkowe biblioteki cryptsetup. | |
6351d6a5 | 96 | |
97 | %package static | |
98 | Summary: Static cryptsetup library | |
29f5822a | 99 | Summary(pl.UTF-8): Statyczna biblioteka cryptsetup |
6351d6a5 | 100 | Group: Development/Libraries |
101 | Requires: %{name}-devel = %{version}-%{release} | |
fca9458b | 102 | Obsoletes: cryptsetup-static |
6351d6a5 | 103 | |
104 | %description static | |
105 | Static version of cryptsetup library. | |
106 | ||
77f30028 | 107 | %description static -l pl.UTF-8 |
6351d6a5 | 108 | Statyczna wersja biblioteki cryptsetup. |
109 | ||
d07d45f7 ER |
110 | %package initrd |
111 | Summary: LUKS for dm-crypt implemented in cryptsetup - initrd version | |
112 | Group: Base | |
311e3692 | 113 | Requires: udev-initrd >= 1:115 |
2dd5e1c3 | 114 | Conflicts: geninitrd < 10000.10 |
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} |
79b6c53c | 137 | %patch0 -p1 |
6351d6a5 | 138 | |
ecaa484d JR |
139 | install %{SOURCE5} README.initramfs |
140 | ||
6351d6a5 | 141 | %build |
8d9e50de | 142 | %{__gettextize} |
d7593791 | 143 | %{__libtoolize} |
8d9e50de | 144 | %{__aclocal} -I m4 |
145 | %{__autoconf} | |
d7593791 | 146 | %{__autoheader} |
8d9e50de | 147 | %{__automake} |
d07d45f7 ER |
148 | |
149 | %if %{with initrd} | |
a6fd3218 | 150 | %configure \ |
21d48aec | 151 | %if %{with dietlibc} |
593621cb | 152 | CC="diet %{__cc} %{rpmcflags} %{rpmldflags} -Os" \ |
21d48aec JR |
153 | ac_cv_lib_popt_poptConfigFileToString=yes \ |
154 | ac_cv_lib_sepol_sepol_bool_set=no \ | |
155 | ac_cv_lib_selinux_is_selinux_enabled=no \ | |
156 | %endif | |
d6925a9f | 157 | --disable-shared-library \ |
5eb10616 | 158 | --enable-static \ |
d6925a9f ER |
159 | --enable-static-cryptsetup \ |
160 | --disable-nls | |
21d48aec JR |
161 | |
162 | %{__make} -C luks | |
163 | %{__make} -C lib | |
164 | ||
165 | %if %{with dietlibc} | |
166 | # we have to do it by hand cause libtool "know better" and forces | |
167 | # static libs from /usr/lib | |
593621cb JR |
168 | diet %{__cc} %{rpmcflags} %{rpmldflags} -Os -I./lib -static \ |
169 | -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \ | |
170 | -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat | |
21d48aec JR |
171 | %else |
172 | %{__make} -C src | |
d07d45f7 | 173 | mv src/cryptsetup cryptsetup-initrd |
21d48aec | 174 | %endif |
23904b26 | 175 | |
d07d45f7 ER |
176 | %{__make} clean |
177 | %endif | |
178 | ||
179 | %configure \ | |
180 | --enable-static | |
6351d6a5 | 181 | %{__make} |
182 | ||
183 | %install | |
184 | rm -rf $RPM_BUILD_ROOT | |
ecaa484d | 185 | install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top} |
6351d6a5 | 186 | |
187 | %{__make} install \ | |
188 | DESTDIR=$RPM_BUILD_ROOT | |
189 | ||
190 | install -d $RPM_BUILD_ROOT/%{_lib} | |
d7593791 JB |
191 | mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib} |
192 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \ | |
6351d6a5 | 193 | $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so |
194 | ||
d07d45f7 | 195 | %if %{with initrd} |
927d0cdf JR |
196 | install -d $RPM_BUILD_ROOT%{_libdir}/initrd |
197 | install cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup | |
d07d45f7 ER |
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.*.*.* | |
79b6c53c | 218 | %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.1 |
d7593791 | 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 |
79b6c53c | 226 | %{_pkgconfigdir}/libcryptsetup.pc |
6351d6a5 | 227 | |
a6fd3218 | 228 | %files static |
229 | %defattr(644,root,root,755) | |
230 | %{_libdir}/libcryptsetup.a | |
d07d45f7 ER |
231 | |
232 | %if %{with initrd} | |
233 | %files initrd | |
234 | %defattr(644,root,root,755) | |
927d0cdf | 235 | %attr(755,root,root) %{_libdir}/initrd/cryptsetup |
d07d45f7 | 236 | %endif |
ecaa484d JR |
237 | |
238 | %files initramfs | |
239 | %defattr(644,root,root,755) | |
240 | %doc README.initramfs | |
241 | %attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup | |
242 | %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot | |
243 | %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev | |
244 | %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot |