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