Commit e90fa6be1f08f7c330de6f933a9c52082bc10fb1
1 parent
2a8f346f
Exists in
master
and in
2 other branches
Updating cross-compiler install script.
Showing
1 changed file
with
32 additions
and
31 deletions
Show diff stats
win/install-cross.sh
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | +myDIR=$(dirname $(readlink -f ${0})) | ||
| 3 | + | ||
| 4 | +echo $myDIR | ||
| 2 | 5 | ||
| 3 | install_packages() { | 6 | install_packages() { |
| 4 | 7 | ||
| 5 | -TEMPFILE=$(mktemp) | ||
| 6 | - | ||
| 7 | -cat > ${TEMPFILE} << EOF | ||
| 8 | -cross-binutils | ||
| 9 | -cross-gcc | ||
| 10 | -cross-gcc-c++ | ||
| 11 | -cross-pkg-config | ||
| 12 | -filesystem | ||
| 13 | -libopenssl | ||
| 14 | -libopenssl-devel | ||
| 15 | -libintl-devel | ||
| 16 | -win_iconv-devel | ||
| 17 | -zlib-devel | ||
| 18 | -winpthreads-devel | ||
| 19 | -cross-cpp | ||
| 20 | -gettext-tools | ||
| 21 | -headers | ||
| 22 | -EOF | ||
| 23 | - | ||
| 24 | -# Instala apicativos e temas necessários | ||
| 25 | -sudo zypper --non-interactive in \ | ||
| 26 | - gettext-tools \ | ||
| 27 | - automake | ||
| 28 | - | ||
| 29 | -while read FILE | ||
| 30 | -do | ||
| 31 | - sudo zypper --non-interactive in ${1}-${FILE} | ||
| 32 | -done < ${TEMPFILE} | 8 | + TEMPFILE=$(mktemp) |
| 9 | + | ||
| 10 | + for spec in $(find ${myDIR} -name "${1}*.spec") | ||
| 11 | + do | ||
| 12 | + echo "Parsing ${spec}" | ||
| 13 | + grep -i "^Requires:" "${spec}" | grep -v "%" | cut -d: -f2- | tr -d '[:blank:]' | cut -d'>' -f1 >> ${TEMPFILE} | ||
| 14 | + grep -i "^BuildRequires:" "${spec}" | grep -v "%" | cut -d: -f2- | tr -d '[:blank:]' | cut -d'>' -f1 >> ${TEMPFILE} | ||
| 15 | + done | ||
| 16 | + | ||
| 17 | + cat ${TEMPFILE} \ | ||
| 18 | + | sort --unique \ | ||
| 19 | + | xargs sudo zypper --non-interactive --verbose in | ||
| 33 | 20 | ||
| 34 | -rm -f ${TEMPFILE} | ||
| 35 | 21 | ||
| 36 | } | 22 | } |
| 37 | 23 | ||
| 24 | +## Instala apicativos e temas necessários | ||
| 25 | +#sudo zypper --non-interactive in \ | ||
| 26 | +# gettext-tools \ | ||
| 27 | +# automake | ||
| 28 | +# | ||
| 29 | +#while read FILE | ||
| 30 | +#do | ||
| 31 | +# sudo zypper --non-interactive in ${1}-${FILE} | ||
| 32 | +#done < ${TEMPFILE} | ||
| 33 | +# | ||
| 34 | +#rm -f ${TEMPFILE} | ||
| 35 | +# | ||
| 36 | +#} | ||
| 37 | +# | ||
| 38 | + | ||
| 38 | if [ -z ${1} ]; then | 39 | if [ -z ${1} ]; then |
| 39 | echo "Use ${0} --32 for 32 bits cross-compiler" | 40 | echo "Use ${0} --32 for 32 bits cross-compiler" |
| 40 | echo "Use ${0} --64 for 64 bits cross-compiler" | 41 | echo "Use ${0} --64 for 64 bits cross-compiler" |
| @@ -52,8 +53,8 @@ do | @@ -52,8 +53,8 @@ do | ||
| 52 | case $parameter in | 53 | case $parameter in |
| 53 | 54 | ||
| 54 | ar) | 55 | ar) |
| 55 | - zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_42.3/ mingw32 | ||
| 56 | - zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_42.3/ mingw64 | 56 | + sudo zypper ar obs://windows:mingw:win32 mingw32 |
| 57 | + sudo zypper ar obs://windows:mingw:win64 mingw64 | ||
| 57 | ;; | 58 | ;; |
| 58 | 59 | ||
| 59 | 32) | 60 | 32) |