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