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