]> git.pld-linux.org Git - packages/cryptsetup.git/blame - cryptsetup.spec
- dietlibc version does not ork (segfault on luksopen)
[packages/cryptsetup.git] / cryptsetup.spec
CommitLineData
5eb10616
JB
1#
2# Conditonal build:
21d48aec 3%bcond_without initrd # don't build initrd version
694efac5 4%bcond_with dietlibc # build initrd version with dietlibc (currently creates broken program)
5eb10616 5#
d7593791 6%define realname cryptsetup
2488c838 7Summary: LUKS for dm-crypt implemented in cryptsetup
29f5822a 8Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup
6351d6a5 9Name: cryptsetup-luks
f5ec273c 10Version: 1.0.6
21d48aec 11Release: 9
d7593791 12License: GPL v2
6351d6a5 13Group: Base
d7593791 14Source0: http://luks.endorphin.org/source/%{realname}-%{version}.tar.bz2
f5ec273c 15# Source0-md5: 00d452eb7a76e39f5749545d48934a10
c25e31b1
JR
16Source1: %{name}-initramfs-root-conf
17Source2: %{name}-initramfs-root-hook
18Source3: %{name}-initramfs-root-local-top
19Source4: %{name}-initramfs-passdev-hook
20Source5: %{name}-initramfs-README
5eb10616 21Patch1: %{name}-nostatic.patch
311e3692 22Patch2: %{name}-udev.patch
5616104c 23URL: http://luks.endorphin.org/
5fe93676
JB
24BuildRequires: autoconf
25BuildRequires: automake
0b90291e 26BuildRequires: device-mapper-devel
5fe93676 27BuildRequires: gettext-devel
0b90291e
JB
28BuildRequires: libgcrypt-devel >= 1.1.42
29BuildRequires: libselinux-devel
30BuildRequires: libsepol-devel
d172f920 31BuildRequires: libtool
0b90291e
JB
32BuildRequires: libuuid-devel
33BuildRequires: popt-devel
d07d45f7 34%if %{with initrd}
21d48aec
JR
35BuildRequires: libgpg-error-static
36 %if %{with dietlibc}
37BuildRequires: device-mapper-dietlibc
38BuildRequires: libgcrypt-dietlibc
39BuildRequires: libuuid-dietlibc
40BuildRequires: popt-dietlibc
41 %else
5eb10616 42BuildRequires: device-mapper-static >= 1.02.07
a6fd3218 43BuildRequires: libgcrypt-static >= 1.1.42
a6fd3218 44BuildRequires: libselinux-static
8d9e50de 45BuildRequires: libsepol-static
a6fd3218 46BuildRequires: libuuid-static
47BuildRequires: popt-static
21d48aec 48 %endif
5eb10616 49%endif
c0cc5702 50Provides: cryptsetup = %{version}
12cca230 51Obsoletes: cryptsetup
751c89df
ER
52Conflicts: udev < 1:118-1
53Conflicts: udev-core < 1:115
6351d6a5 54BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
56%define _sbindir /sbin
8bf4e8eb 57%define _noautoreqdep libcryptsetup.so.0
6351d6a5 58
59%description
6e98e6fb 60LUKS is the upcoming standard for Linux hard disk encryption. By
61providing a standard on-disk-format, it does not only facilitate
62compatibility among distributions, but also provide secure management
63of multiple user passwords. In contrast to existing solution, LUKS
64stores all setup necessary setup information in the partition header,
65enabling the user to transport or migrate his data seamlessly.
6351d6a5 66
6e98e6fb 67This package contains implementation of LUKS for dm-crypt implemented
68in cryptsetup.
6351d6a5 69
77f30028
JR
70%description -l pl.UTF-8
71LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku.
72Dostarczając standardowy format danych na dysku nie tylko ułatwia
73utrzymanie kompatybilności między dystrybucjami, ale także dostarcza
74bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie
75do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne
76informacje o konfiguracji w nagłówku partycji, pozwalając
77użytkownikowi przenosić lub migrować dane w sposób przezroczysty.
12cca230 78
77f30028 79Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
12cca230
JB
80cryptsetup.
81
6351d6a5 82%package devel
83Summary: Header files for cryptsetup library
29f5822a 84Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cryptsetup
6351d6a5 85Group: Development/Libraries
86Requires: %{name} = %{version}-%{release}
87Requires: device-mapper-devel
88Requires: libgcrypt-devel >= 1.1.42
12cca230 89Obsoletes: cryptsetup-devel
6351d6a5 90
91%description devel
92Header files for cryptsetup library.
93
77f30028
JR
94%description devel -l pl.UTF-8
95Pliki nagłówkowe biblioteki cryptsetup.
6351d6a5 96
97%package static
98Summary: Static cryptsetup library
29f5822a 99Summary(pl.UTF-8): Statyczna biblioteka cryptsetup
6351d6a5 100Group: Development/Libraries
101Requires: %{name}-devel = %{version}-%{release}
fca9458b 102Obsoletes: cryptsetup-static
6351d6a5 103
104%description static
105Static version of cryptsetup library.
106
77f30028 107%description static -l pl.UTF-8
6351d6a5 108Statyczna wersja biblioteki cryptsetup.
109
d07d45f7
ER
110%package initrd
111Summary: LUKS for dm-crypt implemented in cryptsetup - initrd version
112Group: Base
311e3692 113Requires: udev-initrd >= 1:115
d07d45f7
ER
114
115%description initrd
116This package contains implementation of LUKS for dm-crypt implemented
117in cryptsetup - staticaly linked for initrd.
118
ecaa484d
JR
119%package initramfs
120Summary: LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools
121Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla initramfs-tools
122Group: Base
123Requires: %{name} = %{version}-%{release}
124Requires: initramfs-tools
125
126%description initramfs
127LUKS for dm-crypt implemented in cryptsetup - support scripts
128for initramfs-tools.
129
130%description initramfs -l pl.UTF-8
131LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla
132initramfs-tools.
133
6351d6a5 134%prep
d7593791 135%setup -q -n %{realname}-%{version}
5eb10616 136%patch1 -p1
311e3692 137%patch2 -p1
6351d6a5 138
ecaa484d
JR
139install %{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
JR
151%if %{with dietlibc}
152 CC="diet %{__cc} -Os %{rpmldflags}" \
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
168diet %{__cc} -Os -I./lib -static -o cryptsetup-initrd src/cryptsetup.c \
169 ./lib/.libs/libcryptsetup.a -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
170%else
171%{__make} -C src
d07d45f7 172mv src/cryptsetup cryptsetup-initrd
21d48aec
JR
173%endif
174
d07d45f7
ER
175%{__make} clean
176%endif
177
178%configure \
179 --enable-static
6351d6a5 180%{__make}
181
182%install
183rm -rf $RPM_BUILD_ROOT
ecaa484d 184install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top}
6351d6a5 185
186%{__make} install \
187 DESTDIR=$RPM_BUILD_ROOT
188
189install -d $RPM_BUILD_ROOT/%{_lib}
d7593791
JB
190mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
191ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
6351d6a5 192 $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
193
d07d45f7
ER
194%if %{with initrd}
195install cryptsetup-initrd $RPM_BUILD_ROOT%{_sbindir}
196%endif
197
ecaa484d
JR
198install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
199install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot
200install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot
201install %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev
202
d7593791 203%find_lang %{realname}
6351d6a5 204
205%clean
206rm -rf $RPM_BUILD_ROOT
207
208%post -p /sbin/ldconfig
209%postun -p /sbin/ldconfig
210
d7593791 211%files -f %{realname}.lang
6351d6a5 212%defattr(644,root,root,755)
d7593791 213%doc AUTHORS ChangeLog TODO
6351d6a5 214%attr(755,root,root) %{_sbindir}/cryptsetup
215%attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
d7593791
JB
216%attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.0
217%{_mandir}/man8/cryptsetup.8*
6351d6a5 218
219%files devel
220%defattr(644,root,root,755)
221%attr(755,root,root) %{_libdir}/libcryptsetup.so
222%{_libdir}/libcryptsetup.la
d7593791 223%{_includedir}/libcryptsetup.h
6351d6a5 224
a6fd3218 225%files static
226%defattr(644,root,root,755)
227%{_libdir}/libcryptsetup.a
d07d45f7
ER
228
229%if %{with initrd}
230%files initrd
231%defattr(644,root,root,755)
232%attr(755,root,root) %{_sbindir}/cryptsetup-initrd
233%endif
ecaa484d
JR
234
235%files initramfs
236%defattr(644,root,root,755)
237%doc README.initramfs
238%attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
239%attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot
240%attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev
241%attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot
This page took 0.115391 seconds and 4 git commands to generate.