]> git.pld-linux.org Git - packages/cryptsetup-luks.git/blob - cryptsetup-luks.spec
- rel 10
[packages/cryptsetup-luks.git] / cryptsetup-luks.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.0.6
11 Release:        10
12 License:        GPL v2
13 Group:          Base
14 Source0:        http://luks.endorphin.org/source/%{realname}-%{version}.tar.bz2
15 # Source0-md5:  00d452eb7a76e39f5749545d48934a10
16 Source1:        %{name}-initramfs-root-conf
17 Source2:        %{name}-initramfs-root-hook
18 Source3:        %{name}-initramfs-root-local-top
19 Source4:        %{name}-initramfs-passdev-hook
20 Source5:        %{name}-initramfs-README
21 Patch1:         %{name}-nostatic.patch
22 Patch2:         %{name}-udev.patch
23 Patch3:         %{name}-diet.patch
24 URL:            http://luks.endorphin.org/
25 BuildRequires:  autoconf
26 BuildRequires:  automake
27 BuildRequires:  device-mapper-devel
28 BuildRequires:  gettext-devel
29 BuildRequires:  libgcrypt-devel >= 1.1.42
30 BuildRequires:  libselinux-devel
31 BuildRequires:  libsepol-devel
32 BuildRequires:  libtool
33 BuildRequires:  libuuid-devel
34 BuildRequires:  popt-devel
35 %if %{with initrd}
36 BuildRequires:  libgpg-error-static
37         %if %{with dietlibc}
38 BuildRequires:  device-mapper-dietlibc
39 BuildRequires:  libgcrypt-dietlibc
40 BuildRequires:  libuuid-dietlibc
41 BuildRequires:  popt-dietlibc
42         %else
43 BuildRequires:  device-mapper-static >= 1.02.07
44 BuildRequires:  libgcrypt-static >= 1.1.42
45 BuildRequires:  libselinux-static
46 BuildRequires:  libsepol-static
47 BuildRequires:  libuuid-static
48 BuildRequires:  popt-static
49         %endif
50 %endif
51 Provides:       cryptsetup = %{version}
52 Obsoletes:      cryptsetup
53 Conflicts:      udev < 1:118-1
54 Conflicts:      udev-core < 1:115
55 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
57 %define         _sbindir        /sbin
58 %define         _noautoreqdep   libcryptsetup.so.0
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 Obsoletes:      cryptsetup-devel
91
92 %description devel
93 Header files for cryptsetup library.
94
95 %description devel -l pl.UTF-8
96 Pliki nagłówkowe biblioteki cryptsetup.
97
98 %package static
99 Summary:        Static cryptsetup library
100 Summary(pl.UTF-8):      Statyczna biblioteka cryptsetup
101 Group:          Development/Libraries
102 Requires:       %{name}-devel = %{version}-%{release}
103 Obsoletes:      cryptsetup-static
104
105 %description static
106 Static version of cryptsetup library.
107
108 %description static -l pl.UTF-8
109 Statyczna wersja biblioteki cryptsetup.
110
111 %package initrd
112 Summary:        LUKS for dm-crypt implemented in cryptsetup - initrd version
113 Group:          Base
114 Requires:       udev-initrd >= 1:115
115 Conflicts:      geninitrd < 10000.10
116
117 %description initrd
118 This package contains implementation of LUKS for dm-crypt implemented
119 in cryptsetup - staticaly linked for initrd.
120
121 %package initramfs
122 Summary:        LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools
123 Summary(pl.UTF-8):      LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla initramfs-tools
124 Group:          Base
125 Requires:       %{name} = %{version}-%{release}
126 Requires:       initramfs-tools
127
128 %description initramfs
129 LUKS for dm-crypt implemented in cryptsetup - support scripts
130 for initramfs-tools.
131
132 %description initramfs -l pl.UTF-8
133 LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla
134 initramfs-tools.
135
136 %prep
137 %setup -q -n %{realname}-%{version}
138 %patch1 -p1
139 %patch2 -p1
140 %patch3 -p1
141
142 install %{SOURCE5} README.initramfs
143
144 %build
145 %{__gettextize}
146 %{__libtoolize}
147 %{__aclocal} -I m4
148 %{__autoconf}
149 %{__autoheader}
150 %{__automake}
151
152 %if %{with initrd}
153 %configure \
154 %if %{with dietlibc}
155         CC="diet %{__cc} %{rpmcflags} %{rpmldflags} -Os" \
156         ac_cv_lib_popt_poptConfigFileToString=yes \
157         ac_cv_lib_sepol_sepol_bool_set=no \
158         ac_cv_lib_selinux_is_selinux_enabled=no \
159 %endif
160         --disable-shared-library \
161         --enable-static \
162         --enable-static-cryptsetup \
163         --disable-nls
164
165 %{__make} -C luks
166 %{__make} -C lib
167
168 %if %{with dietlibc}
169 # we have to do it by hand cause libtool "know better" and forces
170 # static libs from /usr/lib
171 diet %{__cc} %{rpmcflags} %{rpmldflags} -Os -I./lib -static \
172         -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
173         -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
174 %else
175 %{__make} -C src
176 mv src/cryptsetup cryptsetup-initrd
177 %endif
178
179 %{__make} clean
180 %endif
181
182 %configure \
183         --enable-static
184 %{__make}
185
186 %install
187 rm -rf $RPM_BUILD_ROOT
188 install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top}
189
190 %{__make} install \
191         DESTDIR=$RPM_BUILD_ROOT
192
193 install -d $RPM_BUILD_ROOT/%{_lib}
194 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
195 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
196         $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
197
198 %if %{with initrd}
199 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
200 install cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
201 %endif
202
203 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
204 install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot
205 install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot
206 install %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev
207
208 %find_lang %{realname}
209
210 %clean
211 rm -rf $RPM_BUILD_ROOT
212
213 %post   -p /sbin/ldconfig
214 %postun -p /sbin/ldconfig
215
216 %files -f %{realname}.lang
217 %defattr(644,root,root,755)
218 %doc AUTHORS ChangeLog TODO
219 %attr(755,root,root) %{_sbindir}/cryptsetup
220 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
221 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.0
222 %{_mandir}/man8/cryptsetup.8*
223
224 %files devel
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{_libdir}/libcryptsetup.so
227 %{_libdir}/libcryptsetup.la
228 %{_includedir}/libcryptsetup.h
229
230 %files static
231 %defattr(644,root,root,755)
232 %{_libdir}/libcryptsetup.a
233
234 %if %{with initrd}
235 %files initrd
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{_libdir}/initrd/cryptsetup
238 %endif
239
240 %files initramfs
241 %defattr(644,root,root,755)
242 %doc README.initramfs
243 %attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
244 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot
245 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev
246 %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot
This page took 0.091651 seconds and 3 git commands to generate.