Blame SOURCES/1000-Add-autogen.sh.patch

06486d
From 608a4c07f4e3a0410f4cf9d5463ac5156bdc2745 Mon Sep 17 00:00:00 2001
06486d
From: Martin Kutlak <mkutlak@redhat.com>
06486d
Date: Thu, 3 Jan 2019 13:08:22 +0100
06486d
Subject: [PATCH] Add autogen.sh
06486d
06486d
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
06486d
---
06486d
 autogen.sh | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
06486d
 1 file changed, 70 insertions(+)
06486d
 create mode 100755 autogen.sh
06486d
06486d
diff --git a/autogen.sh b/autogen.sh
06486d
new file mode 100755
06486d
index 000000000..80a431b1f
06486d
--- /dev/null
06486d
+++ b/autogen.sh
06486d
@@ -0,0 +1,70 @@
06486d
+#!/bin/sh
06486d
+
06486d
+print_help()
06486d
+{
06486d
+cat << EOH
06486d
+Prepares the source tree for configuration
06486d
+
06486d
+Usage:
06486d
+  autogen.sh [sydeps [--install]]
06486d
+
06486d
+Options:
06486d
+
06486d
+  sysdeps          prints out all dependencies
06486d
+    --install      install all dependencies ('sudo yum install \$DEPS')
06486d
+
06486d
+EOH
06486d
+}
06486d
+
06486d
+build_depslist()
06486d
+{
06486d
+    DEPS_LIST=`grep "^\(Build\)\?Requires:" *.spec.in | grep -v "%{name}" | tr -s " " | tr "," "\n" | cut -f2 -d " " | grep -v "^abrt" | sort -u | while read br; do if [ "%" = ${br:0:1} ]; then grep "%define $(echo $br | sed -e 's/%{\(.*\)}/\1/')" *.spec.in | tr -s " " | cut -f4 -d" "; else echo $br ;fi ; done | tr "\n" " "`
06486d
+}
06486d
+
06486d
+case "$1" in
06486d
+    "--help"|"-h")
06486d
+            print_help
06486d
+            exit 0
06486d
+        ;;
06486d
+    "sysdeps")
06486d
+            build_depslist
06486d
+
06486d
+            if [ "$2" == "--install" ]; then
06486d
+                set -x verbose
06486d
+                sudo yum install $DEPS_LIST
06486d
+                set +x verbose
06486d
+            else
06486d
+                echo $DEPS_LIST
06486d
+            fi
06486d
+            exit 0
06486d
+        ;;
06486d
+    *)
06486d
+            echo "Running gen-version"
06486d
+            ./gen-version
06486d
+
06486d
+            mkdir -p m4
06486d
+            echo "Creating m4/aclocal.m4 ..."
06486d
+            test -r m4/aclocal.m4 || touch m4/aclocal.m4
06486d
+
06486d
+            echo "Running autopoint"
06486d
+            autopoint --force || exit 1
06486d
+
06486d
+            echo "Running intltoolize..."
06486d
+            intltoolize --force --copy --automake || exit 1
06486d
+
06486d
+            echo "Running aclocal..."
06486d
+            aclocal || exit 1
06486d
+
06486d
+            echo "Running libtoolize..."
06486d
+            libtoolize || exit 1
06486d
+
06486d
+            echo "Running autoheader..."
06486d
+            autoheader || return 1
06486d
+
06486d
+            echo "Running autoconf..."
06486d
+            autoconf --force || exit 1
06486d
+
06486d
+            echo "Running automake..."
06486d
+            automake --add-missing --force --copy || exit 1
06486d
+        ;;
06486d
+esac
06486d
-- 
06486d
2.17.2
06486d