On Thu, 2007-10-11 at 15:16 -0700, Bernard Li wrote:

> I am fine with this convention, but the issue is right now, the date
> is appended if snapshot is enabled in the configure.in file.  If you
> have patches that would make things work for both the tarball
> generation and the RPM spec file, I would be happy to review them.

See below.  I don't know if this is the best way to do it, but I think
it should work.  (I can't be 100% sure since I don't have a system at
the moment which has the necessary pre-reqs for building 3.1.0.)

The patches were generated against the svn trunk.  Also, these patches
will only work if you also apply your "spec clean-up" patch that you
posted to the mailing list.  Otherwise, the references to %
{_buildroot}/%{name}-%{version} will cause problems.

-- 
Rick Mohr
Systems Developer
Ohio Supercomputer Center



--- configure.in.orig   2007-10-12 13:02:09.000000000 -0400
+++ configure.in        2007-10-12 13:01:43.000000000 -0400
@@ -75,6 +75,9 @@
 AC_SUBST(GANGLIA_MICRO_VERSION)
 AC_SUBST(GANGLIA_VERSION)
 AC_SUBST(GANGLIA_RELEASE_NAME)
+AC_SUBST(GANGLIA_SNAPSHOT)
+AC_SUBST(GANGLIA_SNAPSHOT_DATE)
+

 AC_SUBST(LIBGANGLIA_INTERFACE_AGE)
 AC_SUBST(LIBGANGLIA_BINARY_AGE)

--- ganglia.spec.in.orig        2007-10-12 13:05:59.000000000 -0400
+++ ganglia.spec.in     2007-10-12 13:05:49.000000000 -0400
@@ -10,15 +10,25 @@
 #
 # % rpmbuild -ta --target noarch,i386 [EMAIL PROTECTED]@.tar.gz
 #
+
+%define src_version @VERSION@
+%define rpm_version @[EMAIL PROTECTED]@[EMAIL PROTECTED]@GANGLIA_MICRO_VERSION@
+
+%if %(test [EMAIL PROTECTED]@ = xyes && echo 1 || echo 0)
+%define rpm_release [EMAIL PROTECTED]@
+%else
+%define rpm_release 1
+%endif
+
 Summary: Ganglia Distributed Monitoring System
 Name: @PACKAGE@
-Version: @VERSION@
+Version: %{rpm_version}
 URL: http://ganglia.info/
-Release: 1
+Release: %{rpm_release}
 License: BSD
 Vendor: Ganglia Development Team <ganglia-developers@lists.sourceforge.net>
 Group: System Environment/Base
-Source: %{name}-%{version}.tar.gz
+Source: %{name}-%{src_version}.tar.gz
 Buildroot: /tmp/%{name}-%{version}-buildroot
 Prefix: /usr
 BuildRequires: libpng-devel, libart_lgpl-devel, gcc-c++, python-devel
@@ -102,7 +112,7 @@
 ##

 %prep
-%setup
+%setup -n %{name}-%{src_version}

 ##
 ## BUILD



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to