]> git.pld-linux.org Git - packages/cryptsetup.git/blob - cryptsetup.spec
- rel 2; don't drag libs like udev when not needed; use crypto backend kernel
[packages/cryptsetup.git] / cryptsetup.spec
1 #
2 # Conditonal build:
3 %bcond_without  initrd          # don't build initrd version
4 %bcond_without  dietlibc        # build initrd version with static glibc instead of dietlibc
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.3.1
11 Release:        2
12 License:        GPL v2
13 Group:          Base
14 #Source0Download: http://code.google.com/p/cryptsetup/downloads/list
15 Source0:        http://cryptsetup.googlecode.com/files/%{realname}-%{version}.tar.bz2
16 # Source0-md5:  1f5b5a9d538e8a3c191fb7dd85b9b013
17 Source1:        %{name}-initramfs-root-conf
18 Source2:        %{name}-initramfs-root-hook
19 Source3:        %{name}-initramfs-root-local-top
20 Source4:        %{name}-initramfs-passdev-hook
21 Source5:        %{name}-initramfs-README
22 Patch0:         %{name}-diet.patch
23 Patch1:         %{name}-pl.po-update.patch
24 Patch2:         %{name}-dont-drag-more-libs.patch
25 URL:            http://code.google.com/p/cryptsetup/
26 BuildRequires:  autoconf >= 2.67
27 BuildRequires:  automake
28 BuildRequires:  device-mapper-devel >= 1.02.03
29 BuildRequires:  gettext-devel >= 0.15
30 BuildRequires:  libgcrypt-devel >= 1.1.42
31 BuildRequires:  libselinux-devel
32 BuildRequires:  libsepol-devel
33 BuildRequires:  libtool >= 2:2.0
34 BuildRequires:  libuuid-devel
35 BuildRequires:  popt-devel >= 1.7
36 %if %{with initrd}
37 BuildRequires:  libgpg-error-static
38         %if %{with dietlibc}
39 BuildRequires:  device-mapper-dietlibc
40 BuildRequires:  dietlibc-static
41 BuildRequires:  libgcrypt-dietlibc
42 BuildRequires:  libuuid-dietlibc
43 BuildRequires:  popt-dietlibc
44         %else
45 BuildRequires:  device-mapper-static >= 1.02.07
46 BuildRequires:  libgcrypt-static >= 1.1.42
47 BuildRequires:  libselinux-static
48 BuildRequires:  libsepol-static
49 BuildRequires:  libuuid-static
50 BuildRequires:  popt-static
51         %endif
52 %endif
53 Requires:       popt >= 1.7
54 Provides:       cryptsetup = %{version}
55 Obsoletes:      cryptsetup
56 Conflicts:      udev < 1:118-1
57 Conflicts:      udev-core < 1:115
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %define         _sbindir        /sbin
61
62 %description
63 LUKS is the upcoming standard for Linux hard disk encryption. By
64 providing a standard on-disk-format, it does not only facilitate
65 compatibility among distributions, but also provide secure management
66 of multiple user passwords. In contrast to existing solution, LUKS
67 stores all setup necessary setup information in the partition header,
68 enabling the user to transport or migrate his data seamlessly.
69
70 This package contains implementation of LUKS for dm-crypt implemented
71 in cryptsetup.
72
73 %description -l pl.UTF-8
74 LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku.
75 Dostarczając standardowy format danych na dysku nie tylko ułatwia
76 utrzymanie kompatybilności między dystrybucjami, ale także dostarcza
77 bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie
78 do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne
79 informacje o konfiguracji w nagłówku partycji, pozwalając
80 użytkownikowi przenosić lub migrować dane w sposób przezroczysty.
81
82 Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
83 cryptsetup.
84
85 %package devel
86 Summary:        Header files for cryptsetup library
87 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki cryptsetup
88 Group:          Development/Libraries
89 Requires:       %{name} = %{version}-%{release}
90 Requires:       device-mapper-devel
91 Requires:       libgcrypt-devel >= 1.1.42
92 Obsoletes:      cryptsetup-devel
93
94 %description devel
95 Header files for cryptsetup library.
96
97 %description devel -l pl.UTF-8
98 Pliki nagłówkowe biblioteki cryptsetup.
99
100 %package static
101 Summary:        Static cryptsetup library
102 Summary(pl.UTF-8):      Statyczna biblioteka cryptsetup
103 Group:          Development/Libraries
104 Requires:       %{name}-devel = %{version}-%{release}
105 Obsoletes:      cryptsetup-static
106
107 %description static
108 Static version of cryptsetup library.
109
110 %description static -l pl.UTF-8
111 Statyczna wersja biblioteki cryptsetup.
112
113 %package initrd
114 Summary:        LUKS for dm-crypt implemented in cryptsetup - initrd version
115 Summary(pl.UTF-8):      LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
116 Group:          Base
117 Requires:       udev-initrd >= 1:115
118 Conflicts:      geninitrd < 10000.10
119
120 %description initrd
121 This package contains implementation of LUKS for dm-crypt implemented
122 in cryptsetup - statically linked for initrd.
123
124 %description initrd -l pl.UTF-8
125 Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną
126 w cryptsetup - wersję statycznie zlinkowaną dla initrd.
127
128 %package initramfs
129 Summary:        LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools
130 Summary(pl.UTF-8):      LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla initramfs-tools
131 Group:          Base
132 Requires:       %{name} = %{version}-%{release}
133 Requires:       initramfs-tools
134
135 %description initramfs
136 LUKS for dm-crypt implemented in cryptsetup - support scripts
137 for initramfs-tools.
138
139 %description initramfs -l pl.UTF-8
140 LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla
141 initramfs-tools.
142
143 %prep
144 %setup -q -n %{realname}-%{version}
145 %patch0 -p1
146 %patch1 -p1
147 %patch2 -p1
148
149 cp -a %{SOURCE5} README.initramfs
150
151 %{__rm} po/stamp-po
152
153 %build
154 %{__gettextize}
155 %{__libtoolize}
156 %{__aclocal} -I m4
157 %{__autoconf}
158 %{__autoheader}
159 %{__automake}
160
161 %if %{with initrd}
162 CC="%{__cc}"
163 %configure \
164 %if %{with dietlibc}
165 %configure \
166         CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \
167         LIBS="-lcompat" \
168         ac_cv_lib_popt_poptConfigFileToString=yes \
169         ac_cv_lib_sepol_sepol_bool_set=no \
170         ac_cv_lib_selinux_is_selinux_enabled=no \
171 %endif
172 %if "%{?configure_cache}" == "1"
173         --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
174 %endif
175         --disable-shared \
176         --enable-static \
177         --enable-static-cryptsetup \
178         --with-crypto_backend=kernel \
179         --disable-udev \
180         --disable-nls
181
182 %{__make} -C lib
183
184 %if %{with dietlibc}
185 # we have to do it by hand cause libtool "know better" and forces
186 # static libs from /usr/lib
187 CC="%{__cc}"
188 diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
189         -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
190         -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
191 %else
192 %{__make} -C src
193 mv src/cryptsetup cryptsetup-initrd
194 %endif
195
196 %{__make} clean
197 %endif
198
199 %configure \
200         --enable-udev \
201         --enable-static
202 %{__make}
203
204 %install
205 rm -rf $RPM_BUILD_ROOT
206 install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top}
207
208 %{__make} install \
209         DESTDIR=$RPM_BUILD_ROOT
210
211 install -d $RPM_BUILD_ROOT/%{_lib}
212 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
213 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
214         $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
215
216 %if %{with initrd}
217 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
218 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
219 %endif
220
221 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
222 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot
223 install -p %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot
224 install -p %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev
225
226 %find_lang %{realname}
227
228 %clean
229 rm -rf $RPM_BUILD_ROOT
230
231 %post   -p /sbin/ldconfig
232 %postun -p /sbin/ldconfig
233
234 %files -f %{realname}.lang
235 %defattr(644,root,root,755)
236 %doc AUTHORS ChangeLog TODO
237 %attr(755,root,root) %{_sbindir}/cryptsetup
238 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
239 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.1
240 %{_mandir}/man8/cryptsetup.8*
241
242 %files devel
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{_libdir}/libcryptsetup.so
245 %{_libdir}/libcryptsetup.la
246 %{_includedir}/libcryptsetup.h
247 %{_pkgconfigdir}/libcryptsetup.pc
248
249 %files static
250 %defattr(644,root,root,755)
251 %{_libdir}/libcryptsetup.a
252
253 %if %{with initrd}
254 %files initrd
255 %defattr(644,root,root,755)
256 %attr(755,root,root) %{_libdir}/initrd/cryptsetup
257 %endif
258
259 %files initramfs
260 %defattr(644,root,root,755)
261 %doc README.initramfs
262 %attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
263 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot
264 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev
265 %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot
This page took 0.111906 seconds and 4 git commands to generate.