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