Commit 64f11198104643d7cc8ec44dd24db6b4897faaa0
1 parent
697b8d86
Exists in
master
and in
1 other branch
Updating cross-compilers install.
Showing
1 changed file
with
29 additions
and
57 deletions
Show diff stats
win/install-cross.sh
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | +myDIR=$(dirname $(readlink -f ${0})) | ||
2 | 3 | ||
3 | install_packages() { | 4 | install_packages() { |
4 | 5 | ||
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 | -libepoxy0 | ||
23 | -libgdk_pixbuf-2_0-0 | ||
24 | -atk-devel | ||
25 | -pango-devel | ||
26 | -win_iconv-devel | ||
27 | -pixman-devel | ||
28 | -glib2-devel | ||
29 | -cairo-devel | ||
30 | -freetype-devel | ||
31 | -gtk3-devel | ||
32 | -filesystem | ||
33 | -gettext-tools | ||
34 | -gtk3-data | ||
35 | -gtk3-tools | ||
36 | -gnome-icon-theme | ||
37 | -hicolor-icon-theme | ||
38 | -gdk-pixbuf-loader-rsvg | ||
39 | -gdk-pixbuf-query-loaders | ||
40 | -lib3270-5_2-devel | ||
41 | -EOF | ||
42 | - | ||
43 | -# Instala apicativos e temas necessários | ||
44 | -sudo zypper --non-interactive in \ | ||
45 | - adwaita-icon-theme \ | ||
46 | - gettext-tools \ | ||
47 | - glib2-devel \ | ||
48 | - optipng \ | ||
49 | - ImageMagick | ||
50 | - | ||
51 | -while read FILE | ||
52 | -do | ||
53 | - sudo zypper --non-interactive in ${1}-${FILE} | ||
54 | -done < ${TEMPFILE} | ||
55 | - | ||
56 | -rm -f ${TEMPFILE} | 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 | ||
18 | + | ||
19 | + rm -f ${TEMPFILE} | ||
57 | 20 | ||
58 | } | 21 | } |
59 | 22 | ||
60 | if [ -z ${1} ]; then | 23 | if [ -z ${1} ]; then |
61 | - echo "Use ${0} --32 for 32 bits cross-compiler" | ||
62 | - 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" | ||
63 | exit -1 | 33 | exit -1 |
64 | fi | 34 | fi |
65 | 35 | ||
@@ -73,9 +43,11 @@ do | @@ -73,9 +43,11 @@ do | ||
73 | 43 | ||
74 | case $parameter in | 44 | case $parameter in |
75 | 45 | ||
76 | - ar) | ||
77 | - zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_42.3/ mingw32 | ||
78 | - 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 | ||
79 | ;; | 51 | ;; |
80 | 52 | ||
81 | 32) | 53 | 32) |