summaryrefslogtreecommitdiff
path: root/m4/macros/split-package-version.m4
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2013-11-01 13:32:07 +0100
committerYves-Alexis Perez <corsac@debian.org>2013-11-01 13:32:07 +0100
commit5313d2d78ca150515f7f5eb39801c100690b6b29 (patch)
treec78e420367283bb1b16f14210b12687cdfbd26eb /m4/macros/split-package-version.m4
parent6b99c8d9cff7b3e8ae8f3204b99e7ea40f791349 (diff)
downloadvyos-strongswan-5313d2d78ca150515f7f5eb39801c100690b6b29.tar.gz
vyos-strongswan-5313d2d78ca150515f7f5eb39801c100690b6b29.zip
Imported Upstream version 5.1.1
Diffstat (limited to 'm4/macros/split-package-version.m4')
-rw-r--r--m4/macros/split-package-version.m417
1 files changed, 17 insertions, 0 deletions
diff --git a/m4/macros/split-package-version.m4 b/m4/macros/split-package-version.m4
new file mode 100644
index 000000000..8f7941d00
--- /dev/null
+++ b/m4/macros/split-package-version.m4
@@ -0,0 +1,17 @@
+# SPLIT_PACKAGE_VERSION
+# ---------------------------
+# Split package version in four parts
+AC_DEFUN([SPLIT_PACKAGE_VERSION],
+ [
+ AC_REQUIRE([AC_PROG_SED])
+ PACKAGE_VERSION_MAJOR=`echo "$PACKAGE_VERSION" | $SED 's/\([[0-9]]\+\).*/\1/'`
+ PACKAGE_VERSION_MINOR=`echo "$PACKAGE_VERSION" | $SED 's/[[0-9]]\+\.\([[0-9]]\+\).*/\1/'`
+ PACKAGE_VERSION_BUILD=`echo "$PACKAGE_VERSION" | $SED 's/[[0-9]]\+\.[[0-9]]\+\.\([[0-9]]\+\).*/\1/'`
+ PACKAGE_VERSION_REVIEW=`echo "$PACKAGE_VERSION" | $SED 's/[[0-9]]\+\.[[0-9]]\+\.[[0-9]]\+\(.*\)/\1/'`
+ AC_SUBST([PACKAGE_VERSION_MAJOR])
+ AC_SUBST([PACKAGE_VERSION_MINOR])
+ AC_SUBST([PACKAGE_VERSION_BUILD])
+ AC_SUBST([PACKAGE_VERSION_REVIEW])
+ ]
+)
+