From 8df8dba5fed53c141fca6a34527660aade9b1640 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 3 Jan 2018 18:01:46 -0500 Subject: [PATCH] completed the auto versioning m4 macros --- citadel/configure.ac | 2 +- libcitadel/configure.in | 2 +- releaseversion.sh | 138 --------------------------- textclient/configure.ac | 2 +- textclient/src/include/citadel_ipc.h | 2 +- webcit/configure.ac | 3 +- 6 files changed, 5 insertions(+), 144 deletions(-) delete mode 100755 releaseversion.sh diff --git a/citadel/configure.ac b/citadel/configure.ac index 16ad72895..6e7280515 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.52) -AC_INIT([citadel],m4_esyscmd_s([grep REV_LEVEL citadel.h | sed 's/[^0-9]*//g'])) +AC_INIT([Citadel],m4_esyscmd_s([grep REV_LEVEL citadel.h | sed 's/[^0-9]*//g']),[http://uncensored.citadel.org]) AC_REVISION(m4_esyscmd_s([git log --pretty=%h | head -1]) AC_CONFIG_SRCDIR([citserver.c]) AC_CONFIG_HEADER(sysdep.h) diff --git a/libcitadel/configure.in b/libcitadel/configure.in index 178d5d183..2b2092b72 100755 --- a/libcitadel/configure.in +++ b/libcitadel/configure.in @@ -4,7 +4,7 @@ dnl dnl Ensure that libcitadel is configured with autoconf 2.52 or newer AC_PREREQ(2.52) -AC_INIT([libcitadel], m4_esyscmd_s([grep LIBCITADEL_VERSION lib/libcitadel.h | sed 's/[^0-9]*//g' ])) +AC_INIT([libcitadel], m4_esyscmd_s([grep LIBCITADEL_VERSION lib/libcitadel.h | sed 's/[^0-9]*//g' ]),[http://uncensored.citadel.org]) AC_CONFIG_SRCDIR(Makefile.in) AC_CONFIG_AUX_DIR(conftools) AC_CONFIG_SRCDIR(tests/Makefile.in) diff --git a/releaseversion.sh b/releaseversion.sh deleted file mode 100755 index 4dc6ad9b4..000000000 --- a/releaseversion.sh +++ /dev/null @@ -1,138 +0,0 @@ -#!/bin/bash - -if test "$1" = '?'; then - - echo 'no help for the lost.' - exit -fi - -if test "$1" = 'list'; then - echo "showing current release version state: " - echo "-------- libcitadel: --------" - grep AC_INIT libcitadel/configure.in - grep 'PACKAGE_VERSION=' libcitadel/configure - echo " - Header version:" - grep LIBCITADEL_VERSION_NUMBER libcitadel/lib/libcitadel.h - head -n 5 libcitadel/debian/changelog - - echo "-------- citserver: --------" - grep 'PACKAGE_VERSION=' citadel/configure - grep '#define REV_LEVEL' citadel/citadel.h - grep '#define REV_MIN' citadel/citadel.h - grep '#define EXPORT_REV_MIN' citadel/citadel.h - grep '#define LIBCITADEL_MIN' citadel/citadel.h - head -n 5 citadel/debian/changelog - - echo "-------- textclient: --------" - grep 'PACKAGE_VERSION=' textclient/configure - head -n 5 textclient/debian/changelog - - echo "-------- webcit: --------" - grep 'PACKAGE_VERSION=' webcit/configure - grep '#define CLIENT_VERSION' webcit/webcit.h - grep '#define MINIMUM_CIT_VERSION' webcit/webcit.h - grep '#define LIBCITADEL_MIN' webcit/webcit.h - head -n 5 webcit/debian/changelog - - exit -fi - -if test "$1" = "revert"; then - echo "reverting all changes for version files" - git checkout \ - libcitadel/lib/libcitadel.h \ - libcitadel/configure.in \ - libcitadel/debian/changelog \ - \ - citadel/citadel.h \ - citadel/configure.ac \ - citadel/debian/changelog \ - \ - textclient/configure.ac \ - textclient/debian/changelog \ - \ - webcit/webcit.h \ - webcit/configure.ac \ - webcit/debian/changelog - - exit -fi - - -NEW_VERSION=$1 - -if test -z "$NEW_VERSION" ; then - echo Need new version number - exit -fi - -export LANG=C -RELEASEDATE=`date -R` - - -function DebChangeLog() -{ - FILE=$1 - PROJECT=$2 - ( - printf "${PROJECT} (${NEW_VERSION}-1) stable; urgency=low\n\n * new release\n\n -- Wilfried Goesgens ${RELEASEDATE}\n\n" - cat ${FILE} - ) > /tmp/${PROJECT}_changelog - rm -f ${FILE} - mv /tmp/${PROJECT}_changelog ${FILE} -} - - -################################################################################ -# libcitadel - -DebChangeLog libcitadel/debian/changelog libcitadel - -sed -i -e \ - "s;^#define LIBCITADEL_VERSION_NUMBER.*[0-9][0-9][0-9]\(.*\)$;#define LIBCITADEL_VERSION_NUMBER\t${NEW_VERSION}\1;g" \ - libcitadel/lib/libcitadel.h - -OLD_VERSION=`grep AC_INIT libcitadel/configure.in |sed "s;.*\(....\), http.*;\1;"` -echo libcitadel OLD_VERSION is $OLD_VERSION - -sed -i -e "s;${OLD_VERSION};${NEW_VERSION};" \ - -e "s;^LIBREVISION=[0-9][0-9][0-9]\(.*\)$;LIBREVISION=${NEW_VERSION}\1;g" \ - libcitadel/configure.in - - - -################################################################################ -# citserver - -DebChangeLog citadel/debian/changelog citadel - -OLD_VERSION=`grep AC_INIT citadel/configure.ac |sed "s;.*\[\(....\)\],.*;\1;"` -echo citserver OLD_VERSION is $OLD_VERSION - -sed -i "s;${OLD_VERSION};${NEW_VERSION};" citadel/configure.ac - -sed -i -e "s;^#define REV_LEVEL.*[0-9][0-9][0-9]\(.*\)$;#define REV_LEVEL\t${NEW_VERSION}\1;g" \ - -e "s;^#define LIBCITADEL_MIN.*[0-9][0-9][0-9]\(.*\)$;#define LIBCITADEL_MIN\t${NEW_VERSION}\1;g" \ - citadel/citadel.h - -################################################################################ -# textclient - -DebChangeLog textclient/debian/changelog textclient - -sed -i "s;${OLD_VERSION};${NEW_VERSION};" textclient/configure.ac - - -################################################################################ -# webcit - -DebChangeLog webcit/debian/changelog webcit - -sed -i "s;${OLD_VERSION};${NEW_VERSION};" webcit/configure.ac - -sed -i -e "s;^#define CLIENT_VERSION.*[0-9][0-9][0-9]\(.*\)$;#define CLIENT_VERSION\t\t${NEW_VERSION}\1;g" \ - -e "s;^#define MINIMUM_CIT_VERSION.*[0-9][0-9][0-9]\(.*\)$;#define MINIMUM_CIT_VERSION\t${NEW_VERSION}\1;g" \ - -e "s;^#define LIBCITADEL_MIN.*[0-9][0-9][0-9]\(.*\)$;#define LIBCITADEL_MIN\t${NEW_VERSION}\1;g" \ - webcit/webcit.h - - diff --git a/textclient/configure.ac b/textclient/configure.ac index e9a28f501..18b7d941b 100644 --- a/textclient/configure.ac +++ b/textclient/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.52) -AC_INIT([Citadel], [915], [http://www.citadel.org/]) +AC_INIT([CitadelTextClient],m4_esyscmd_s([grep CLIENT_VERSION src/include/citadel_ipc.h | sed 's/[^0-9]*//g']),[http://uncensored.citadel.org]) AC_REVISION([$Revision: 5108 $]) AC_CONFIG_HEADER(sysdep.h) diff --git a/textclient/src/include/citadel_ipc.h b/textclient/src/include/citadel_ipc.h index 7448a663f..13150f993 100644 --- a/textclient/src/include/citadel_ipc.h +++ b/textclient/src/include/citadel_ipc.h @@ -18,7 +18,7 @@ #include #endif -#define CLIENT_VERSION 811 +#define CLIENT_VERSION 916 #define CLIENT_TYPE 0 //copycat of: /#include "server.h" diff --git a/webcit/configure.ac b/webcit/configure.ac index 90a4baa40..810aabea6 100644 --- a/webcit/configure.ac +++ b/webcit/configure.ac @@ -1,7 +1,6 @@ dnl Process this file with autoconf to produce a configure script. dnl $Id$ -AC_INIT([WebCit], [916], [http://www.citadel.org/]) - +AC_INIT([WebCit],m4_esyscmd_s([grep CLIENT_VERSION webcit.h | sed 's/[^0-9]*//g']),[http://uncensored.citadel.org]) AC_SUBST(PROG_SUBDIRS) AC_DEFINE(PROG_SUBDIRS, [], [Program dirs]) -- 2.30.2