From 193c879083d998c31f2cca0e03e1865dae383cea Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Fri, 9 Nov 2018 10:17:22 -0200 Subject: [PATCH] Incluindo lib3270 como sub módulo. --- .gitignore | 1 + .gitmodules | 3 +++ autogen.sh | 47 +++++++++++------------------------------------ configure.ac | 3 ++- submodules/lib3270 | 1 + 5 files changed, 18 insertions(+), 37 deletions(-) create mode 100644 .gitmodules create mode 160000 submodules/lib3270 diff --git a/.gitignore b/.gitignore index d030b39..aaab80d 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ SPECS SRPMS resources.rc makeruntime.sh +scripts diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1212fcc --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "submodules/lib3270"] + path = submodules/lib3270 + url = http://softwarepublico.gov.br/gitlab/pw3270/lib3270.git diff --git a/autogen.sh b/autogen.sh index 60ae7b8..0129c6a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -5,7 +5,6 @@ APPLEVEL="0" test -n "$srcdir" || srcdir=`dirname "$0"` test -n "$srcdir" || srcdir=. -olddir=`pwd` cd "$srcdir" if test -e revision ; then @@ -14,43 +13,14 @@ fi touch ChangeLog -# Inicia com os defaults -TEMPFILE=autogen.tmp +# Obtém revisão via git +# Referência: http://stackoverflow.com/questions/4120001/what-is-the-git-equivalent-for-revision-number -if [ -d .svn ]; then +# Obtém URL via git +PACKAGE_SOURCE=$(git config --get remote.origin.url) - # Tenta detectar a versão - SVNVERSION=$(which svnversion 2> /dev/null) - if test -x "${SVNVERSION}" ; then - svnversion | cut -d: -f2 | sed 's@[M|m]@@g' > ${TEMPFILE} 2> /dev/null - if [ "$?" == "0" ]; then - PACKAGE_REVISION=$(cat ${TEMPFILE}) - fi - fi - - # Tenta detectar a URL - SVN=$(which svn 2> /dev/null) - if test -x "${SVN}" ; then - - LANG="EN_US" "${SVN}" info > ${TEMPFILE} 2>&1 - if [ "$?" == "0" ]; then - PACKAGE_SOURCE=$(cat ${TEMPFILE} | grep "^URL: " | cut -d" " -f2) - fi - - fi - -elif [ -d .git ]; then - - # Obtém revisão via git - # Referência: http://stackoverflow.com/questions/4120001/what-is-the-git-equivalent-for-revision-number - - # Obtém URL via git - PACKAGE_SOURCE=$(git config --get remote.origin.url) - - # Obtém número total de commits - PACKAGE_REVISION=$(git rev-list HEAD --count) - -fi +# Obtém número total de commits +PACKAGE_REVISION=$(git rev-list HEAD --count) if test -z $PACKAGE_REVISION ; then echo "Can´t detect package revision, using current date" @@ -70,6 +40,9 @@ echo "m4_define([SVN_REVISION], $PACKAGE_REVISION)" > $srcdir/revision.m4 echo "m4_define([SVN_URL], $PACKAGE_SOURCE)" >> $srcdir/revision.m4 echo "m4_define([APP_LEVEL], $APPLEVEL)" >> $srcdir/revision.m4 +mkdir -p scripts +automake --add-missing 2> /dev/null | true + aclocal if test $? != 0 ; then echo "aclocal failed." @@ -82,6 +55,8 @@ if test $? != 0 ; then exit -1 fi +NOCONFIGURE=1 ./submodules/lib3270/autogen.sh + echo "Package set to revision $PACKAGE_REVISION and source $PACKAGE_SOURCE" cd "$olddir" diff --git a/configure.ac b/configure.ac index 45bebfa..6aef540 100644 --- a/configure.ac +++ b/configure.ac @@ -34,10 +34,11 @@ AC_PREREQ(2.61) dnl Initialise automake with the package name, version and dnl bug-reporting address. -AC_INIT([pw3270], [5.1], [perry.werneck@gmail.com]) +AC_INIT([pw3270], [5.2], [perry.werneck@gmail.com]) dnl Place auxilliary scripts here. AC_CONFIG_AUX_DIR([scripts]) +AC_CONFIG_SUBDIRS([submodules/lib3270]) dnl Compute the canonical host-system type AC_CANONICAL_HOST diff --git a/submodules/lib3270 b/submodules/lib3270 new file mode 160000 index 0000000..4aa7a83 --- /dev/null +++ b/submodules/lib3270 @@ -0,0 +1 @@ +Subproject commit 4aa7a83f3e7228c43c71860321a515dbf13cb631 -- libgit2 0.21.2