Permalink
Browse files

spec: add booth.spec.in file

Add the booth.spec.in file to be able to build RPM package, it has been
tested on RedHat 6.2.

Signed-off-by: Yuich SEINO <seino.cluster2@gmail.com>
  • Loading branch information...
1 parent 3c3928b commit a55b182c9155f0f34108196ccf5e7a5c59d24d23 @seinocluster2 seinocluster2 committed with Jul 31, 2012
Showing with 72 additions and 1 deletion.
  1. +7 −1 Makefile.am
  2. +65 −0 booth.spec.in
View
@@ -33,7 +33,7 @@ SPEC = $(PACKAGE_NAME).spec
TARFILE = $(PACKAGE_NAME)-$(VERSION).tar.gz
-EXTRA_DIST = autogen.sh conf/booth.conf.example
+EXTRA_DIST = autogen.sh conf/booth.conf.example $(bootharbitrator_SCRIPTS) $(boothsite_SCRIPTS)
AUTOMAKE_OPTIONS = foreign
@@ -87,6 +87,10 @@ lint:
dist-clean-local:
rm -f autoconf automake autoheader
+dist-hook:
+ echo $(VERSION) > $(distdir)/.tarball-version
+
+
## make rpm/srpm section.
$(SPEC): $(SPEC).in
@@ -139,9 +143,11 @@ RPMBUILDOPTS = --define "_sourcedir $(abs_builddir)" \
--define "_rpmdir $(abs_builddir)"
srpm: clean
+ autoreconf -if
$(MAKE) $(SPEC) $(TARFILE)
rpmbuild $(RPMBUILDOPTS) --nodeps -bs $(SPEC)
rpm: clean
+ autoreconf -if
$(MAKE) $(SPEC) $(TARFILE)
rpmbuild $(RPMBUILDOPTS) -ba $(SPEC)
View
@@ -0,0 +1,65 @@
+%global alphatag @alphatag@
+%global numcomm @numcomm@
+%global dirty @dirty@
+
+Name: booth
+Version: @version@
+Release: 1%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
+Summary: The Booth Cluster Ticket Manager.
+
+Group: System Environment/Daemons
+License: GPLv2
+URL: http://www.clusterlabs.org
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Provides: booth
+
+Requires: pacemaker
+
+BuildRequires: autoconf automake libtool cluster-glue-libs-devel help2man
+
+%description
+Booth manages the ticket which authorizes one of the cluster sites located in
+geographically dispersed distances to run certain resources. It is designed to
+be an add-on of Pacemaker, which extends Pacemaker to support geographically
+distributed clustering.
+
+%prep
+%setup -q -n %{name}-%{version}
+
+%build
+./autogen.sh
+
+%configure --with-initddir=%{_initrddir}
+make all
+
+#except check
+#%check
+#make check
+
+%install
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%doc %{_docdir}/booth/README
+%doc %{_docdir}/booth/COPYING
+%{_sbindir}/booth
+%{_sbindir}/boothd
+%config %{_sysconfdir}/booth/booth.conf.example
+%{_mandir}/man8/booth.8.gz
+%{_mandir}/man8/boothd.8.gz
+%dir /usr/lib/ocf/resource.d/pacemaker/
+/usr/lib/ocf/resource.d/pacemaker/booth-site
+%{_initrddir}/booth-arbitrator
+
+
+
+%changelog
+* @date@ Autotools generated version <nobody@nowhere.org> - @version@-1-@numcomm@.@alphatag@.@dirty@
+- Autotools generated version
+

0 comments on commit a55b182

Please sign in to comment.