Commit 4dc38b1466117c266ab4cff7d54d7c18dc30996d
1 parent
32e8c895
Exists in
develop
Updating ci-build, removing unused scripts.
Showing
4 changed files
with
8 additions
and
167 deletions
Show diff stats
.github/workflows/publish.yml
win/ci-build.sh
... | ... | @@ -7,6 +7,8 @@ |
7 | 7 | # |
8 | 8 | echo "Running ${0}" |
9 | 9 | |
10 | +TARGET_ARCH="x86_64" | |
11 | + | |
10 | 12 | LOGFILE=build.log |
11 | 13 | rm -f ${LOGFILE} |
12 | 14 | |
... | ... | @@ -23,27 +25,13 @@ cd ${myDIR} |
23 | 25 | rm -fr ${myDIR}/.build |
24 | 26 | |
25 | 27 | # |
26 | -# Build LIB3270 | |
28 | +# Unpack lib3270 | |
27 | 29 | # |
28 | -if [ -e mingw-lib3270.tar.xz ]; then | |
29 | - | |
30 | - echo "Unpacking lib3270" | |
31 | - tar -C / -Jxvf mingw-lib3270.tar.xz | |
32 | - | |
33 | -else | |
34 | - echo "Building lib3270" | |
35 | - git clone https://github.com/PerryWerneck/lib3270.git ./.build/lib3270 || die "clone lib3270 failure" | |
36 | - cd ./.build/lib3270 | |
37 | - ./autogen.sh || die "Lib3270 autogen failure" | |
38 | - ./configure || die "Lib3270 Configure failure" | |
39 | - make clean || die "Lib3270 Make clean failure" | |
40 | - make all || die "Lib3270 Make failure" | |
41 | - make install || die "Lib3270 Install failure" | |
42 | - cd ../.. | |
43 | -fi | |
30 | +echo "Unpacking lib3270" | |
31 | +tar -C / -Jxf mingw-lib3270.${TARGET_ARCH}.tar.xz > $LOGFILE 2>&1 || die "lib3270 unpack failure" | |
44 | 32 | |
45 | 33 | # |
46 | -# Build PW3270 | |
34 | +# Build libv3270 | |
47 | 35 | # |
48 | 36 | echo "Building libv3270" |
49 | 37 | cd ${myDIR} |
... | ... | @@ -53,7 +41,7 @@ make clean > $LOGFILE 2>&1 || die "Make clean failure" |
53 | 41 | make all > $LOGFILE 2>&1 || die "Make failure" |
54 | 42 | |
55 | 43 | make DESTDIR=.bin/package install || die "Install failure" |
56 | -tar --create --xz --file=mingw-libv3270.tar.xz --directory=.bin/package --verbose . || die "Tar failure" | |
44 | +tar --create --xz --file=mingw-libv3270.${TARGET_ARCH}.tar.xz --directory=.bin/package --verbose . || die "Tar failure" | |
57 | 45 | |
58 | 46 | |
59 | 47 | echo "Build complete" | ... | ... |
win/configure.sh
... | ... | @@ -1,70 +0,0 @@ |
1 | -#!/bin/bash | |
2 | -cd $(dirname $(dirname $(readlink -f ${0}))) | |
3 | - | |
4 | -aclocal | |
5 | -if test $? != 0 ; then | |
6 | - echo "aclocal failed." | |
7 | - exit -1 | |
8 | -fi | |
9 | - | |
10 | -autoconf | |
11 | -if test $? != 0 ; then | |
12 | - echo "autoconf failed." | |
13 | - exit -1 | |
14 | -fi | |
15 | - | |
16 | -mkdir -p scripts | |
17 | -automake --add-missing 2> /dev/null | true | |
18 | - | |
19 | -export HOST_CC=/usr/bin/gcc | |
20 | - | |
21 | -until [ -z "${1}" ] | |
22 | -do | |
23 | - if [ ${1:0:2} = '--' ]; then | |
24 | - tmp=${1:2} | |
25 | - parameter=${tmp%%=*} | |
26 | - parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") | |
27 | - | |
28 | - case $parameter in | |
29 | - | |
30 | - 32) | |
31 | - rm -f win32.cache | |
32 | - ./configure \ | |
33 | - --cache-file=win32.cache \ | |
34 | - --host=i686-w64-mingw32 \ | |
35 | - --prefix=/usr/i686-w64-mingw32/sys-root/mingw \ | |
36 | - --libdir=/usr/i686-w64-mingw32/sys-root/mingw/lib | |
37 | - | |
38 | - exit $? | |
39 | - ;; | |
40 | - | |
41 | - 64) | |
42 | - rm -f win64.cache | |
43 | - ./configure \ | |
44 | - --cache-file=win64.cache \ | |
45 | - --host=x86_64-w64-mingw32 \ | |
46 | - --prefix=/usr/x86_64-w64-mingw32/sys-root/mingw \ | |
47 | - --libdir=/usr/x86_64-w64-mingw32/sys-root/mingw/lib | |
48 | - exit $? | |
49 | - ;; | |
50 | - | |
51 | - ALL) | |
52 | - ;; | |
53 | - | |
54 | - | |
55 | - *) | |
56 | - value=${tmp##*=} | |
57 | - eval $parameter=$value | |
58 | - esac | |
59 | - | |
60 | - fi | |
61 | - | |
62 | - shift | |
63 | -done | |
64 | - | |
65 | -echo "Execute:" | |
66 | -echo " ${0} --32 for 32 bits windows." | |
67 | -echo " ${0} --64 for 64 bits windows." | |
68 | - | |
69 | -exit -1 | |
70 | - |
win/install-cross.sh
... | ... | @@ -1,77 +0,0 @@ |
1 | -#!/bin/bash | |
2 | -myDIR=$(dirname $(readlink -f ${0})) | |
3 | - | |
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 | |
18 | - | |
19 | - rm -f ${TEMPFILE} | |
20 | - | |
21 | -} | |
22 | - | |
23 | -if [ -z ${1} ]; then | |
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" | |
33 | - exit -1 | |
34 | -fi | |
35 | - | |
36 | - | |
37 | -until [ -z "${1}" ] | |
38 | -do | |
39 | - if [ ${1:0:2} = '--' ]; then | |
40 | - tmp=${1:2} | |
41 | - parameter=${tmp%%=*} | |
42 | - parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") | |
43 | - | |
44 | - case $parameter in | |
45 | - | |
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 | |
51 | - ;; | |
52 | - | |
53 | - 32) | |
54 | - install_packages mingw32 | |
55 | - ;; | |
56 | - | |
57 | - 64) | |
58 | - install_packages mingw64 | |
59 | - ;; | |
60 | - | |
61 | - ALL) | |
62 | - install_packages mingw32 | |
63 | - install_packages mingw64 | |
64 | - ;; | |
65 | - | |
66 | - | |
67 | - *) | |
68 | - value=${tmp##*=} | |
69 | - eval $parameter=$value | |
70 | - esac | |
71 | - | |
72 | - fi | |
73 | - | |
74 | - shift | |
75 | -done | |
76 | - | |
77 | - |