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

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