]> git.pld-linux.org Git - packages/cryptsetup.git/blob - cryptsetup.spec
- added initramfs subpackage (NEED TESTERS)
[packages/cryptsetup.git] / cryptsetup.spec
1 #
2 # Conditonal build:
3 %bcond_without  initrd  # don't build initrd version
4 #
5 %define realname        cryptsetup
6 Summary:        LUKS for dm-crypt implemented in cryptsetup
7 Summary(pl.UTF-8):      LUKS dla dm-crypta zaimplementowany w cryptsetup
8 Name:           cryptsetup-luks
9 Version:        1.0.6
10 Release:        7
11 License:        GPL v2
12 Group:          Base
13 Source0:        http://luks.endorphin.org/source/%{realname}-%{version}.tar.bz2
14 # Source0-md5:  00d452eb7a76e39f5749545d48934a10
15 Source1:        %{name}-initramfs-root-conf
16 Source2:        %{name}-initramfs-root-hook
17 Source3:        %{name}-initramfs-root-local-top
18 Source4:        %{name}-initramfs-passdev-hook
19 Source5:        %{name}-initramfs-README
20 Patch1:         %{name}-nostatic.patch
21 Patch2:         %{name}-udev.patch
22 URL:            http://luks.endorphin.org/
23 BuildRequires:  autoconf
24 BuildRequires:  automake
25 BuildRequires:  device-mapper-devel
26 BuildRequires:  gettext-devel
27 BuildRequires:  libgcrypt-devel >= 1.1.42
28 BuildRequires:  libselinux-devel
29 BuildRequires:  libsepol-devel
30 BuildRequires:  libtool
31 BuildRequires:  libuuid-devel
32 BuildRequires:  popt-devel
33 %if %{with initrd}
34 BuildRequires:  device-mapper-static >= 1.02.07
35 BuildRequires:  libgcrypt-static >= 1.1.42
36 BuildRequires:  libgpg-error-static
37 BuildRequires:  libselinux-static
38 BuildRequires:  libsepol-static
39 BuildRequires:  libuuid-static
40 BuildRequires:  popt-static
41 %endif
42 Provides:       cryptsetup = %{version}
43 Obsoletes:      cryptsetup
44 Conflicts:      udev < 1:118-1
45 Conflicts:      udev-core < 1:115
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %define         _sbindir        /sbin
49 %define         _noautoreqdep   libcryptsetup.so.0
50
51 %description
52 LUKS is the upcoming standard for Linux hard disk encryption. By
53 providing a standard on-disk-format, it does not only facilitate
54 compatibility among distributions, but also provide secure management
55 of multiple user passwords. In contrast to existing solution, LUKS
56 stores all setup necessary setup information in the partition header,
57 enabling the user to transport or migrate his data seamlessly.
58
59 This package contains implementation of LUKS for dm-crypt implemented
60 in cryptsetup.
61
62 %description -l pl.UTF-8
63 LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku.
64 Dostarczając standardowy format danych na dysku nie tylko ułatwia
65 utrzymanie kompatybilności między dystrybucjami, ale także dostarcza
66 bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie
67 do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne
68 informacje o konfiguracji w nagłówku partycji, pozwalając
69 użytkownikowi przenosić lub migrować dane w sposób przezroczysty.
70
71 Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
72 cryptsetup.
73
74 %package devel
75 Summary:        Header files for cryptsetup library
76 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki cryptsetup
77 Group:          Development/Libraries
78 Requires:       %{name} = %{version}-%{release}
79 Requires:       device-mapper-devel
80 Requires:       libgcrypt-devel >= 1.1.42
81 Obsoletes:      cryptsetup-devel
82
83 %description devel
84 Header files for cryptsetup library.
85
86 %description devel -l pl.UTF-8
87 Pliki nagłówkowe biblioteki cryptsetup.
88
89 %package static
90 Summary:        Static cryptsetup library
91 Summary(pl.UTF-8):      Statyczna biblioteka cryptsetup
92 Group:          Development/Libraries
93 Requires:       %{name}-devel = %{version}-%{release}
94 Obsoletes:      cryptsetup-static
95
96 %description static
97 Static version of cryptsetup library.
98
99 %description static -l pl.UTF-8
100 Statyczna wersja biblioteki cryptsetup.
101
102 %package initrd
103 Summary:        LUKS for dm-crypt implemented in cryptsetup - initrd version
104 Group:          Base
105 Requires:       udev-initrd >= 1:115
106
107 %description initrd
108 This package contains implementation of LUKS for dm-crypt implemented
109 in cryptsetup - staticaly linked for initrd.
110
111 %package initramfs
112 Summary:        LUKS for dm-crypt implemented in cryptsetup - support scripts for initramfs-tools
113 Summary(pl.UTF-8):      LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla initramfs-tools
114 Group:          Base
115 Requires:       %{name} = %{version}-%{release}
116 Requires:       initramfs-tools
117
118 %description initramfs
119 LUKS for dm-crypt implemented in cryptsetup - support scripts
120 for initramfs-tools.
121
122 %description initramfs -l pl.UTF-8
123 LUKS dla dm-crypta zaimplementowany w cryptsetup - skrypty dla
124 initramfs-tools.
125
126 %prep
127 %setup -q -n %{realname}-%{version}
128 %patch1 -p1
129 %patch2 -p1
130
131 install %{SOURCE5} README.initramfs
132
133 %build
134 %{__gettextize}
135 %{__libtoolize}
136 %{__aclocal} -I m4
137 %{__autoconf}
138 %{__autoheader}
139 %{__automake}
140
141 %if %{with initrd}
142 %configure \
143         --disable-shared-library \
144         --enable-static \
145         --enable-static-cryptsetup \
146         --disable-nls
147 %{__make}
148 mv src/cryptsetup cryptsetup-initrd
149 %{__make} clean
150 %endif
151
152 %configure \
153         --enable-static
154 %{__make}
155
156 %install
157 rm -rf $RPM_BUILD_ROOT
158 install -d $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{conf-hooks.d,hooks,scripts/local-top}
159
160 %{__make} install \
161         DESTDIR=$RPM_BUILD_ROOT
162
163 install -d $RPM_BUILD_ROOT/%{_lib}
164 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
165 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
166         $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
167
168 %if %{with initrd}
169 install cryptsetup-initrd $RPM_BUILD_ROOT%{_sbindir}
170 %endif
171
172 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
173 install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptroot
174 install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/cryptroot
175 install %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/cryptpassdev
176
177 %find_lang %{realname}
178
179 %clean
180 rm -rf $RPM_BUILD_ROOT
181
182 %post   -p /sbin/ldconfig
183 %postun -p /sbin/ldconfig
184
185 %files -f %{realname}.lang
186 %defattr(644,root,root,755)
187 %doc AUTHORS ChangeLog TODO
188 %attr(755,root,root) %{_sbindir}/cryptsetup
189 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
190 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.0
191 %{_mandir}/man8/cryptsetup.8*
192
193 %files devel
194 %defattr(644,root,root,755)
195 %attr(755,root,root) %{_libdir}/libcryptsetup.so
196 %{_libdir}/libcryptsetup.la
197 %{_includedir}/libcryptsetup.h
198
199 %files static
200 %defattr(644,root,root,755)
201 %{_libdir}/libcryptsetup.a
202
203 %if %{with initrd}
204 %files initrd
205 %defattr(644,root,root,755)
206 %attr(755,root,root) %{_sbindir}/cryptsetup-initrd
207 %endif
208
209 %files initramfs
210 %defattr(644,root,root,755)
211 %doc README.initramfs
212 %attr(755,root,root) %{_datadir}/initramfs-tools/conf-hooks.d/cryptsetup
213 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptroot
214 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/cryptpassdev
215 %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/cryptroot
This page took 0.076775 seconds and 3 git commands to generate.