]> git.pld-linux.org Git - packages/cryptsetup-luks.git/blame - cryptsetup-luks.spec
- rel 2; dietlibc fixes
[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
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
73e37c17 10Version: 1.1.2
90f41aef 11Release: 2
ab903cbb 12License: GPL v2
00a57b4e 13Group: Base
73e37c17
JB
14Source0: http://cryptsetup.googlecode.com/files/%{realname}-%{version}.tar.bz2
15# Source0-md5: f3928c1f1d49fcee39bb1e8d42fe707a
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
73e37c17 21Patch0: %{name}-nostatic.patch
90f41aef 22Patch1: %{name}-diet.patch
73e37c17
JB
23URL: http://code.google.com/p/cryptsetup/
24BuildRequires: autoconf >= 2.57
6707f1d7 25BuildRequires: automake
73e37c17
JB
26BuildRequires: device-mapper-devel >= 1.02.03
27BuildRequires: gettext-devel >= 0.15
e6ecff5e
JB
28BuildRequires: libgcrypt-devel >= 1.1.42
29BuildRequires: libselinux-devel
30BuildRequires: libsepol-devel
81a6ed91 31BuildRequires: libtool
e6ecff5e 32BuildRequires: libuuid-devel
73e37c17 33BuildRequires: popt-devel >= 1.7
44e18714 34%if %{with initrd}
3c62228e
JR
35BuildRequires: libgpg-error-static
36 %if %{with dietlibc}
37BuildRequires: device-mapper-dietlibc
08795d9f 38BuildRequires: dietlibc-static
3c62228e
JR
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
73e37c17 51Requires: popt >= 1.7
ad703024 52Provides: cryptsetup = %{version}
b08008aa 53Obsoletes: cryptsetup
9b81b87b
ER
54Conflicts: udev < 1:118-1
55Conflicts: udev-core < 1:115
00a57b4e 56BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58%define _sbindir /sbin
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
a65162ad 113Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
44e18714 114Group: Base
6bea0031 115Requires: udev-initrd >= 1:115
dce414f0 116Conflicts: geninitrd < 10000.10
44e18714
ER
117
118%description initrd
119This package contains implementation of LUKS for dm-crypt implemented
a65162ad
JB
120in cryptsetup - statically linked for initrd.
121
122%description initrd -l pl.UTF-8
123Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną
124w cryptsetup - wersję statycznie zlinkowaną dla initrd.
44e18714 125
650d35b8
JR
126%package initramfs
127Summary: LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools
128Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla initramfs-tools
129Group: Base
130Requires: %{name} = %{version}-%{release}
131Requires: initramfs-tools
132
133%description initramfs
134LUKS for dm-crypt implemented in cryptsetup - support scripts
135for initramfs-tools.
136
137%description initramfs -l pl.UTF-8
138LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla
139initramfs-tools.
140
00a57b4e 141%prep
ab903cbb 142%setup -q -n %{realname}-%{version}
73e37c17 143%patch0 -p1
90f41aef 144%patch1 -p1
00a57b4e 145
650d35b8
JR
146install %{SOURCE5} README.initramfs
147
00a57b4e 148%build
4ad6edfa 149%{__gettextize}
ab903cbb 150%{__libtoolize}
4ad6edfa 151%{__aclocal} -I m4
152%{__autoconf}
ab903cbb 153%{__autoheader}
4ad6edfa 154%{__automake}
44e18714
ER
155
156%if %{with initrd}
24fff120 157%configure \
3c62228e 158%if %{with dietlibc}
534a238c 159 CC="diet %{__cc} %{rpmcflags} %{rpmldflags} -Os" \
3c62228e
JR
160 ac_cv_lib_popt_poptConfigFileToString=yes \
161 ac_cv_lib_sepol_sepol_bool_set=no \
162 ac_cv_lib_selinux_is_selinux_enabled=no \
163%endif
2c80e984 164 --disable-shared-library \
c769990d 165 --enable-static \
2c80e984
ER
166 --enable-static-cryptsetup \
167 --disable-nls
3c62228e
JR
168
169%{__make} -C luks
170%{__make} -C lib
171
172%if %{with dietlibc}
173# we have to do it by hand cause libtool "know better" and forces
174# static libs from /usr/lib
90f41aef 175diet %{__cc} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
534a238c
JR
176 -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
177 -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
3c62228e
JR
178%else
179%{__make} -C src
44e18714 180mv src/cryptsetup cryptsetup-initrd
3c62228e 181%endif
67f60839 182
44e18714
ER
183%{__make} clean
184%endif
185
186%configure \
187 --enable-static
00a57b4e 188%{__make}
189
190%install
191rm -rf $RPM_BUILD_ROOT
650d35b8 192install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top}
00a57b4e 193
194%{__make} install \
195 DESTDIR=$RPM_BUILD_ROOT
196
197install -d $RPM_BUILD_ROOT/%{_lib}
ab903cbb
JB
198mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
199ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
00a57b4e 200 $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
201
44e18714 202%if %{with initrd}
f9d1ef18
JR
203install -d $RPM_BUILD_ROOT%{_libdir}/initrd
204install cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
44e18714
ER
205%endif
206
650d35b8
JR
207install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
208install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot
209install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot
210install %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev
211
ab903cbb 212%find_lang %{realname}
00a57b4e 213
214%clean
215rm -rf $RPM_BUILD_ROOT
216
217%post -p /sbin/ldconfig
218%postun -p /sbin/ldconfig
219
ab903cbb 220%files -f %{realname}.lang
00a57b4e 221%defattr(644,root,root,755)
ab903cbb 222%doc AUTHORS ChangeLog TODO
00a57b4e 223%attr(755,root,root) %{_sbindir}/cryptsetup
224%attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
73e37c17 225%attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.1
ab903cbb 226%{_mandir}/man8/cryptsetup.8*
00a57b4e 227
228%files devel
229%defattr(644,root,root,755)
230%attr(755,root,root) %{_libdir}/libcryptsetup.so
231%{_libdir}/libcryptsetup.la
ab903cbb 232%{_includedir}/libcryptsetup.h
73e37c17 233%{_pkgconfigdir}/libcryptsetup.pc
00a57b4e 234
24fff120 235%files static
236%defattr(644,root,root,755)
237%{_libdir}/libcryptsetup.a
44e18714
ER
238
239%if %{with initrd}
240%files initrd
241%defattr(644,root,root,755)
f9d1ef18 242%attr(755,root,root) %{_libdir}/initrd/cryptsetup
44e18714 243%endif
650d35b8
JR
244
245%files initramfs
246%defattr(644,root,root,755)
247%doc README.initramfs
248%attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
249%attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot
250%attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev
251%attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot
This page took 0.099481 seconds and 4 git commands to generate.