Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 2d414859177105f9f019f97d4bcb4fbe > files > 5

evms-2.5.5-10mdv2008.1.src.rpm

%define	name	evms
%define	version	2.5.5
%define	release	%mkrel 10

%define with_cli	1
%define with_gui	1
%define with_ncurses	1
%define with_ha		0
%define with_csm	1

%define kernelsrcdir	/usr/src/linux
%define mdkversion	%(perl -pe '/(\\d+)\\.(\\d)\\.?(\\d)?/; $_="$1$2".($3||0)' /etc/mandriva-release)

# new macros
%define	libmajor	0
%if %mdkversion <= 900
%define libname		lib%name%libmajor
%define develname	lib%name-devel
%define staticdevel	lib%name-static-devel
%else
%define libname		%mklibname %name %libmajor
%define develname	%mklibname -d %name
%define staticdevel	%mklibname -d -s %name
%endif

%{?_without_cli:	%{expand: %%global with_cli 0}}
%{?_without_gui:	%{expand: %%global with_gui 0}}
%{?_without_ncurses:	%{expand: %%global with_ncurses 0}}
%{?_without_ha:		%{expand: %%global with_ha 0}}
%{?_without_csm:	%{expand: %%global with_csm 0}}

%{?_with_cli:		%{expand: %%global with_cli 1}}
%{?_with_gui:		%{expand: %%global with_gui 1}}
%{?_with_ncurses:	%{expand: %%global with_ncurses 1}}
%{?_with_ha:		%{expand: %%global with_ha 1}}
%{?_with_csm:		%{expand: %%global with_csm 1}}

Summary:	Enterprise Volume Management System utilities
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	GPL
Group:		System/Configuration/Hardware
Source0:	http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
Patch2: 	%{name}-2.3.4.replace_top_objects.patch
Patch4: 	evms-2.5.3-packed-attr.patch
# official patches from http://evms.sourceforge.net/patches/2.5.4/engine/:
Patch5:		evms2-gtk2-ui.patch
# gtk-2.0.m4 appended to aclocal.m4 so that aclocal (and related issues) is avoided
Patch6: 	evms-2.5.5-gtk2.patch
Patch7:		evms2-remove-glib.patch
Patch8:		evms2-ncurses-glib2.patch

URL:		http://evms.sourceforge.net/
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

BuildRequires:	autoconf
BuildRequires:	glibc-static-devel
BuildRequires:	libext2fs-devel
BuildRequires:	libdevmapper-devel
BuildRequires:	gettext-devel
%if %{with_ha}
BuildRequires:	libheartbeat-devel
%endif
%if %with_gui
BuildRequires:	glib2-devel
BuildRequires:	gtk+2-devel
%endif
%if %with_ncurses
BuildRequires:	ncurses-devel
%endif



%define		_sbindir	/sbin
%define		_libdir		/%{_lib}

Requires:	%libname = %version
Requires:	%name-interface  = %version

%description
This package contains the user-space tools needed to manage EVMS
(Enterprise Volume Management System) volumes.

In order to use these user-space tools, you must also have your kernel
patched with the most recent EVMS code.



%package 	plugin-heartbeat
Group: 		System/Libraries
Summary: 	EVMS plugin adding Heartbeat support
Provides: 	%name = %version-%release

%description 	plugin-heartbeat
EVMS plugin adding Heartbeat support


%package -n	%libname
Group: 		System/Libraries
Summary: 	Libraries for %name
Provides: 	%{libname} = %version-%release

%description -n %libname
The libraries from %name package

%package -n	%develname
Group: 		Development/Other
Summary: 	Libraries for %name
Requires:	%libname = %version
Provides:	lib%name-devel = %version-%release
Provides: 	%{name}-devel = %{version}-%{release}
Obsoletes:	%{name}-devel %libname-devel

%description -n %develname
Development libraries from %name

%package -n	%staticdevel
Group: 		Development/Other
Summary: 	Static libraries for %name
Requires:	%develname = %version
Obsoletes:	%libname-static-devel
#Provides:	lib%name-devel = %version-%release
#Provides: 	%{name}-devel = %{version}-%{release}
#Obsoletes:	%{name}-devel

%description -n %staticdevel
Static libraries from %name

%package ncurses
Summary:	Ncurses interface for EVMS
Group:		System/Configuration/Hardware
Requires:	%{name} = %{version}
Requires:	usermode-consoleonly
Provides:	%name-interface  = %version-%release

%description ncurses
Ncurses interface for EVMS.

%package gui
Summary:	GUI interface for EVMS
Group:		System/Configuration/Hardware
Requires:	%{name} = %{version}
Requires:	usermode-consoleonly
Provides:	%name-interface  = %version-%release

%description gui
GUI interface for EVMS.

%package cli
Summary:	Command line interface for EVMS
Group:		System/Configuration/Hardware
Requires:	%{name} = %{version}
Provides:	%name-interface  = %version-%release

%description cli
Command line interface for EVMS.


%prep
%setup -q
%patch2 -p1 -b .replace_top_objects
%patch4 -p1 -b .packed-attr
%patch5 -p1
%patch6 -p1 -b .gtk2
%patch7 -p0
%patch8 -p0
autoconf

%build

%configure2_5x \
	--with-plugins=all \
	--with-interfaces=all \
	--disable-glibtest \
%if !%with_ncurses
	--disable-text-mode \
%endif
%if !%with_gui
	--disable-gui \
%endif
%if !%with_cli
	--disable-cli \
%endif
%if !%{with_ha}
	--disable-ha \
%endif
%if !%{with_csm}
	--disable-csm \
%endif
	--with-kernel=%{kernelsrcdir}

%make
make -C tests evms_deactivate

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc

make install \
	DESTDIR=$RPM_BUILD_ROOT

install doc/evms.conf $RPM_BUILD_ROOT/etc
install doc/evms.conf evms.conf.sample

install -m 755 tests/evms_deactivate $RPM_BUILD_ROOT%_sbindir

rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/evms.conf.sample

%if %with_gui
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-%{name}-gui.desktop << EOF
[Desktop Entry]
Name=%{name}-gui
Comment=Enterprise Volume Management System utilities
StartupNotify=false
Exec=%{_bindir}/%{name}gui
Icon=%{name}
Terminal=false
Type=Application
Categories=GTK;Settings;HardwareSettings;
EOF


### consolehelper entry
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps
cat > $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/evmsgui <<EOF
USER=root
PROGRAM=%{_sbindir}/evmsgui
SESSION=true
FALLBACK=false
EOF

### pam entry
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
cat > $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/evmsgui <<EOF
auth       sufficient   pam_rootok.so
auth       required     pam_pwdb.so
session    optional     pam_xauth.so
account    required     pam_permit.so
EOF

mkdir -p $RPM_BUILD_ROOT%{_bindir}/
ln -sf consolehelper $RPM_BUILD_ROOT%{_bindir}/evmsgui

%endif

%if %with_ncurses
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-%{name}-console.desktop << EOF
[Desktop Entry]
Name=%{name}-console
Comment=Enterprise Volume Management System utilities
StartupNotify=false
Exec=%{_bindir}/%{name}n
Icon=%{name}
Terminal=true
Type=Application
Categories=Settings;HardwareSettings;
EOF

### consolehelper entry
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps
cat > $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/evmsn <<EOF
USER=root
PROGRAM=%{_sbindir}/evmsn
SESSION=true
FALLBACK=false
EOF

### pam entry
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
cat > $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/evmsn <<EOF
auth       sufficient   pam_rootok.so
auth       required     pam_pwdb.so
session    optional     pam_xauth.so
account    required     pam_permit.so
EOF

mkdir -p $RPM_BUILD_ROOT%{_bindir}/
ln -sf consolehelper $RPM_BUILD_ROOT%{_bindir}/evmsn

%endif

%find_lang %name

%clean
rm -rf $RPM_BUILD_ROOT

%post -n %{libname} -p /sbin/ldconfig

%postun	-n %{libname} -p /sbin/ldconfig

%if %with_gui
%post gui
%{update_menus}

%postun	gui
%{clean_menus}
%endif

%if %with_ncurses
%post ncurses
%{update_menus}

%postun	ncurses
%{clean_menus}
%endif

%files -f %name.lang
%defattr(644,root,root,755)
%doc ChangeLog INSTALL* PLUGIN* TERMINOLOGY evms.conf.sample
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/evms.conf
%attr(755,root,root) %{_sbindir}/evms*
%exclude %{_sbindir}/evms_gather_info
%if %with_cli
%exclude %{_sbindir}/evms
%endif
%if %with_ncurses
%exclude %{_sbindir}/evmsn
%endif
%if %with_gui
%exclude %{_sbindir}/evmsgui
%endif
%{_mandir}/man8/*
%exclude %{_mandir}/man8/evms.*
%exclude %{_mandir}/man8/evms_gather_info.*

%if %{with_ha}
%files 	plugin-heartbeat
%attr(755,root,root) %{_libdir}/evms/%{version}/ha-*
%{_sysconfdir}/ha.d/resource.d/evms_failover
%endif

%files -n	%libname
%defattr(644,root,root,755)
%dir %{_libdir}/evms/
%dir %{_libdir}/evms/%{version}/
%attr(755,root,root) %{_libdir}/evms/%{version}/*
%if %{with_ha}
%exclude %{_libdir}/evms/%{version}/ha-*
%endif
#attr(755,root,root) %{_libdir}/libdlist-*.so.*
%attr(755,root,root) %{_libdir}/libevms-*.so.*

%files -n	%develname
%defattr(644,root,root,755)
%{_includedir}/evms
%attr(755,root,root) %{_libdir}/libevms.so


%files -n	%staticdevel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/lib*.a

%if %with_ncurses
%files ncurses
%defattr(644,root,root,755)
%doc ChangeLog INSTALL* TERMINOLOGY
%attr(755,root,root) %{_bindir}/evmsn
%attr(755,root,root) %{_sbindir}/evmsn
%config(noreplace) %{_sysconfdir}/pam.d/evmsn
%config(noreplace) %{_sysconfdir}/security/console.apps/evmsn
%{_datadir}/applications/mandriva-%{name}-console.desktop
%endif

%if %with_gui
%files gui
%defattr(644,root,root,755)
%doc ChangeLog INSTALL* TERMINOLOGY
%attr(755,root,root) %{_bindir}/evmsgui
%attr(755,root,root) %{_sbindir}/evmsgui
%config(noreplace) %{_sysconfdir}/pam.d/evmsgui
%config(noreplace) %{_sysconfdir}/security/console.apps/evmsgui
%{_datadir}/applications/mandriva-%{name}-gui.desktop
%endif

%if %with_cli
%files cli
%defattr(644,root,root,755)
%doc ChangeLog INSTALL* TERMINOLOGY
%attr(755,root,root) %{_sbindir}/evms
%attr(755,root,root) %{_sbindir}/evms_gather_info
%{_mandir}/man8/evms.*
%{_mandir}/man8/evms_gather_info.*
%endif




%changelog
* Sat Jan 12 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.5.5-10mdv2008.1
+ Revision: 149703
- rebuild
- kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Tue Sep 18 2007 Emmanuel Andry <eandry@mandriva.org> 2.5.5-9mdv2008.0
+ Revision: 89565
- remove X-MandrivaLinux tag

  + Thierry Vignaud <tvignaud@mandriva.com>
    - s/Mandrake/Mandriva/
    - kill desktop-file-validate's 'warning: key "Encoding" in group "Desktop Entry" is deprecated'

* Thu Aug 23 2007 Funda Wang <fundawang@mandriva.org> 2.5.5-8mdv2008.0
+ Revision: 70696
- drop old menu
- new devel package policy


* Sun Feb 18 2007 Emmanuel Andry <eandry@mandriva.org> 2.5.5-7mdv2007.0
+ Revision: 122404
- rebuild
- uncompress patches
- Import evms

* Tue Sep 19 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 2.5.5-6mdv2007.0
- Rebuild

* Thu Aug 17 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 2.5.5-5mdv2007.0
- restore gui on x86_64...

* Tue Aug 15 2006 Emmanuel Andry <eandry@mandriva.org> 2.5.5-4mdv2007.0
- removed need of gtk+ (thanks to cris@beebgames.com)
- disable gtk2+ on x86_64, doesn't build

* Wed Jul 26 2006 Emmanuel Andry <eandry@mandriva.org> 2.5.5-3mdv2007.0
- fix xdg menu

* Wed Jul 26 2006 Emmanuel Andry <eandry@mandriva.org> 2.5.5-2mdv2007.0
- xdg menu

* Fri Jul 21 2006 Emmanuel Andry <eandry@mandriva.org> 2.5.5-1mdv2007.0
- new release
- use patches from sourceforge to use GTK2+
- drop patch 12 and 13 (applied upstream)
- diff patch to remove glib need
- leave glib and gtk+ buildrequires, compilation cannot find glib.h (remain to fix)

* Fri Dec 23 2005 Thierry Vignaud <tvignaud@mandriva.com> 2.5.4-1mdk
- new release
- drop patches 10, 11
- patch 12: fix a condition
- patch 13: allow creating degraded RAID-1 and RAID-5 regions

* Thu Nov 17 2005 Thierry Vignaud <tvignaud@mandriva.com> 2.5.3-2mdk
- add official patches

* Wed Nov 16 2005 Thierry Vignaud <tvignaud@mandriva.com> 2.5.3-1mdk
- new release
- kill patch 3, 6-9 (merged upstream)
- rediff patch 4
- rpmlint fixes

* Sat Mar 05 2005 Luca Berra <bluca@vodka.it> 2.5.1-6mdk 
- rebuild for new libdevmapper

* Wed Feb 23 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.5.1-5mdk
- fix buildrequires
- fix pam conf files for lib64
- really pack structs when requested

* Tue Feb 15 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.5.1-4mdk
- Michel Bouissou <michel@bouissou.net>:
- Added new snapshot.c and md patches
- Removed all previous md* patches as new md patch includes them
- Added new discover.c patch
- Added new md_main.c, evms_metadata_restore and md_info.c patches
- Added new md_super.c and evms_query.c patches
- Added new md_info.h.patch
- Added new md_discover.c.patch

* Fri Feb 11 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.5.1-3mdk
- fix directory ownership (#13548)

* Mon Jan 24 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.5.1-2mdk
- add evms_deactivate

* Mon Jan 24 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.5.1-1mdk
- new release

* Wed Jul 28 2004 svetljo<svetljo@gmx.de> 2.3.4-4mdk
- fix slow descovery of lvm1 regions over soft raid
  (upstream fix : lvm_compare_targets)

* Wed Jul 28 2004 svetljo<svetljo@gmx.de> 2.3.4-3mdk
- fix groups
- move evms.conf.sample to doc
- add doc for evmsgui & evmsn

* Wed Jul 28 2004 svetljo<svetljo@gmx.de> 2.3.4-2mdk
- fix menu entries

* Wed Jul 28 2004 svetljo<svetljo@gmx.de> 2.3.4-1mdk
- disable heartbeat plugin (have to figure out dependacies first)
- initial contrib