]> git.pld-linux.org Git - packages/cryptsetup.git/blame - cryptsetup.spec
- unify dietlibc compile options and calls
[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
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
2f1a72ff 23Patch3: %{name}-diet.patch
5616104c 24URL: http://luks.endorphin.org/
5fe93676
JB
25BuildRequires: autoconf
26BuildRequires: automake
0b90291e 27BuildRequires: device-mapper-devel
5fe93676 28BuildRequires: gettext-devel
0b90291e
JB
29BuildRequires: libgcrypt-devel >= 1.1.42
30BuildRequires: libselinux-devel
31BuildRequires: libsepol-devel
d172f920 32BuildRequires: libtool
0b90291e
JB
33BuildRequires: libuuid-devel
34BuildRequires: popt-devel
d07d45f7 35%if %{with initrd}
21d48aec
JR
36BuildRequires: libgpg-error-static
37 %if %{with dietlibc}
38BuildRequires: device-mapper-dietlibc
39BuildRequires: libgcrypt-dietlibc
40BuildRequires: libuuid-dietlibc
41BuildRequires: popt-dietlibc
42 %else
5eb10616 43BuildRequires: device-mapper-static >= 1.02.07
a6fd3218 44BuildRequires: libgcrypt-static >= 1.1.42
a6fd3218 45BuildRequires: libselinux-static
8d9e50de 46BuildRequires: libsepol-static
a6fd3218 47BuildRequires: libuuid-static
48BuildRequires: popt-static
21d48aec 49 %endif
5eb10616 50%endif
c0cc5702 51Provides: cryptsetup = %{version}
12cca230 52Obsoletes: cryptsetup
751c89df
ER
53Conflicts: udev < 1:118-1
54Conflicts: udev-core < 1:115
6351d6a5 55BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
57%define _sbindir /sbin
8bf4e8eb 58%define _noautoreqdep libcryptsetup.so.0
6351d6a5 59
60%description
6e98e6fb 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.
6351d6a5 67
6e98e6fb 68This package contains implementation of LUKS for dm-crypt implemented
69in cryptsetup.
6351d6a5 70
77f30028
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.
12cca230 79
77f30028 80Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
12cca230
JB
81cryptsetup.
82
6351d6a5 83%package devel
84Summary: Header files for cryptsetup library
29f5822a 85Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cryptsetup
6351d6a5 86Group: Development/Libraries
87Requires: %{name} = %{version}-%{release}
88Requires: device-mapper-devel
89Requires: libgcrypt-devel >= 1.1.42
12cca230 90Obsoletes: cryptsetup-devel
6351d6a5 91
92%description devel
93Header files for cryptsetup library.
94
77f30028
JR
95%description devel -l pl.UTF-8
96Pliki nagłówkowe biblioteki cryptsetup.
6351d6a5 97
98%package static
99Summary: Static cryptsetup library
29f5822a 100Summary(pl.UTF-8): Statyczna biblioteka cryptsetup
6351d6a5 101Group: Development/Libraries
102Requires: %{name}-devel = %{version}-%{release}
fca9458b 103Obsoletes: cryptsetup-static
6351d6a5 104
105%description static
106Static version of cryptsetup library.
107
77f30028 108%description static -l pl.UTF-8
6351d6a5 109Statyczna wersja biblioteki cryptsetup.
110
d07d45f7
ER
111%package initrd
112Summary: LUKS for dm-crypt implemented in cryptsetup - initrd version
113Group: Base
311e3692 114Requires: udev-initrd >= 1:115
763db42e 115Conflicts: geninitrd <= 10000.3
d07d45f7
ER
116
117%description initrd
118This package contains implementation of LUKS for dm-crypt implemented
119in cryptsetup - staticaly linked for initrd.
120
ecaa484d
JR
121%package initramfs
122Summary: LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools
123Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla initramfs-tools
124Group: Base
125Requires: %{name} = %{version}-%{release}
126Requires: initramfs-tools
127
128%description initramfs
129LUKS for dm-crypt implemented in cryptsetup - support scripts
130for initramfs-tools.
131
132%description initramfs -l pl.UTF-8
133LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla
134initramfs-tools.
135
6351d6a5 136%prep
d7593791 137%setup -q -n %{realname}-%{version}
5eb10616 138%patch1 -p1
311e3692 139%patch2 -p1
2f1a72ff 140%patch3 -p1
6351d6a5 141
ecaa484d
JR
142install %{SOURCE5} README.initramfs
143
6351d6a5 144%build
8d9e50de 145%{__gettextize}
d7593791 146%{__libtoolize}
8d9e50de 147%{__aclocal} -I m4
148%{__autoconf}
d7593791 149%{__autoheader}
8d9e50de 150%{__automake}
d07d45f7
ER
151
152%if %{with initrd}
a6fd3218 153%configure \
21d48aec 154%if %{with dietlibc}
593621cb 155 CC="diet %{__cc} %{rpmcflags} %{rpmldflags} -Os" \
21d48aec
JR
156 ac_cv_lib_popt_poptConfigFileToString=yes \
157 ac_cv_lib_sepol_sepol_bool_set=no \
158 ac_cv_lib_selinux_is_selinux_enabled=no \
159%endif
d6925a9f 160 --disable-shared-library \
5eb10616 161 --enable-static \
d6925a9f
ER
162 --enable-static-cryptsetup \
163 --disable-nls
21d48aec
JR
164
165%{__make} -C luks
166%{__make} -C lib
167
168%if %{with dietlibc}
169# we have to do it by hand cause libtool "know better" and forces
170# static libs from /usr/lib
593621cb
JR
171diet %{__cc} %{rpmcflags} %{rpmldflags} -Os -I./lib -static \
172 -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
173 -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
21d48aec
JR
174%else
175%{__make} -C src
d07d45f7 176mv src/cryptsetup cryptsetup-initrd
21d48aec 177%endif
23904b26 178
d07d45f7
ER
179%{__make} clean
180%endif
181
182%configure \
183 --enable-static
6351d6a5 184%{__make}
185
186%install
187rm -rf $RPM_BUILD_ROOT
ecaa484d 188install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top}
6351d6a5 189
190%{__make} install \
191 DESTDIR=$RPM_BUILD_ROOT
192
193install -d $RPM_BUILD_ROOT/%{_lib}
d7593791
JB
194mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
195ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
6351d6a5 196 $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
197
d07d45f7 198%if %{with initrd}
927d0cdf
JR
199install -d $RPM_BUILD_ROOT%{_libdir}/initrd
200install cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
d07d45f7
ER
201%endif
202
ecaa484d
JR
203install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
204install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot
205install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot
206install %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev
207
d7593791 208%find_lang %{realname}
6351d6a5 209
210%clean
211rm -rf $RPM_BUILD_ROOT
212
213%post -p /sbin/ldconfig
214%postun -p /sbin/ldconfig
215
d7593791 216%files -f %{realname}.lang
6351d6a5 217%defattr(644,root,root,755)
d7593791 218%doc AUTHORS ChangeLog TODO
6351d6a5 219%attr(755,root,root) %{_sbindir}/cryptsetup
220%attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
d7593791
JB
221%attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.0
222%{_mandir}/man8/cryptsetup.8*
6351d6a5 223
224%files devel
225%defattr(644,root,root,755)
226%attr(755,root,root) %{_libdir}/libcryptsetup.so
227%{_libdir}/libcryptsetup.la
d7593791 228%{_includedir}/libcryptsetup.h
6351d6a5 229
a6fd3218 230%files static
231%defattr(644,root,root,755)
232%{_libdir}/libcryptsetup.a
d07d45f7
ER
233
234%if %{with initrd}
235%files initrd
236%defattr(644,root,root,755)
927d0cdf 237%attr(755,root,root) %{_libdir}/initrd/cryptsetup
d07d45f7 238%endif
ecaa484d
JR
239
240%files initramfs
241%defattr(644,root,root,755)
242%doc README.initramfs
243%attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
244%attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot
245%attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev
246%attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot
This page took 3.032596 seconds and 4 git commands to generate.