]>
Commit | Line | Data |
---|---|---|
1b67453e | 1 | # |
99958222 | 2 | # Conditional build: |
11ae9af9 | 3 | %bcond_without initrd # don't build initrd version |
66800f6a | 4 | %bcond_without uClibc # link initrd version with static glibc instead of uClibc |
76c28754 | 5 | %bcond_without clvmd # don't build clvmd |
0dc2b8f2 | 6 | %bcond_without selinux # disable SELinux |
66800f6a | 7 | # |
1a33cfed | 8 | %ifarch sparc64 sparc %{x8664} |
66800f6a JB |
9 | %undefine with_uClibc |
10 | %endif | |
0181a02f | 11 | # |
85d1a67e | 12 | %define devmapper_ver 1.02.25 |
5672aa67 | 13 | Summary: The new version of Logical Volume Manager for Linux |
6536e848 | 14 | Summary(pl.UTF-8): Nowa wersja Logical Volume Managera dla Linuksa |
7e72c866 | 15 | Name: lvm2 |
43797f5b | 16 | Version: 2.02.35 |
fcf95f40 | 17 | Release: 1 |
1738b891 | 18 | License: GPL v2 |
7e72c866 | 19 | Group: Applications/System |
dc5d0e77 | 20 | Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz |
43797f5b | 21 | # Source0-md5: 0544fb7e791f78e3824653dbf4574c2e |
d66d60cc | 22 | Patch0: %{name}-as-needed.patch |
4c78aede | 23 | Patch1: %{name}-selinux.patch |
dc5d0e77 | 24 | URL: http://sources.redhat.com/lvm2/ |
7e72c866 JR |
25 | BuildRequires: autoconf |
26 | BuildRequires: automake | |
3852b0e2 | 27 | BuildRequires: device-mapper-devel >= %{devmapper_ver} |
0dc2b8f2 | 28 | %{?with_selinux:BuildRequires: libselinux-devel >= 1.10} |
bd71c1b4 | 29 | BuildRequires: rpmbuild(macros) >= 1.213 |
1ccfba6c | 30 | %if %{with initrd} |
e1465247 | 31 | %if %{with uClibc} |
75951d3e | 32 | BuildRequires: device-mapper-initrd-devel >= %{devmapper_ver} |
e1465247 | 33 | %ifarch ppc |
34 | BuildRequires: uClibc-static >= 2:0.9.29 | |
35 | %else | |
36 | BuildRequires: uClibc-static >= 2:0.9.26 | |
37 | %endif | |
38 | %else | |
75951d3e | 39 | BuildRequires: device-mapper-static >= %{devmapper_ver} |
e1465247 | 40 | BuildRequires: glibc-static |
52780708 ER |
41 | %{?with_selinux:BuildRequires: libselinux-static >= 1.10} |
42 | %{?with_selinux:BuildRequires: libsepol-static} | |
e1465247 | 43 | %endif |
1ccfba6c | 44 | %endif |
c97b4c11 | 45 | %if %{with clvmd} |
1b67453e | 46 | BuildRequires: cman-devel >= 1.0 |
4c78aede | 47 | BuildRequires: dlm-devel >= 1.0-0.pre21.2 |
1b67453e | 48 | %endif |
33d5c7d0 | 49 | BuildRequires: readline-devel |
75951d3e | 50 | Requires: device-mapper >= %{devmapper_ver} |
1b67453e | 51 | %if %{with clvmd} |
ed044ab4 | 52 | Requires: cman-libs >= 1.0 |
b678d191 | 53 | Requires: dlm >= 1.0-0.pre21.2 |
1b67453e | 54 | %endif |
0dc2b8f2 | 55 | %{?with_selinux:Requires: libselinux >= 1.10} |
25b6b609 | 56 | Obsoletes: lvm |
7e72c866 JR |
57 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
58 | ||
0181a02f | 59 | %define _exec_prefix / |
7e72c866 | 60 | %define _sbindir /sbin |
4223b21a | 61 | %define _libdir /%{_lib} |
7e72c866 | 62 | |
0fbd6aae ER |
63 | # changing CFLAGS in the middle confuses confcache |
64 | %undefine configure_cache | |
65 | ||
7e72c866 JR |
66 | %description |
67 | This package includes a number of utilities for creating, checking, | |
68 | and repairing logical volumes. | |
69 | ||
68d45726 JR |
70 | %description -l pl.UTF-8 |
71 | Pakiet ten zawiera narzędzia do tworzenia, sprawdzania i naprawiania | |
72 | logicznych wolumenów dyskowych (LVM2). | |
7e72c866 | 73 | |
7e72c866 | 74 | %package initrd |
5672aa67 | 75 | Summary: The new version of Logical Volume Manager for Linux - initrd version |
6536e848 | 76 | Summary(pl.UTF-8): Nowa wersja Logical Volume Managera dla Linuksa - wersja dla initrd |
7e72c866 JR |
77 | Group: Base |
78 | ||
79 | %description initrd | |
80 | This package includes a number of utilities for creating, checking, | |
81 | and repairing logical volumes - staticaly linked for initrd. | |
82 | ||
68d45726 JR |
83 | %description initrd -l pl.UTF-8 |
84 | Pakiet ten zawiera narzędzia do tworzenia, sprawdzania i naprawiania | |
85 | logicznych wolumenów dyskowych (LVM2) - statycznie skonsolidowane na | |
7e72c866 JR |
86 | potrzeby initrd. |
87 | ||
88 | %prep | |
ec2de926 | 89 | %setup -q -n LVM2.%{version} |
d66d60cc | 90 | %patch0 -p1 |
4c78aede | 91 | %{?with_selinux:%patch1 -p1} |
66800f6a | 92 | |
7e72c866 | 93 | %build |
242ffb9a | 94 | cp -f /usr/share/automake/config.sub autoconf |
7e72c866 JR |
95 | %{__aclocal} |
96 | %{__autoconf} | |
97 | ||
99958222 | 98 | %if %{with initrd} |
9bdab2f4 | 99 | %configure \ |
69688a46 | 100 | %{?with_uClibc:CC="%{_target_cpu}-uclibc-gcc"} \ |
a5702977 | 101 | ac_cv_lib_dl_dlopen=no \ |
4c78aede | 102 | %{?debug:--enable-debug} \ |
69688a46 | 103 | --with-optimisation="-Os" \ |
9bdab2f4 | 104 | --enable-static_link \ |
69688a46 AM |
105 | --with-lvm1=internal \ |
106 | --disable-selinux \ | |
ef3dbc1a | 107 | --disable-nls |
4c78aede ER |
108 | |
109 | %{__sed} -i -e 's#rpl_malloc#malloc#g' lib/misc/configure.h | |
ec2de926 ER |
110 | |
111 | %{__make} | |
69688a46 | 112 | mv -f tools/lvm.static initrd-lvm |
9bdab2f4 | 113 | %{__make} clean |
7e72c866 JR |
114 | %endif |
115 | ||
9d0d1d5f | 116 | %configure \ |
607d2229 | 117 | CFLAGS="%{rpmcflags}" \ |
4c78aede | 118 | %{?debug:--enable-debug} \ |
9286fdc0 | 119 | --with-optimisation="" \ |
607d2229 AM |
120 | --enable-readline \ |
121 | --enable-fsadm \ | |
ed044ab4 | 122 | %{?with_clvmd:--with-clvmd=cman} \ |
607d2229 AM |
123 | --with-lvm1=internal \ |
124 | --with-pool=internal \ | |
3852b0e2 | 125 | --with-cluster=internal \ |
607d2229 | 126 | --with-snapshots=internal \ |
0dc2b8f2 AG |
127 | --with-mirrors=internal \ |
128 | %{!?with_selinux:--disable-selinux} | |
7e72c866 JR |
129 | %{__make} |
130 | ||
131 | %install | |
132 | rm -rf $RPM_BUILD_ROOT | |
1cfc154f | 133 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/lvm |
7e72c866 JR |
134 | |
135 | %{__make} install \ | |
136 | DESTDIR=$RPM_BUILD_ROOT \ | |
1ccfba6c AM |
137 | OWNER="" \ |
138 | GROUP="" | |
7e72c866 | 139 | |
1cfc154f JR |
140 | touch $RPM_BUILD_ROOT%{_sysconfdir}/lvm/lvm.conf |
141 | ||
9bdab2f4 | 142 | %{?with_initrd:install initrd-lvm $RPM_BUILD_ROOT%{_sbindir}/initrd-lvm} |
7e72c866 JR |
143 | |
144 | %clean | |
145 | rm -rf $RPM_BUILD_ROOT | |
146 | ||
7e72c866 JR |
147 | %files |
148 | %defattr(644,root,root,755) | |
e6ac7970 | 149 | %doc README WHATS_NEW doc/* |
3320dcf1 AM |
150 | %attr(755,root,root) %{_sbindir}/* |
151 | %{?with_initrd:%exclude %{_sbindir}/initrd-lvm} | |
7e72c866 | 152 | %{_mandir}/man?/* |
99958222 | 153 | %attr(750,root,root) %dir %{_sysconfdir}/lvm |
2316bf4d | 154 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf |
7e72c866 | 155 | |
99958222 | 156 | %if %{with initrd} |
7e72c866 JR |
157 | %files initrd |
158 | %defattr(644,root,root,755) | |
159 | %attr(755,root,root) %{_sbindir}/initrd-lvm | |
160 | %endif |