]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
New release numbering style support
authorHarlan Stenn <stenn@ntp.org>
Sun, 9 Apr 2006 09:00:52 +0000 (05:00 -0400)
committerHarlan Stenn <stenn@ntp.org>
Sun, 9 Apr 2006 09:00:52 +0000 (05:00 -0400)
bk: 4438cd44wQVBM_pqne8EBs4-8nn8kw

bootstrap [new file with mode: 0755]
packageinfo.sh [new file with mode: 0644]
scripts/VersionName [new file with mode: 0755]
version.m4 [deleted file]

diff --git a/bootstrap b/bootstrap
new file mode 100755 (executable)
index 0000000..d8d27dc
--- /dev/null
+++ b/bootstrap
@@ -0,0 +1,59 @@
+#! /bin/bash
+
+#  This "bootstrap" script performs various pre-autoreconf actions
+#  that are required after pulling fresh sources from the repository.
+#
+#  NOTE:  THE NTP VERSION NUMBER COMES FROM packageinfo.sh
+#
+#  all other instances of it anywhere in the source base have propagated
+#  from this one source.
+#
+#  To use the raw sources from the repository, you must have the following
+#  tools available to you:
+#
+#  1.  Autoconf and Automake.
+#
+#  2.  AutoGen.  The repository does *not* contain the files generated from
+#      the option definition files and it does not contain the libopts
+#      tear-off/redistributable library.
+#
+#  3.  gunzip.  The tear-off library is a gzipped tarball.
+#
+#  4.  lynx.  This is used to extract the COPYRIGHT file extracted from
+#      the html documentation.
+#
+#  5.  bash, ksh, zsh or any POSIX compliant shell to run this script.
+#
+
+set -e
+
+. packageinfo.sh
+
+dversion=`scripts/VersionName`
+
+#rm -rf sntp/libopts*
+#gunzip -c $(autoopts-config --libsrc) | (
+#  cd sntp
+#  tar -xvf -
+#  mv libopts-*.*.* libopts )
+
+#prog_opt_files=$(
+#    egrep -l '^prog.name' $(
+#        find * -type f -name *.def|fgrep -v /SCCS/))
+
+echo "m4_define([VERSION_NUMBER],[${dversion}])" > version.m4
+
+echo "version = '${dversion}';" > include/version.def
+
+incdir=${PWD}/include
+
+#for f in ${prog_opt_files}
+#do
+#  ( cd $(dirname ${f})
+#    echo "Running autogen on $f..."
+#    autogen -L${incdir} $(basename ${f}) )
+#done
+
+(cd sntp && autoreconf -i -v)
+
+autoreconf -i -v
diff --git a/packageinfo.sh b/packageinfo.sh
new file mode 100644 (file)
index 0000000..260a21d
--- /dev/null
@@ -0,0 +1,17 @@
+# version=Protocol.Major.Minor
+# odd minor numbers are for -dev, even minor numbers are for -stable
+proto=4
+major=2
+minor=1
+version=${proto}.${major}.${minor}
+# Point.  3 cases:
+# - Numeric values increment
+# - empty 'increments' to 1
+# - NEW (for example) 'increments' to empty
+point=1
+# Special.  Normally unused.  A suffix.
+#special=ag
+special=
+# ReleaseCandidate. 'yes' or 'no'.
+releasecandidate=yes
+#releasecandidate=no
diff --git a/scripts/VersionName b/scripts/VersionName
new file mode 100755 (executable)
index 0000000..961e374
--- /dev/null
@@ -0,0 +1,29 @@
+#! /bin/sh
+. packageinfo.sh
+
+NAME="$version"
+case $point in
+ [0-9]*)
+    NAME="${NAME}p$point"
+    ;;
+ '') ;;
+ *) echo "Unexpected value for 'point' <$point>!"
+    exit 1
+    ;;
+esac
+
+case $special in
+ '') ;;
+ *) NAME="${NAME}-$special" ;;
+esac
+
+case $releasecandidate in
+ [Nn][Oo]) ;;
+ [Yy][Ee][Ss]) NAME="${NAME}-RC" ;;
+ *) echo "Unexpected value for 'releasecandidate' <$releasecandidate>!"
+    exit 1
+    ;;
+esac
+
+echo "$NAME"
diff --git a/version.m4 b/version.m4
deleted file mode 100644 (file)
index dd17607..0000000
+++ /dev/null
@@ -1 +0,0 @@
-m4_define([VERSION_NUMBER],[4.2.0b-rc1])