From: Brian Aker Date: Sun, 9 Feb 2014 07:28:22 +0000 (-0800) Subject: RPM update. X-Git-Tag: 1.0.18^2^2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=2004cb431a9b1c85e40d67cdb743aae2b7d9b23c;p=m6w6%2Flibmemcached RPM update. --- diff --git a/.bzrignore b/.bzrignore index 652e9d91..a140236c 100644 --- a/.bzrignore +++ b/.bzrignore @@ -32,6 +32,7 @@ Makefile.in TAGS aclocal.m4 aminclude.am +artifacts autom4te.cache autoscan.log build-aux/ diff --git a/GNUmakefile b/GNUmakefile index 33ec5acc..b105d013 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,4 +1,4 @@ -# -*-Makefile-*- +# vim:ft=make # _bootstrap_Makefile := $(wildcard [M]akefile) _bootstrap_config-status := $(wildcard config.status) diff --git a/Makefile.am b/Makefile.am index 7432e682..d0010310 100644 --- a/Makefile.am +++ b/Makefile.am @@ -104,7 +104,7 @@ merge-clean: @echo "Files that need to be either removed or checked in:" @bzr unknowns -clean-local: clean-libtest-check clean-docs-check +clean-local: clean-libtest-check clean-docs-check clean-rpm lcov: lcov-clean check @@ -126,8 +126,6 @@ DISTCLEANFILES+= config/top.h maintainer-clean-local: find . -type f -name '*~' -exec rm -f '{}' \; - -rm -f @PACKAGE@-*.rpm - -rm -f @PACKAGE@-*.tar.gz -rm -f man/*.1 -rm -f man/*.3 -rm -f man/*.8 @@ -141,6 +139,7 @@ maintainer-clean-local: -rm -f build-aux/install-sh -rm -f build-aux/ltmain.sh -rm -f build-aux/missing + -rm -f build-aux/test-driver -rm -f build-aux/ylwrap -rm -f mem_config.in -rm -f config.log @@ -154,4 +153,4 @@ maintainer-clean-local: -rm -f m4/test-driver -rmdir build-aux -rm -rf ${top_builddir}/html - -rm -f bootstrap + -rm -f $(DIST_ARCHIVES) diff --git a/bootstrap.sh b/bootstrap.sh index 5a7cb779..6f6821b7 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1014,7 +1014,10 @@ make_rpm () mkdir -p ~/rpmbuild/RPMS/{i386,i486,i586,i686,noarch,athlon} run_configure_if_required - make_target 'rpm' + make_target 'dist-rpm' + + mkdir artifacts + cp *gz *rpm artifacts if $jenkins_build_environment; then make_target 'clean' diff --git a/configure.ac b/configure.ac index e74ebb7b..17b7351e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,3 +1,5 @@ +# configure.ac -*- autoconf -*- vim: filetype=config +# # LibmemcacheD # Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/ # Copyright (C) 2006-2010 Brian Aker, Monty Taylor, Trond Norbye @@ -7,6 +9,7 @@ # the COPYING file in this directory for full text. m4_include([version.m4]) + AC_PREREQ([2.61]) AC_INIT([libmemcached],VERSION_NUMBER,[http://libmemcached.org/]) @@ -47,6 +50,7 @@ AC_SUBST([MEMCACHED_LIBRARY_VERSION]) AX_HEX_VERSION([LIBMEMCACHED],[$VERSION]) AX_HEX_VERSION([LIBHASHKIT],[1.0.0]) +AC_SUBST([RPM_RELEASE],[1]) m4_include([libhashkit/include.m4]) @@ -120,6 +124,9 @@ AC_CHECK_PROGS([PERL],[perl]) AC_CHECK_PROGS([VALGRIND],['valgrind']) AC_CHECK_PROGS([WINE],['wine']) AC_CHECK_PROGS([YACC],['bison --warnings=all'],[:]) +AC_CHECK_PROGS([RPMBUILD],[rpmbuild --nocheck]) +AC_CHECK_PROGS([RPMDEV_SETUPTREE],[rpmdev-setuptree]) +AC_CHECK_PROGS([RPM],[rpm]) AC_PROG_AWK AC_PROG_MKDIR_P AC_PROG_SED diff --git a/rpm/include.am b/rpm/include.am index 20967ab6..313a67c7 100644 --- a/rpm/include.am +++ b/rpm/include.am @@ -1,42 +1,53 @@ # vim:ft=automake +# -.PHONY: rpm-build -rpm-build: support/$(PACKAGE).spec distcheck - @rm -f *.rpm - @rm -f ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm - @rm -f ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm - @mkdir -p ~/rpmbuild/BUILD/ - @mkdir -p ~/rpmbuild/RPMS/i386/ - @mkdir -p ~/rpmbuild/RPMS/i686/ - @mkdir -p ~/rpmbuild/RPMS/noarch/ - @mkdir -p ~/rpmbuild/RPMS/x86_64/ - @mkdir -p ~/rpmbuild/SOURCES/ - @mkdir -p ~/rpmbuild/SPECS/ - @mkdir -p ~/rpmbuild/SRPMS/ - @cp $(PACKAGE)-$(VERSION).tar.gz ~/rpmbuild/SOURCES/ - @rpmbuild -ba support/$(PACKAGE).spec - @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm . - @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-devel-$(VERSION)*.rpm . - -cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-debuginfo-$(VERSION)*.rpm . - @cp ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm . +RPM_BUILDDIR= ~/rpmbuild + +RPM_BUILD_TARGET= @PACKAGE@-@VERSION@-@RPM_RELEASE@.@build_cpu@.rpm +RPM_SOURCE= $(RPM_BUILDDIR)/SOURCES/$(DIST_ARCHIVES) + +RPMS= +RPMS+= $(RPM_BUILD_TARGET) +RPMS+= @PACKAGE@-devel-@VERSION@-@RPM_RELEASE@.@build_cpu@.rpm +RPMS+= @PACKAGE@-debuginfo-@VERSION@-@RPM_RELEASE@.@build_cpu@.rpm + +SRPMS= @PACKAGE@-@VERSION@-@RPM_RELEASE@.src.rpm + +RPM_DIST= $(RPMS) $(SRPMS) + +BUILD_RPMS= $(foreach rpm_iterator,$(RPMS),$(addprefix $(RPM_BUILDDIR)/RPMS/@build_cpu@/, $(rpm_iterator))) +BUILD_SRPMS= $(foreach srpm_iterator,$(SRPMS),$(addprefix $(RPM_BUILDDIR)/SRPMS/, $(srpm_iterator))) +BUILD_RPM_DIR= $(RPM_BUILDDIR)/BUILD/@PACKAGE@-@VERSION@ + +$(RPM_BUILDDIR): + @@RPMDEV_SETUPTREE@ + +$(DIST_ARCHIVES): $(DISTFILES) + $(MAKE) $(AM_MAKEFLAGS) dist-gzip + +$(RPM_SOURCE): | $(RPM_BUILDDIR) $(DIST_ARCHIVES) + @rm -f $(BUILD_RPMS) $(BUILD_SRPMS) $(BUILD_RPM_DIR) + @cp $(DIST_ARCHIVES) $(RPM_SOURCE) + +$(RPM_BUILD_TARGET): $(RPM_SOURCE) support/@PACKAGE@.spec + @@RPMBUILD@ -ba $(top_srcdir)/support/@PACKAGE@.spec + @cp $(BUILD_RPMS) $(BUILD_SRPMS) . .PHONY: rpm-sign -rpm-sign: rpm-build - @rpm --addsign *.rpm - @rpm --checksig *.rpm +rpm-sign: $(RPM_BUILD_TARGET) + @@RPM@ --addsign $(RPM_DIST) + @@RPM@ --checksig $(RPM_DIST) .PHONY: clean-rpm clean-rpm: - @rm -f *.tar.gz - @rm -f *.src.rpm - @rm -f *.rpm + @rm -f $(BUILD_RPMS) $(BUILD_SRPMS) $(BUILD_RPM_SOURCE) $(BUILD_RPM_DIR) $(RPM_DIST) -.PHONY: rpm -rpm: clean-rpm support/$(PACKAGE).spec rpm-build +rpm: $(RPM_BUILD_TARGET) +dist-rpm: $(RPM_BUILD_TARGET) .PHONY: release release: rpm rpm-sign .PHONY: auto-rpmbuild -auto-rpmbuild: - @auto-br-rpmbuild -ba support/libmemcached.spec +auto-rpmbuild: support/@PACKAGE@.spec + @auto-br-rpmbuild -ba $(top_srcdir)/support/@PACKAGE@.spec diff --git a/support/libmemcached.spec.in b/support/libmemcached.spec.in index 6f0ebd8d..a89e58d8 100644 --- a/support/libmemcached.spec.in +++ b/support/libmemcached.spec.in @@ -1,7 +1,7 @@ Name: libmemcached Summary: memcached C library and command line tools Version: @VERSION@ -Release: 1 +Release: @RPM_RELEASE@ License: BSD Group: System Environment/Libraries URL: http://launchpad.net/libmemcached