Commit d3ff9637bc4668998728b75f0d1668b86f40a9c9
1 parent
77c67dba
Exists in
master
and in
2 other branches
Updating cross-compiler install script.
Showing
1 changed file
with
30 additions
and
55 deletions
Show diff stats
win/install-cross.sh
1 | 1 | #!/bin/bash |
2 | +myDIR=$(dirname $(readlink -f ${0})) | |
2 | 3 | |
3 | -install_packages() | |
4 | -{ | |
5 | - | |
6 | -TEMPFILE=$(mktemp) | |
7 | - | |
8 | -cat > ${TEMPFILE} << EOF | |
9 | -libopenssl | |
10 | -libopenssl-devel | |
11 | -libintl-devel | |
12 | -libepoxy0 | |
13 | -libgdk_pixbuf-2_0-0 | |
14 | -atk-devel | |
15 | -pango-devel | |
16 | -win_iconv-devel | |
17 | -pixman-devel | |
18 | -glib2-devel | |
19 | -cairo-devel | |
20 | -freetype-devel | |
21 | -winpthreads-devel | |
22 | -gtk3-devel | |
23 | -cross-gcc-c++ | |
24 | -cross-pkg-config | |
25 | -cross-cpp | |
26 | -cross-binutils | |
27 | -cross-nsis | |
28 | -filesystem | |
29 | -gettext-tools | |
30 | -gtk3-data | |
31 | -gtk3-tools | |
32 | -headers | |
33 | -gnome-icon-theme | |
34 | -hicolor-icon-theme | |
35 | -gdk-pixbuf-loader-rsvg | |
36 | -gdk-pixbuf-query-loaders | |
37 | -EOF | |
38 | - | |
39 | -# Instala apicativos e temas necessários | |
40 | -sudo zypper --non-interactive in \ | |
41 | - adwaita-icon-theme \ | |
42 | - gettext-tools \ | |
43 | - glib2-devel \ | |
44 | - optipng \ | |
45 | - rsvg-view \ | |
46 | - ImageMagick | |
47 | - | |
48 | -while read FILE | |
49 | -do | |
50 | - sudo zypper --non-interactive in ${1}-${FILE} | |
51 | -done < ${TEMPFILE} | |
4 | +install_packages() { | |
5 | + | |
6 | + TEMPFILE=$(mktemp) | |
7 | + | |
8 | + for spec in $(find ${myDIR} -name "${1}*.spec") | |
9 | + do | |
10 | + echo "Parsing ${spec}" | |
11 | + grep -i "^Requires:" "${spec}" | grep -v "%" | cut -d: -f2- | tr -d '[:blank:]' | cut -d'>' -f1 >> ${TEMPFILE} | |
12 | + grep -i "^BuildRequires:" "${spec}" | grep -v "%" | cut -d: -f2- | tr -d '[:blank:]' | cut -d'>' -f1 >> ${TEMPFILE} | |
13 | + done | |
14 | + | |
15 | + cat ${TEMPFILE} \ | |
16 | + | sort --unique \ | |
17 | + | xargs sudo zypper --non-interactive --verbose in | |
52 | 18 | |
53 | -rm -f ${TEMPFILE} | |
19 | + rm -f ${TEMPFILE} | |
54 | 20 | |
55 | 21 | } |
56 | 22 | |
57 | 23 | if [ -z ${1} ]; then |
58 | - echo "Use ${0} --32 for 32 bits cross-compiler" | |
59 | - echo "Use ${0} --64 for 64 bits cross-compiler" | |
24 | + echo "${0} [options]" | |
25 | + echo "" | |
26 | + echo "Options:" | |
27 | + echo "" | |
28 | + | |
29 | + echo " --ar Install required OBS repositories for zypper" | |
30 | + echo " --32 Install cross compiler for 32 bits windows using zypper" | |
31 | + echo " --64 Install cross compiler for 64 bits windows using zypper" | |
32 | + echo " --all Install cross compiler for 32 and 64 bits windows using zypper" | |
60 | 33 | exit -1 |
61 | 34 | fi |
62 | 35 | |
... | ... | @@ -70,9 +43,11 @@ do |
70 | 43 | |
71 | 44 | case $parameter in |
72 | 45 | |
73 | - ar) | |
74 | - zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_42.3/ mingw32 | |
75 | - zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_42.3/ mingw64 | |
46 | + AR) | |
47 | + echo "Adding required repositories" | |
48 | + sudo zypper ar obs://windows:mingw:win32 windows_mingw_win32 | |
49 | + sudo zypper ar obs://windows:mingw:win64 windows_mingw_win64 | |
50 | + sudo zypper ar obs://home:PerryWerneck:pw3270 home_PerryWerneck_pw3270 | |
76 | 51 | ;; |
77 | 52 | |
78 | 53 | 32) | ... | ... |