spec-create: support source packages with a makefile but no configure script

This commit is contained in:
Davide Madrisan 2011-12-16 14:07:29 +01:00
parent 187f86e16e
commit f49b9a4893
2 changed files with 20 additions and 1 deletions

View File

@ -24,6 +24,11 @@ Changes in version 1.8.1
* templates/kde4 - Davide Madrisan: * templates/kde4 - Davide Madrisan:
Update template to better support KDE 4.7.x. Update template to better support KDE 4.7.x.
+ bugfix
* spec-create - Davide Madrisan:
Support source packages with a makefile but no configure script.
(Issue reported by Silvan Calarco)
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 1.8.0 Changes in version 1.8.0

View File

@ -46,6 +46,10 @@ spec_cmd_configure_cmake="%cmake -d build"
spec_cmd_make_cmake="%make" spec_cmd_make_cmake="%make"
spec_cmd_makeinstall_cmake="%makeinstall -C build" spec_cmd_makeinstall_cmake="%makeinstall -C build"
spec_cmd_configure_makefileonly=""
spec_cmd_make_makefileonly="%make"
spec_cmd_makeinstall_makefileonly="%makeinstall"
spec_cmd_configure_default="" spec_cmd_configure_default=""
spec_cmd_make_default="" spec_cmd_make_default=""
spec_cmd_makeinstall_default="" spec_cmd_makeinstall_default=""
@ -312,6 +316,11 @@ shared-libraries:,\
spec_cmd_make="$spec_cmd_make_autotools" spec_cmd_make="$spec_cmd_make_autotools"
spec_cmd_makeinstall="$spec_cmd_makeinstall_autotools" spec_cmd_makeinstall="$spec_cmd_makeinstall_autotools"
;; ;;
makefile)
spec_cmd_configure="$spec_cmd_configure_makefileonly"
spec_cmd_make="$spec_cmd_make_makefileonly"
spec_cmd_makeinstall="$spec_cmd_makeinstall_makefileonly"
;;
unknown) unknown)
notify.warning $"unknown build techonology" notify.warning $"unknown build techonology"
spec_cmd_configure="$spec_cmd_configure_default" spec_cmd_configure="$spec_cmd_configure_default"
@ -345,6 +354,10 @@ shared-libraries:,\
skipline=0 skipline=0
continue continue
;; ;;
@configure@)
[ "$spec_cmd_configure" ] && echo "$line" | \
sed "s,@configure@,$spec_cmd_configure,"
;;
*) [ "$skipline" = 1 ] || echo "$line" | sed "\ *) [ "$skipline" = 1 ] || echo "$line" | sed "\
s,@DISTRO@,${DISTRO:-?DISTRO?}, s,@DISTRO@,${DISTRO:-?DISTRO?},
s,@DISTRO_rpm@,${DISTRO_rpm:-?DISTRO_rpm?}, s,@DISTRO_rpm@,${DISTRO_rpm:-?DISTRO_rpm?},
@ -362,7 +375,6 @@ s,^\(%setup.*\),${spec_setup_macro},
/^[ \t]*License[ \t]*:[ \t]*\.\.\.$/{ /^[ \t]*License[ \t]*:[ \t]*\.\.\.$/{
s,\(^[ \t]*License[ \t]*:[ \t]*\).*,\1${spec_license},} s,\(^[ \t]*License[ \t]*:[ \t]*\).*,\1${spec_license},}
s,^\([ \t]*Source[ \t]*:[ \t]*\).*,\1${spec_source}, s,^\([ \t]*Source[ \t]*:[ \t]*\).*,\1${spec_source},
s,@configure@,$spec_cmd_configure,
s,@make@,$spec_cmd_make, s,@make@,$spec_cmd_make,
s,@makeinstall@,$spec_cmd_makeinstall, s,@makeinstall@,$spec_cmd_makeinstall,
s,@standard_docs@,${standard_docs:+%doc $standard_docs}, s,@standard_docs@,${standard_docs:+%doc $standard_docs},
@ -689,6 +701,8 @@ looks like a python module (use \`-t python' if this is true)" ;;
build_techology="cmake" build_techology="cmake"
elif [ -x $tmpdir/$pck_rootdir/configure ]; then elif [ -x $tmpdir/$pck_rootdir/configure ]; then
build_techology="autotools" build_techology="autotools"
elif [ -e $tmpdir/$pck_rootdir/Makefile ]; then
build_techology="makefile"
fi fi
;; ;;
esac esac