]> git.pld-linux.org Git - packages/cryptsetup.git/blob - cryptsetup.spec
990f5bd55ce4c8b93685ae88150f4a81c74d33e2
[packages/cryptsetup.git] / cryptsetup.spec
1 #
2 # Conditonal build:
3 %bcond_without  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.4.2
11 Release:        4
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:  db2e6189e1b191a279a1f508396d3373
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 Provides:       cryptsetup-luks = %{version}-%{release}
30 Obsoletes:      cryptsetup-luks < 1.4.1-2
31 %if %{with python}
32 BuildRequires:  python-devel >= 1:2.4
33 BuildRequires:  rpm-pythonprov
34 %endif
35 %if %{with initrd}
36 BuildRequires:  libgpg-error-static
37         %if %{with dietlibc}
38 BuildRequires:  device-mapper-dietlibc
39 BuildRequires:  dietlibc-static
40 BuildRequires:  libgcrypt-dietlibc
41 BuildRequires:  libuuid-dietlibc
42 BuildRequires:  popt-dietlibc
43         %else
44 BuildRequires:  device-mapper-static >= 1.02.07
45 BuildRequires:  libgcrypt-static >= 1.1.42
46 BuildRequires:  libselinux-static
47 BuildRequires:  libsepol-static
48 BuildRequires:  libuuid-static
49 BuildRequires:  popt-static
50 BuildRequires:  udev-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 Provides:       cryptsetup-luks-devel = %{version}-%{release}
93 Obsoletes:      cryptsetup-luks-devel < 1.4.1-2
94
95 %description devel
96 Header files for cryptsetup library.
97
98 %description devel -l pl.UTF-8
99 Pliki nagłówkowe biblioteki cryptsetup.
100
101 %package static
102 Summary:        Static cryptsetup library
103 Summary(pl.UTF-8):      Statyczna biblioteka cryptsetup
104 Group:          Development/Libraries
105 Requires:       %{name}-devel = %{version}-%{release}
106 Provides:       cryptsetup-luks-static = %{version}-%{release}
107 Obsoletes:      cryptsetup-luks-static < 1.4.1-2
108
109 %description static
110 Static version of cryptsetup library.
111
112 %description static -l pl.UTF-8
113 Statyczna wersja biblioteki cryptsetup.
114
115 %package -n python-pycryptsetup
116 Summary:        Python binding for cryptsetup library
117 Summary(pl.UTF-8):      Wiązanie Pythona do biblioteki cryptsetup
118 Group:          Libraries/Python
119 Requires:       %{name} = %{version}-%{release}
120 %pyrequires_eq  python-libs
121
122 %description -n python-pycryptsetup
123 Python binding for cryptsetup library.
124
125 %description -n python-pycryptsetup -l pl.UTF-8
126 Wiązanie Pythona do biblioteki cryptsetup.
127
128 %package initrd
129 Summary:        LUKS for dm-crypt implemented in cryptsetup - initrd version
130 Summary(pl.UTF-8):      LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
131 Group:          Base
132 Requires:       udev-initrd >= 1:115
133 Provides:       cryptsetup-luks-initrd = %{version}-%{release}
134 Obsoletes:      cryptsetup-luks-initrd < 1.4.1-2
135 Conflicts:      geninitrd < 10000.10
136
137 %description initrd
138 This package contains implementation of LUKS for dm-crypt implemented
139 in cryptsetup - statically linked for initrd.
140
141 %description initrd -l pl.UTF-8
142 Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną w
143 cryptsetup - wersję statycznie zlinkowaną dla initrd.
144
145 %prep
146 %setup -q
147 %patch0 -p1
148
149 %{__rm} po/stamp-po
150
151 %build
152 %{__gettextize}
153 %{__libtoolize}
154 %{__aclocal} -I m4
155 %{__autoconf}
156 %{__autoheader}
157 %{__automake}
158
159 %if %{with initrd}
160 CC="%{__cc}"
161 %configure \
162 %if %{with dietlibc}
163         CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \
164         LIBS="-lcompat" \
165         ac_cv_lib_popt_poptConfigFileToString=yes \
166         ac_cv_lib_sepol_sepol_bool_set=no \
167         ac_cv_lib_selinux_is_selinux_enabled=no \
168 %endif
169 %if "%{?configure_cache}" == "1"
170         --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
171 %endif
172         --disable-shared \
173         --enable-static \
174         --enable-static-cryptsetup \
175         --disable-nls
176
177 %{__make} -C lib
178
179 %if %{with dietlibc}
180 # we have to do it by hand cause libtool "know better" and forces
181 # static libs from /usr/lib
182 CC="%{__cc}"
183 diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
184         -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
185         -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
186 %else
187 %{__make} -C src
188 mv src/cryptsetup cryptsetup-initrd
189 %endif
190
191 %{__make} clean
192 %endif
193
194 %configure \
195         --enable-udev \
196         --enable-static \
197         %{?with_python:--enable-python}
198 %{__make}
199
200 %install
201 rm -rf $RPM_BUILD_ROOT
202
203 %{__make} install \
204         DESTDIR=$RPM_BUILD_ROOT
205
206 install -d $RPM_BUILD_ROOT/%{_lib}
207 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
208 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
209         $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
210
211 %if %{with initrd}
212 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
213 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
214 %endif
215
216 %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.{la,a}}
217
218 %find_lang %{name}
219
220 %clean
221 rm -rf $RPM_BUILD_ROOT
222
223 %post   -p /sbin/ldconfig
224 %postun -p /sbin/ldconfig
225
226 %files -f %{name}.lang
227 %defattr(644,root,root,755)
228 %doc AUTHORS ChangeLog TODO
229 %attr(755,root,root) %{_sbindir}/cryptsetup
230 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
231 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.4
232 %{_mandir}/man8/cryptsetup.8*
233
234 %files devel
235 %defattr(644,root,root,755)
236 %attr(755,root,root) %{_libdir}/libcryptsetup.so
237 %{_libdir}/libcryptsetup.la
238 %{_includedir}/libcryptsetup.h
239 %{_pkgconfigdir}/libcryptsetup.pc
240
241 %files static
242 %defattr(644,root,root,755)
243 %{_libdir}/libcryptsetup.a
244
245 %if %{with python}
246 %files -n python-pycryptsetup
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{py_sitedir}/pycryptsetup.so
249 %endif
250
251 %if %{with initrd}
252 %files initrd
253 %defattr(644,root,root,755)
254 %attr(755,root,root) %{_libdir}/initrd/cryptsetup
255 %endif
This page took 0.208186 seconds and 3 git commands to generate.