Switch package tarball to git

This commit is contained in:
Andrew Beekhof 2011-10-06 17:11:41 +11:00
parent a2b48868bd
commit 09f165899e
3 changed files with 136 additions and 94 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/Pacemaker-1.1.4.tar.bz2
/Pacemaker-1.1.5.tar.bz2
/Pacemaker-1.1.6.tar.bz2
/ClusterLabs-pacemaker-89678d4.tar.gz

View File

@ -2,9 +2,9 @@
%global uname hacluster
%global pcmk_docdir %{_docdir}/%{name}
%global specversion 2
%global upstream_version Pacemaker-1.1.6
%global upstream_prefix Pacemaker-1-1
%global specversion 1
%global upstream_version 89678d4
%global upstream_prefix ClusterLabs-pacemaker
# Compatibility macros for distros (fedora) that don't provide Python macros by default
# Do this instead of trying to conditionally include {_rpmconfigdir}/macros.python
@ -13,6 +13,17 @@
%{!?py_libdir: %{expand: %%global py_libdir %%{expand:%%%%{py_prefix}/%%%%{_lib}/python%%%%{py_ver}}}}
%{!?py_sitedir: %{expand: %%global py_sitedir %%{expand:%%%%{py_libdir}/site-packages}}}
# Compatibility macro wrappers for legacy RPM versions that do not
# support conditional builds
%{!?bcond_without: %{expand: %%global bcond_without() %%{expand:%%%%{!?_without_%%{1}:%%%%global with_%%{1} 1}}}}
%{!?bcond_with: %{expand: %%global bcond_with() %%{expand:%%%%{?_with_%%{1}:%%%%global with_%%{1} 1}}}}
%{!?with: %{expand: %%global with() %%{expand:%%%%{?with_%%{1}:1}%%%%{!?with_%%{1}:0}}}}
%{!?without: %{expand: %%global without() %%{expand:%%%%{?with_%%{1}:0}%%%%{!?with_%%{1}:1}}}}
# Conditionals
# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
# to disable or enable specific features
# Supported cluster stacks, must support at least one
%bcond_without cman
%bcond_without doc
@ -44,7 +55,7 @@
%endif
%if %{with pre_release}
%global pcmk_release 0.%{specversion}.%{upstream_version}.hg
%global pcmk_release 0.%{specversion}.%{upstream_version}.git
%else
%global pcmk_release %{specversion}
%endif
@ -56,7 +67,10 @@ Release: %{pcmk_release}%{?dist}
License: GPLv2+ and LGPLv2+
Url: http://www.clusterlabs.org
Group: System Environment/Daemons
Source0: http://hg.clusterlabs.org/pacemaker/1.1/archive/%{upstream_version}.tar.bz2
# export VER={upstream_version}
# wget --no-check-certificate -O ClusterLabs-pacemaker-${VER}.tar.gz https://github.com/ClusterLabs/pacemaker/tarball/${VER}
Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
AutoReqProv: on
Requires(pre): cluster-glue
@ -80,10 +94,6 @@ BuildRequires: pkgconfig python-devel gcc-c++ bzip2-devel gnutls-devel pam-devel
BuildRequires: ncurses-devel openssl-devel libselinux-devel docbook-style-xsl resource-agents
%ifarch alpha %{ix86} x86_64
BuildRequires: lm_sensors-devel
%endif
%if %{with cman}
BuildRequires: clusterlib-devel
%endif
@ -93,6 +103,10 @@ BuildRequires: libesmtp-devel
%endif
%if %{with snmp}
%ifarch alpha %{ix86} x86_64
BuildRequires: lm_sensors-devel
%endif
BuildRequires: net-snmp-devel
%endif
@ -174,6 +188,7 @@ License: GPLv2+ and LGPLv2+
Summary: Pacemaker development package
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-cluster-libs = %{version}-%{release}
Requires: cluster-glue-libs-devel libtool-ltdl-devel
Requires: libxml2-devel libxslt-devel bzip2-devel glib2-devel
%if %{with corosync}
@ -230,7 +245,8 @@ find . -exec touch \{\} \;
eval `objdump --headers --private-headers /usr/bin/perl | grep RPATH | awk '{print "export LD_LIBRARY_PATH="$2}'`
%endif
%{configure} \
# RHEL <= 5 does not support --docdir
docdir=%{pcmk_docdir} %{configure} \
%{!?with_heartbeat: --without-heartbeat} \
%{!?with_corosync: --without-ais} \
%{!?with_esmtp: --without-esmtp} \
@ -244,11 +260,11 @@ eval `objdump --headers --private-headers /usr/bin/perl | grep RPATH | awk '{pri
--with-version=%{version}-%{release} \
--enable-fatal-warnings=no
make %{_smp_mflags}
make %{_smp_mflags} docdir=%{pcmk_docdir}
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
make DESTDIR=%{buildroot} docdir=%{pcmk_docdir} install
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
install -m 644 mcp/pacemaker.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/pacemaker
@ -327,6 +343,10 @@ fi
%{_sbindir}/crm_node
%{_sbindir}/attrd_updater
%{_sbindir}/fence_legacy
%{_sbindir}/fence_pcmk
%{_bindir}/ccs2cib
%{_bindir}/ccs_flatten
%{_bindir}/disable_rgmanager
%{_sbindir}/stonith_admin
%if %{with heartbeat}
@ -335,6 +355,17 @@ fi
%exclude %{_sbindir}/crm_uuid
%endif
%if %{with doc}
%doc %{_mandir}/man7/*
%doc %{_mandir}/man8/attrd_updater.*
%doc %{_mandir}/man8/crm_attribute.*
%doc %{_mandir}/man8/crm_node.*
%doc %{_mandir}/man8/crm_master.*
%doc %{_mandir}/man8/fence_pcmk.*
%doc %{_mandir}/man8/pacemakerd.*
%doc %{_mandir}/man8/stonith_admin.*
%endif
%doc COPYING
%doc AUTHORS
%doc ChangeLog
@ -369,8 +400,14 @@ fi
%{_sbindir}/crm_ticket
%{py_sitedir}/crm
%if %{with doc}
%doc %{_mandir}/man7/*
%doc %{_mandir}/man8/*
%exclude %{_mandir}/man8/attrd_updater.*
%exclude %{_mandir}/man8/crm_attribute.*
%exclude %{_mandir}/man8/crm_node.*
%exclude %{_mandir}/man8/crm_master.*
%exclude %{_mandir}/man8/fence_pcmk.*
%exclude %{_mandir}/man8/pacemakerd.*
%exclude %{_mandir}/man8/stonith_admin.*
%endif
%doc COPYING
@ -420,6 +457,10 @@ fi
%doc AUTHORS
%changelog
* Mon Sep 26 2011 Andrew Beekhof <andrew@beekhof.net> 1.1.6-3
- New upstream tarball: 89678d4
- Move man pages to the correct subpackages
* Mon Sep 26 2011 Andrew Beekhof <andrew@beekhof.net> 1.1.6-2
- Do not build in support for heartbeat, snmp, esmtp by default
- Create a package for cluster unaware libraries to minimze our

View File

@ -1 +1 @@
70a3605231977c3df0f25439d0d5551e Pacemaker-1.1.6.tar.bz2
f3f5a66cc7c8f4a3104f66942c14b618 ClusterLabs-pacemaker-89678d4.tar.gz