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