]> git.pld-linux.org Git - packages/cryptsetup.git/blob - cryptsetup.spec
3bf6e606d59dd55de33a0cf25be8df8861f75d26
[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.5.0
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/%{name}-%{version}.tar.bz2
16 # Source0-md5:  0fa7ba8923b0ce8eed2aa65f2cb9950c
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
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.07
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 Conflicts:      udev < 1:118-1
55 Conflicts:      udev-core < 1:115
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %define         _sbindir        /sbin
59
60 %description
61 LUKS is the upcoming standard for Linux hard disk encryption. By
62 providing a standard on-disk-format, it does not only facilitate
63 compatibility among distributions, but also provide secure management
64 of multiple user passwords. In contrast to existing solution, LUKS
65 stores all setup necessary setup information in the partition header,
66 enabling the user to transport or migrate his data seamlessly.
67
68 This package contains implementation of LUKS for dm-crypt implemented
69 in cryptsetup.
70
71 %description -l pl.UTF-8
72 LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku.
73 Dostarczając standardowy format danych na dysku nie tylko ułatwia
74 utrzymanie kompatybilności między dystrybucjami, ale także dostarcza
75 bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie
76 do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne
77 informacje o konfiguracji w nagłówku partycji, pozwalając
78 użytkownikowi przenosić lub migrować dane w sposób przezroczysty.
79
80 Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
81 cryptsetup.
82
83 %package devel
84 Summary:        Header files for cryptsetup library
85 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki cryptsetup
86 Group:          Development/Libraries
87 Requires:       %{name} = %{version}-%{release}
88 Requires:       device-mapper-devel
89 Requires:       libgcrypt-devel >= 1.1.42
90 Provides:       cryptsetup-luks-devel = %{version}-%{release}
91 Obsoletes:      cryptsetup-luks-devel < 1.4.1-2
92
93 %description devel
94 Header files for cryptsetup library.
95
96 %description devel -l pl.UTF-8
97 Pliki nagłówkowe biblioteki cryptsetup.
98
99 %package static
100 Summary:        Static cryptsetup library
101 Summary(pl.UTF-8):      Statyczna biblioteka cryptsetup
102 Group:          Development/Libraries
103 Requires:       %{name}-devel = %{version}-%{release}
104 Provides:       cryptsetup-luks-static = %{version}-%{release}
105 Obsoletes:      cryptsetup-luks-static < 1.4.1-2
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 -n python-pycryptsetup
114 Summary:        Python binding for cryptsetup library
115 Summary(pl.UTF-8):      Wiązanie Pythona do biblioteki cryptsetup
116 Group:          Libraries/Python
117 Requires:       %{name} = %{version}-%{release}
118 %pyrequires_eq  python-libs
119
120 %description -n python-pycryptsetup
121 Python binding for cryptsetup library.
122
123 %description -n python-pycryptsetup -l pl.UTF-8
124 Wiązanie Pythona do biblioteki cryptsetup.
125
126 %package initrd
127 Summary:        LUKS for dm-crypt implemented in cryptsetup - initrd version
128 Summary(pl.UTF-8):      LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
129 Group:          Base
130 Requires:       udev-initrd >= 1:115
131 Provides:       cryptsetup-luks-initrd = %{version}-%{release}
132 Obsoletes:      cryptsetup-luks-initrd < 1.4.1-2
133 Conflicts:      geninitrd < 10000.10
134
135 %description initrd
136 This package contains implementation of LUKS for dm-crypt implemented
137 in cryptsetup - statically linked for initrd.
138
139 %description initrd -l pl.UTF-8
140 Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną w
141 cryptsetup - wersję statycznie zlinkowaną dla initrd.
142
143 %prep
144 %setup -q
145 %patch0 -p1
146
147 %{__rm} po/stamp-po
148
149 %build
150 %{__gettextize}
151 %{__libtoolize}
152 %{__aclocal} -I m4
153 %{__autoconf}
154 %{__autoheader}
155 %{__automake}
156
157 %if %{with initrd}
158 CC="%{__cc}"
159 %configure \
160 %if %{with dietlibc}
161         CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \
162         LIBS="-lcompat" \
163         ac_cv_lib_popt_poptConfigFileToString=yes \
164         ac_cv_lib_sepol_sepol_bool_set=no \
165         ac_cv_lib_selinux_is_selinux_enabled=no \
166 %endif
167 %if "%{?configure_cache}" == "1"
168         --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
169 %endif
170         --disable-shared \
171         --enable-static \
172         --enable-static-cryptsetup \
173         --disable-nls
174
175 %{__make} -C lib
176
177 %if %{with dietlibc}
178 # we have to do it by hand cause libtool "know better" and forces
179 # static libs from /usr/lib
180 CC="%{__cc}"
181 diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
182         -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
183         -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
184 %else
185 %{__make} -C src
186 mv src/cryptsetup cryptsetup-initrd
187 %endif
188
189 %{__make} clean
190 %endif
191
192 %configure \
193         --enable-udev \
194         --enable-static \
195         %{?with_python:--enable-python}
196 %{__make}
197
198 %install
199 rm -rf $RPM_BUILD_ROOT
200
201 %{__make} install \
202         DESTDIR=$RPM_BUILD_ROOT
203
204 install -d $RPM_BUILD_ROOT/%{_lib}
205 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
206 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
207         $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
208
209 %if %{with initrd}
210 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
211 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
212 %endif
213
214 %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.{la,a}}
215
216 %find_lang %{name}
217
218 %clean
219 rm -rf $RPM_BUILD_ROOT
220
221 %post   -p /sbin/ldconfig
222 %postun -p /sbin/ldconfig
223
224 %files -f %{name}.lang
225 %defattr(644,root,root,755)
226 %doc AUTHORS ChangeLog TODO
227 %attr(755,root,root) %{_sbindir}/cryptsetup
228 %attr(755,root,root) %{_sbindir}/veritysetup
229 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
230 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.4
231 %{_mandir}/man8/cryptsetup.8*
232 %{_mandir}/man8/veritysetup.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.10612 seconds and 2 git commands to generate.