Page Menu
Home
ClusterLabs Projects
Search
Configure Global Search
Log In
Files
F7989053
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/Makefile.am b/Makefile.am
index 44e751c..cf172ce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,147 +1,153 @@
# Copyright (c) 2009 Red Hat, Inc.
#
# Authors: Andrew Beekhof
# Steven Dake (sdake@redhat.com)
#
# This software licensed under BSD license, the text of which follows:
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# - Neither the name of the MontaVista Software, Inc. nor the names of its
# contributors may be used to endorse or promote products derived from this
# software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
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
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure depcomp \
config.guess config.sub missing install-sh \
autoheader automake autoconf test_lense.sh
dist_doc_DATA = README COPYING
boothconfdir = ${BOOTHSYSCONFDIR}
boothconf_DATA = conf/booth.conf.example
boothsitedir = /usr/lib/ocf/resource.d/pacemaker
boothsite_SCRIPTS = script/ocf/booth-site
bootharbitratordir = ${INITDDIR}
bootharbitrator_SCRIPTS = script/lsb/booth-arbitrator
TESTS = test/runtests.py
SUBDIRS = src
coverity:
cov-build --dir=cov make
cov-analyze --dir cov --concurrency --wait-for-license
cov-format-errors --dir cov
install-exec-local:
$(INSTALL) -d $(DESTDIR)/${boothconfdir}
$(INSTALL) -d $(DESTDIR)/${bootharbitratordir}
$(INSTALL) -d $(DESTDIR)/${boothsitedir}
$(INSTALL) -d $(DESTDIR)/${SOCKETDIR}
install-exec-hook:
ln -sf ${sbindir}/boothd $(DESTDIR)/${sbindir}/booth
uninstall-local:
rmdir $(DESTDIR)/${boothconfdir} || :;
rmdir $(DESTDIR)/${bootharbitratordir} || :;
rmdir $(DESTDIR)/${boothsitedir} || :;
rmdir $(DESTDIR)/${SOCKETDIR} || :;
test: check
lint:
for dir in src; do make -C $$dir lint; done
dist-clean-local:
rm -f autoconf automake autoheader
+dist-hook:
+ echo $(VERSION) > $(distdir)/.tarball-version
+
+
## make rpm/srpm section.
$(SPEC): $(SPEC).in
rm -f $@-t $@
date="$(shell LC_ALL=C date "+%a %b %d %Y")" && \
if [ -f .tarball-version ]; then \
gitver="$(shell cat .tarball-version)" && \
rpmver=$$gitver && \
alphatag="" && \
dirty="" && \
numcomm="0"; \
else \
gitver="$(shell git describe --tags --abbrev=4 --match='v*' HEAD 2>/dev/null)" && \
rpmver=`echo $$gitver | sed -e "s/^v//" -e "s/-.*//g"` && \
alphatag=`echo $$gitver | sed -e "s/.*-//" -e "s/^g//"` && \
vtag=`echo $$gitver | sed -e "s/-.*//g"` && \
numcomm=`git rev-list $$vtag..HEAD | wc -l` && \
git update-index --refresh > /dev/null 2>&1 || true && \
dirty=`git diff-index --name-only HEAD 2>/dev/null`; \
fi && \
if [ -n "$$dirty" ]; then dirty="dirty"; else dirty=""; fi && \
if [ "$$numcomm" = "0" ]; then \
sed \
-e "s#@version@#$$rpmver#g" \
-e "s#%glo.*alpha.*##g" \
-e "s#%glo.*numcomm.*##g" \
-e "s#@dirty@#$$dirty#g" \
-e "s#@date@#$$date#g" \
$< > $@-t; \
else \
sed \
-e "s#@version@#$$rpmver#g" \
-e "s#@alphatag@#$$alphatag#g" \
-e "s#@numcomm@#$$numcomm#g" \
-e "s#@dirty@#$$dirty#g" \
-e "s#@date@#$$date#g" \
$< > $@-t; \
fi; \
if [ -z "$$dirty" ]; then sed -i -e "s#%glo.*dirty.*##g" $@-t; fi
chmod a-w $@-t
mv $@-t $@
$(TARFILE):
$(MAKE) dist
RPMBUILDOPTS = --define "_sourcedir $(abs_builddir)" \
--define "_specdir $(abs_builddir)" \
--define "_builddir $(abs_builddir)" \
--define "_srcrpmdir $(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)
diff --git a/booth.spec.in b/booth.spec.in
new file mode 100644
index 0000000..a7fb246
--- /dev/null
+++ b/booth.spec.in
@@ -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
+
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Oct 25, 2:12 AM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2619977
Default Alt Text
(6 KB)
Attached To
Mode
rB Booth
Attached
Detach File
Event Timeline
Log In to Comment