]> git.pld-linux.org Git - packages/cryptsetup.git/blob - cryptsetup.spec
073f5f0b4bb0533e3e7bc5fe0ea80e63bf4c26a2
[packages/cryptsetup.git] / cryptsetup.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.1.3
11 Release:        1
12 License:        GPL v2
13 Group:          Base
14 Source0:        http://cryptsetup.googlecode.com/files/%{realname}-%{version}.tar.bz2
15 # Source0-md5:  318a64470861ea5b92a52f2014f1e7c1
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 Patch0:         %{name}-nostatic.patch
22 Patch1:         %{name}-diet.patch
23 URL:            http://code.google.com/p/cryptsetup/
24 BuildRequires:  autoconf >= 2.57
25 BuildRequires:  automake
26 BuildRequires:  device-mapper-devel >= 1.02.03
27 BuildRequires:  gettext-devel >= 0.15
28 BuildRequires:  libgcrypt-devel >= 1.1.42
29 BuildRequires:  libselinux-devel
30 BuildRequires:  libsepol-devel
31 BuildRequires:  libtool
32 BuildRequires:  libuuid-devel
33 BuildRequires:  popt-devel >= 1.7
34 %if %{with initrd}
35 BuildRequires:  libgpg-error-static
36         %if %{with dietlibc}
37 BuildRequires:  device-mapper-dietlibc
38 BuildRequires:  dietlibc-static
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 Requires:       popt >= 1.7
52 Provides:       cryptsetup = %{version}
53 Obsoletes:      cryptsetup
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 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 Summary(pl.UTF-8):      LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
114 Group:          Base
115 Requires:       udev-initrd >= 1:115
116 Conflicts:      geninitrd < 10000.10
117
118 %description initrd
119 This package contains implementation of LUKS for dm-crypt implemented
120 in cryptsetup - statically linked for initrd.
121
122 %description initrd -l pl.UTF-8
123 Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną
124 w cryptsetup - wersję statycznie zlinkowaną dla initrd.
125
126 %package initramfs
127 Summary:        LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools
128 Summary(pl.UTF-8):      LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla initramfs-tools
129 Group:          Base
130 Requires:       %{name} = %{version}-%{release}
131 Requires:       initramfs-tools
132
133 %description initramfs
134 LUKS for dm-crypt implemented in cryptsetup - support scripts
135 for initramfs-tools.
136
137 %description initramfs -l pl.UTF-8
138 LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla
139 initramfs-tools.
140
141 %prep
142 %setup -q -n %{realname}-%{version}
143 %patch0 -p1
144 %patch1 -p1
145
146 cp -a %{SOURCE5} README.initramfs
147
148 %build
149 %{__gettextize}
150 %{__libtoolize}
151 %{__aclocal} -I m4
152 %{__autoconf}
153 %{__autoheader}
154 %{__automake}
155
156 %if %{with initrd}
157 CC="%{__cc}"
158 %configure \
159 %if %{with dietlibc}
160 %configure \
161         CC="diet ${CC#ccache } %{rpmcflags} %{rpmldflags} -Os" \
162         ac_cv_lib_popt_poptConfigFileToString=yes \
163         ac_cv_lib_sepol_sepol_bool_set=no \
164         ac_cv_lib_selinux_is_selinux_enabled=no \
165 %endif
166 %if "%{?configure_cache}" == "1"
167         --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
168 %endif
169         --disable-shared-library \
170         --enable-static \
171         --enable-static-cryptsetup \
172         --disable-nls
173
174 %{__make} -C luks
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 } %{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-static
194 %{__make}
195
196 %install
197 rm -rf $RPM_BUILD_ROOT
198 install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top}
199
200 %{__make} install \
201         DESTDIR=$RPM_BUILD_ROOT
202
203 install -d $RPM_BUILD_ROOT/%{_lib}
204 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
205 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
206         $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
207
208 %if %{with initrd}
209 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
210 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
211 %endif
212
213 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
214 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot
215 install -p %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot
216 install -p %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev
217
218 %find_lang %{realname}
219
220 %clean
221 rm -rf $RPM_BUILD_ROOT
222
223 %post   -p /sbin/ldconfig
224 %postun -p /sbin/ldconfig
225
226 %files -f %{realname}.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.1
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 initrd}
246 %files initrd
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_libdir}/initrd/cryptsetup
249 %endif
250
251 %files initramfs
252 %defattr(644,root,root,755)
253 %doc README.initramfs
254 %attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
255 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot
256 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev
257 %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot
This page took 0.137009 seconds and 2 git commands to generate.