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