]> git.pld-linux.org Git - packages/cryptsetup.git/blob - cryptsetup.spec
b059af839bc5d8c3435e81a48bc6b760f921b420
[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         --disable-udev \
179         --disable-nls
180
181 %{__make} -C lib
182
183 %if %{with dietlibc}
184 # we have to do it by hand cause libtool "know better" and forces
185 # static libs from /usr/lib
186 CC="%{__cc}"
187 diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
188         -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
189         -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
190 %else
191 %{__make} -C src
192 mv src/cryptsetup cryptsetup-initrd
193 %endif
194
195 %{__make} clean
196 %endif
197
198 %configure \
199         --enable-udev \
200         --enable-static
201 %{__make}
202
203 %install
204 rm -rf $RPM_BUILD_ROOT
205 install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top}
206
207 %{__make} install \
208         DESTDIR=$RPM_BUILD_ROOT
209
210 install -d $RPM_BUILD_ROOT/%{_lib}
211 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
212 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
213         $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
214
215 %if %{with initrd}
216 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
217 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
218 %endif
219
220 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
221 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot
222 install -p %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot
223 install -p %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev
224
225 %find_lang %{realname}
226
227 %clean
228 rm -rf $RPM_BUILD_ROOT
229
230 %post   -p /sbin/ldconfig
231 %postun -p /sbin/ldconfig
232
233 %files -f %{realname}.lang
234 %defattr(644,root,root,755)
235 %doc AUTHORS ChangeLog TODO
236 %attr(755,root,root) %{_sbindir}/cryptsetup
237 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
238 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.1
239 %{_mandir}/man8/cryptsetup.8*
240
241 %files devel
242 %defattr(644,root,root,755)
243 %attr(755,root,root) %{_libdir}/libcryptsetup.so
244 %{_libdir}/libcryptsetup.la
245 %{_includedir}/libcryptsetup.h
246 %{_pkgconfigdir}/libcryptsetup.pc
247
248 %files static
249 %defattr(644,root,root,755)
250 %{_libdir}/libcryptsetup.a
251
252 %if %{with initrd}
253 %files initrd
254 %defattr(644,root,root,755)
255 %attr(755,root,root) %{_libdir}/initrd/cryptsetup
256 %endif
257
258 %files initramfs
259 %defattr(644,root,root,755)
260 %doc README.initramfs
261 %attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
262 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot
263 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev
264 %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot
This page took 0.056623 seconds and 2 git commands to generate.