Changeset 1775 for trunk


Ignore:
Timestamp:
29/11/11 10:27:33 (6 months ago)
Author:
Freddie Akeroyd
Message:

Add m4 macros to pick up svn version automatically and set release information in generated distribution and RPM
Refs #307

Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.am

    r1752 r1775  
    5555 `find "$(srcdir)" -type f -name Makefile.in -print` 
    5656 
     57ChangeLog : 
     58        svn2cl --non-interactive --authors=svn2cl_nexus_authors.xml . 
     59 
    5760maintainer-clean-local: 
    5861        -rm -rf config 
  • trunk/build_rpm.in

    r1764 r1775  
    1111topdir=`rpm --showrc|grep topdir| awk '{print $3}' | tail -1` 
    1212if test ! -e "$topdir"; then 
    13     echo "Unable to determine RPM topdir from rpmrc; assuming /usr/src/redhat" 
    14     topdir="/usr/src/redhat" 
     13    echo "Unable to determine RPM topdir from rpmrc; assuming $HOME/rpmbuild" 
     14    topdir="$HOME/rpmbuild" 
    1515fi 
    1616if test ! -w "$topdir"; then 
  • trunk/configure.ac

    r1770 r1775  
    3131AC_PREREQ(2.61) 
    3232AC_REVISION($Revision$) 
    33 AC_INIT([NeXus Library], [4.3.0], [nexus-developers@nexusformat.org], [nexus]) 
     33 
     34m4_define([ISODATE],m4_esyscmd_s([date +%Y%m%d]))dnl 
     35dnl m4_define([SVNREV],m4_esyscmd_s([`svnversion`])) 
     36m4_define([SVNREV],m4_esyscmd_s([svn info | grep Revision | awk '{print $2}']))dnl 
     37m4_define([SVN_RELEASE],m4_join([],ISODATE,[svn],SVNREV)))dnl 
     38 
     39m4_define([NEXUS_VERSION],[4.3.0])dnl main version we are based on 
     40m4_define([NEXUS_RELEASE],SVN_RELEASE)dnl things like  rc1   or  20100903svn1734 
     41m4_define([PACKAGE_RELEASE],[0.1])dnl 0.* for pre release; 1, 2, ... post release 
     42 
     43AC_INIT([NeXus Library], m4_join([],NEXUS_VERSION,[-],NEXUS_RELEASE), [nexus-developers@nexusformat.org], [nexus]) 
    3444AC_COPYRIGHT([Copyright (C) 2004 NeXus International Advisory Committee 
    3545This software is covered by the GNU LESSER GENERAL PUBLIC LICENSE 
    3646see file COPYING for further information]) 
     47 
     48m4_join([],[NEXUS_VERSION=],"NEXUS_VERSION") 
     49m4_join([],[NEXUS_RELEASE=],"NEXUS_RELEASE") 
     50m4_join([],[SVN_REVISION=],"SVN_REVISION") 
     51m4_join([],[PACKAGE_RELEASE=],"PACKAGE_RELEASE") 
     52AC_SUBST([NEXUS_VERSION]) 
     53AC_SUBST([NEXUS_RELEASE]) 
     54AC_SUBST([SVN_REVISION]) 
     55AC_SUBST([PACKAGE_RELEASE]) 
     56AC_DEFINE([[NEXUS_VERSION]], "NEXUS_VERSION", [NeXus Version])dnl 
     57AC_DEFINE([[NEXUS_RELEASE]], "NEXUS_RELEASE", [NeXus Release])dnl 
     58AC_DEFINE([[PACKAGE_RELEASE]], "PACKAGE_RELEASE", [Package Release])dnl 
     59AC_DEFINE([[SVN_REVISION]], "SVNREV", [SVN Revision])dnl 
     60 
    3761 
    3862# used by libtool - need to get if from 4.3.0 better 
     
    222246AC_SUBST(SHARED_LDFLAGS) 
    223247AC_SUBST(JAVAINCLUDE) 
    224 AC_SUBST(PACKAGE_RELEASE) 
    225 test -z "$PACKAGE_RELEASE" && PACKAGE_RELEASE=1 
    226248 
    227249SHARED_LDFLAGS="" 
  • trunk/nexus_spec.in

    r1764 r1775  
    66Summary: Libraries and utilities for using NeXus format data files 
    77Name: @PACKAGE_TARNAME@ 
    8 Version: @PACKAGE_VERSION@ 
     8Version: @NEXUS_VERSION@ 
    99# Release is the number of times this version of the software was  
    1010# built into an RPM file; it should be incremented each RPM build and 
    1111# then reset to 1 when a new version of the software is released 
    12 Release: @PACKAGE_RELEASE@ 
     12Release: @PACKAGE_RELEASE@.@NEXUS_RELEASE@%{?dist} 
    1313License: LGPL 
    1414# Group: there is more than one choice for this - maybe we need to split 
     
    8383 
    8484%prep 
    85 %setup -q 
     85%setup -q -n @PACKAGE_TARNAME@-@PACKAGE_VERSION@ 
    8686 
    8787%build 
Note: See TracChangeset for help on using the changeset viewer.