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