]> git.pld-linux.org Git - packages/cryptsetup-luks.git/blob - cryptsetup-luks.spec
e32f8678869589d958edbddb191b0ab049228192
[packages/cryptsetup-luks.git] / cryptsetup-luks.spec
1 #
2 # Conditonal build:
3 %bcond_without  initrd          # don't build initrd version
4 %bcond_without  dietlibc        # build initrd version with static glibc instead of dietlibc
5 %bcond_without  python          # Python binding
6 #
7 %define         realname        cryptsetup
8 Summary:        LUKS for dm-crypt implemented in cryptsetup
9 Summary(pl.UTF-8):      LUKS dla dm-crypta zaimplementowany w cryptsetup
10 Name:           cryptsetup-luks
11 Version:        1.4.1
12 Release:        1
13 License:        GPL v2
14 Group:          Base
15 #Source0Download: http://code.google.com/p/cryptsetup/downloads/list
16 Source0:        http://cryptsetup.googlecode.com/files/%{realname}-%{version}.tar.bz2
17 # Source0-md5:  9253b3f29abf5c6f333eb74128b0df1c
18 Source1:        %{name}-initramfs-root-conf
19 Source2:        %{name}-initramfs-root-hook
20 Source3:        %{name}-initramfs-root-local-top
21 Source4:        %{name}-initramfs-passdev-hook
22 Source5:        %{name}-initramfs-README
23 Patch0:         %{name}-diet.patch
24 Patch1:         %{name}-dont-drag-more-libs.patch
25 URL:            http://code.google.com/p/cryptsetup/
26 BuildRequires:  autoconf >= 2.67
27 BuildRequires:  automake
28 BuildRequires:  device-mapper-devel >= 1.02.03
29 BuildRequires:  gettext-devel >= 0.15
30 BuildRequires:  libgcrypt-devel >= 1.1.42
31 BuildRequires:  libselinux-devel
32 BuildRequires:  libsepol-devel
33 BuildRequires:  libtool >= 2:2.0
34 BuildRequires:  libuuid-devel
35 BuildRequires:  popt-devel >= 1.7
36 %if %{with python}
37 BuildRequires:  python-devel >= 1:2.4
38 BuildRequires:  rpm-pythonprov
39 %endif
40 %if %{with initrd}
41 BuildRequires:  libgpg-error-static
42         %if %{with dietlibc}
43 BuildRequires:  device-mapper-dietlibc
44 BuildRequires:  dietlibc-static
45 BuildRequires:  libgcrypt-dietlibc
46 BuildRequires:  libuuid-dietlibc
47 BuildRequires:  popt-dietlibc
48         %else
49 BuildRequires:  device-mapper-static >= 1.02.07
50 BuildRequires:  libgcrypt-static >= 1.1.42
51 BuildRequires:  libselinux-static
52 BuildRequires:  libsepol-static
53 BuildRequires:  libuuid-static
54 BuildRequires:  popt-static
55         %endif
56 %endif
57 Requires:       popt >= 1.7
58 Provides:       cryptsetup = %{version}
59 Obsoletes:      cryptsetup
60 Conflicts:      udev < 1:118-1
61 Conflicts:      udev-core < 1:115
62 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64 %define         _sbindir        /sbin
65
66 %description
67 LUKS is the upcoming standard for Linux hard disk encryption. By
68 providing a standard on-disk-format, it does not only facilitate
69 compatibility among distributions, but also provide secure management
70 of multiple user passwords. In contrast to existing solution, LUKS
71 stores all setup necessary setup information in the partition header,
72 enabling the user to transport or migrate his data seamlessly.
73
74 This package contains implementation of LUKS for dm-crypt implemented
75 in cryptsetup.
76
77 %description -l pl.UTF-8
78 LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku.
79 Dostarczając standardowy format danych na dysku nie tylko ułatwia
80 utrzymanie kompatybilności między dystrybucjami, ale także dostarcza
81 bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie
82 do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne
83 informacje o konfiguracji w nagłówku partycji, pozwalając
84 użytkownikowi przenosić lub migrować dane w sposób przezroczysty.
85
86 Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
87 cryptsetup.
88
89 %package devel
90 Summary:        Header files for cryptsetup library
91 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki cryptsetup
92 Group:          Development/Libraries
93 Requires:       %{name} = %{version}-%{release}
94 Requires:       device-mapper-devel
95 Requires:       libgcrypt-devel >= 1.1.42
96 Obsoletes:      cryptsetup-devel
97
98 %description devel
99 Header files for cryptsetup library.
100
101 %description devel -l pl.UTF-8
102 Pliki nagłówkowe biblioteki cryptsetup.
103
104 %package static
105 Summary:        Static cryptsetup library
106 Summary(pl.UTF-8):      Statyczna biblioteka cryptsetup
107 Group:          Development/Libraries
108 Requires:       %{name}-devel = %{version}-%{release}
109 Obsoletes:      cryptsetup-static
110
111 %description static
112 Static version of cryptsetup library.
113
114 %description static -l pl.UTF-8
115 Statyczna wersja biblioteki cryptsetup.
116
117 %package -n python-pycryptsetup
118 Summary:        Python binding for cryptsetup library
119 Summary(pl.UTF-8):      Wiązanie Pythona do biblioteki cryptsetup
120 Group:          Libraries/Python
121 Requires:       %{name}-libs = %{version}-%{release}
122 %pyrequires_eq  python-libs
123
124 %description -n python-pycryptsetup
125 Python binding for cryptsetup library.
126
127 %description -n python-pycryptsetup -l pl.UTF-8
128 Wiązanie Pythona do biblioteki cryptsetup.
129
130 %package initrd
131 Summary:        LUKS for dm-crypt implemented in cryptsetup - initrd version
132 Summary(pl.UTF-8):      LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
133 Group:          Base
134 Requires:       udev-initrd >= 1:115
135 Conflicts:      geninitrd < 10000.10
136
137 %description initrd
138 This package contains implementation of LUKS for dm-crypt implemented
139 in cryptsetup - statically linked for initrd.
140
141 %description initrd -l pl.UTF-8
142 Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną
143 w cryptsetup - wersję statycznie zlinkowaną dla initrd.
144
145 %package initramfs
146 Summary:        LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools
147 Summary(pl.UTF-8):      LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla initramfs-tools
148 Group:          Base
149 Requires:       %{name} = %{version}-%{release}
150 Requires:       initramfs-tools
151
152 %description initramfs
153 LUKS for dm-crypt implemented in cryptsetup - support scripts
154 for initramfs-tools.
155
156 %description initramfs -l pl.UTF-8
157 LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla
158 initramfs-tools.
159
160 %prep
161 %setup -q -n %{realname}-%{version}
162 %patch0 -p1
163 %patch1 -p1
164
165 cp -a %{SOURCE5} README.initramfs
166
167 %{__rm} po/stamp-po
168
169 %build
170 %{__gettextize}
171 %{__libtoolize}
172 %{__aclocal} -I m4
173 %{__autoconf}
174 %{__autoheader}
175 %{__automake}
176
177 %if %{with initrd}
178 CC="%{__cc}"
179 %configure \
180 %if %{with dietlibc}
181 %configure \
182         CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \
183         LIBS="-lcompat" \
184         ac_cv_lib_popt_poptConfigFileToString=yes \
185         ac_cv_lib_sepol_sepol_bool_set=no \
186         ac_cv_lib_selinux_is_selinux_enabled=no \
187 %endif
188 %if "%{?configure_cache}" == "1"
189         --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
190 %endif
191         --disable-shared \
192         --enable-static \
193         --enable-static-cryptsetup \
194         --disable-udev \
195         --disable-nls
196
197 %{__make} -C lib
198
199 %if %{with dietlibc}
200 # we have to do it by hand cause libtool "know better" and forces
201 # static libs from /usr/lib
202 CC="%{__cc}"
203 diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
204         -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
205         -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
206 %else
207 %{__make} -C src
208 mv src/cryptsetup cryptsetup-initrd
209 %endif
210
211 %{__make} clean
212 %endif
213
214 %configure \
215         --enable-udev \
216         --enable-static \
217         %{?with_python:--enable-python}
218 %{__make}
219
220 %install
221 rm -rf $RPM_BUILD_ROOT
222 install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top}
223
224 %{__make} install \
225         DESTDIR=$RPM_BUILD_ROOT
226
227 install -d $RPM_BUILD_ROOT/%{_lib}
228 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
229 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
230         $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
231
232 %if %{with initrd}
233 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
234 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
235 %endif
236
237 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
238 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot
239 install -p %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot
240 install -p %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev
241
242 %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.{la,a}}
243
244 %find_lang %{realname}
245
246 %clean
247 rm -rf $RPM_BUILD_ROOT
248
249 %post   -p /sbin/ldconfig
250 %postun -p /sbin/ldconfig
251
252 %files -f %{realname}.lang
253 %defattr(644,root,root,755)
254 %doc AUTHORS ChangeLog TODO
255 %attr(755,root,root) %{_sbindir}/cryptsetup
256 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
257 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.4
258 %{_mandir}/man8/cryptsetup.8*
259
260 %files devel
261 %defattr(644,root,root,755)
262 %attr(755,root,root) %{_libdir}/libcryptsetup.so
263 %{_libdir}/libcryptsetup.la
264 %{_includedir}/libcryptsetup.h
265 %{_pkgconfigdir}/libcryptsetup.pc
266
267 %files static
268 %defattr(644,root,root,755)
269 %{_libdir}/libcryptsetup.a
270
271 %if %{with python}
272 %files -n python-pycryptsetup
273 %defattr(644,root,root,755)
274 %attr(755,root,root) %{py_sitedir}/pycryptsetup.so
275 %endif
276
277 %if %{with initrd}
278 %files initrd
279 %defattr(644,root,root,755)
280 %attr(755,root,root) %{_libdir}/initrd/cryptsetup
281 %endif
282
283 %files initramfs
284 %defattr(644,root,root,755)
285 %doc README.initramfs
286 %attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
287 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot
288 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev
289 %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot
This page took 0.10372 seconds and 2 git commands to generate.