From 93f2d120e9d44722e74e980fd15b005ea9e1918b Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Mon, 18 Aug 2014 22:26:08 +0200 Subject: [PATCH] spec-create: add support for tarballs with autogen.sh and no configure Create a correct %build block in the specfile generated from tarballs that do not provide any 'configure' script but only an 'autogen,sh' one. Feature asked by Silvan Calarco. Signed-off-by: Davide Madrisan --- ChangeLog | 6 ++++++ NEWS | 5 +++++ plugins/spec-create.in | 11 +++++++++++ 3 files changed, 22 insertions(+) diff --git a/ChangeLog b/ChangeLog index abc3339..f666712 100644 --- a/ChangeLog +++ b/ChangeLog @@ -35,6 +35,12 @@ Fri Aug 15 2014 Madrisan The translation rules for Python 2.7 and Python 3 have been updated to reflect the current support for Python in openmamba. ++ improvement + * spec-create - Davide Madrisan + Create a correct %build block in the specfile generated from tarballs + that do not provide any 'configure' script but only an 'autogen,sh' one. + Feature asked by Silvan Calarco. + ------------------------------------------------------------------------------- Changes in version 1.16.4 - "Korbielow" release diff --git a/NEWS b/NEWS index f0f741a..70b5b77 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,11 @@ List of user visible changes in the release 1.16.5 Specify target_cpu when installing build requirements for x86_64 multiarch support. + * spec-create - Davide Madrisan + Create a correct %build block in the specfile generated from tarballs + that do not provide any 'configure' script but only an 'autogen,sh' one. + Feature asked by Silvan Calarco. + -- Bugfix * templates/python - Silvan Calarco diff --git a/plugins/spec-create.in b/plugins/spec-create.in index 818cfe7..b6ead50 100644 --- a/plugins/spec-create.in +++ b/plugins/spec-create.in @@ -40,6 +40,10 @@ spec_cmd_configure_autotools="%configure" spec_cmd_make_autotools="%make" spec_cmd_makeinstall_autotools="%makeinstall" +spec_cmd_configure_autogen="./autogen.sh\n%configure" +spec_cmd_make_autogen="%make" +spec_cmd_makeinstall_autogen="%makeinstall" + spec_cmd_configure_cmake="%cmake -d build" spec_cmd_make_cmake="%make" spec_cmd_makeinstall_cmake="%makeinstall -C build" @@ -392,6 +396,11 @@ shared-libraries:,debug-package:,\ spec_cmd_make="$spec_cmd_make_autotools" spec_cmd_makeinstall="$spec_cmd_makeinstall_autotools" ;; + autogen) + spec_cmd_configure="$spec_cmd_configure_autogen" + spec_cmd_make="$spec_cmd_make_autogen" + spec_cmd_makeinstall="$spec_cmd_makeinstall_autogen" + ;; makefile) spec_cmd_configure="$spec_cmd_configure_makefileonly" spec_cmd_make="$spec_cmd_make_makefileonly" @@ -869,6 +878,8 @@ ${standard_docs_devel:+$standard_docs_devel }$currdoc" -e $tmpdir/$pck_rootdir/makefile -o \ -e $tmpdir/$pck_rootdir/GNUmakefile ]; then build_techology="makefile" + elif [ -x $tmpdir/$pck_rootdir/autogen.sh ]; then + build_techology="autogen" elif [ -e $tmpdir/$pck_rootdir/SConstruct -o \ -e $tmpdir/$pck_rootdir/Sconstruct -o \ -e $tmpdir/$pck_rootdir/sconstruct ]; then