Commit db087a39172a82776124e6e0efdcad8475f5100e
1 parent
a75d4e5f
Exists in
develop
Using mingw package instead of .tar.xz
Showing
3 changed files
with
94 additions
and
32 deletions
Show diff stats
.github/workflows/msys2.yml
@@ -6,7 +6,6 @@ on: | @@ -6,7 +6,6 @@ on: | ||
6 | push: | 6 | push: |
7 | branches: | 7 | branches: |
8 | - develop | 8 | - develop |
9 | - | ||
10 | jobs: | 9 | jobs: |
11 | msys2-mingw: | 10 | msys2-mingw: |
12 | name: Publish Windows 64 | 11 | name: Publish Windows 64 |
@@ -19,25 +18,24 @@ jobs: | @@ -19,25 +18,24 @@ jobs: | ||
19 | - uses: oprypin/find-latest-tag@v1 | 18 | - uses: oprypin/find-latest-tag@v1 |
20 | id: gettag | 19 | id: gettag |
21 | with: | 20 | with: |
22 | - repository: PerryWerneck/libv3270 | 21 | + repository: PerryWerneck/pw3270 |
23 | releases-only: true | 22 | releases-only: true |
24 | - uses: msys2/setup-msys2@v2 | 23 | - uses: msys2/setup-msys2@v2 |
25 | with: | 24 | with: |
26 | msystem: mingw64 | 25 | msystem: mingw64 |
27 | update: true | 26 | update: true |
28 | - install: xz mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool mingw-w64-x86_64-gtk3 mingw-w64-x86_64-imagemagick mingw-w64-x86_64-optipng mingw-w64-x86_64-inkscape | 27 | + install: dos2unix mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool mingw-w64-x86_64-gtk3 mingw-w64-x86_64-imagemagick mingw-w64-x86_64-optipng mingw-w64-x86_64-inkscape |
29 | - uses: robinraju/release-downloader@v1.7 | 28 | - uses: robinraju/release-downloader@v1.7 |
30 | with: | 29 | with: |
31 | repository: "PerryWerneck/lib3270" | 30 | repository: "PerryWerneck/lib3270" |
32 | latest: true | 31 | latest: true |
33 | - fileName: "mingw-lib3270.x86_64.tar.xz" | 32 | + fileName: "mingw-w64-x86_64-lib3270-5.4-0-x86_64.pkg.tar.zst" |
34 | - uses: robinraju/release-downloader@v1.7 | 33 | - uses: robinraju/release-downloader@v1.7 |
35 | with: | 34 | with: |
36 | repository: "PerryWerneck/libv3270" | 35 | repository: "PerryWerneck/libv3270" |
37 | latest: true | 36 | latest: true |
38 | - fileName: "mingw-libv3270.x86_64.tar.xz" | 37 | + fileName: "mingw-w64-x86_64-lib3270-5.4-0-x86_64.pkg.tar.zst" |
39 | - name: CI-Build | 38 | - name: CI-Build |
40 | - run: | | ||
41 | - ./win/ci-build.sh | 39 | + run: ./win/ci-build.sh |
42 | 40 | ||
43 | 41 |
@@ -0,0 +1,62 @@ | @@ -0,0 +1,62 @@ | ||
1 | +# Maintainer: Perry Werneck <perry.werneck@gmail.com> | ||
2 | +# References: https://www.msys2.org/wiki/Creating-Packages/ | ||
3 | + | ||
4 | +# SPDX-License-Identifier: LGPL-3.0-or-later | ||
5 | +# | ||
6 | +# Copyright (C) 2008 Banco do Brasil S.A. | ||
7 | +# | ||
8 | +# This program is free software: you can redistribute it and/or modify | ||
9 | +# it under the terms of the GNU Lesser General Public License as published | ||
10 | +# by the Free Software Foundation, either version 3 of the License, or | ||
11 | +# (at your option) any later version. | ||
12 | +# | ||
13 | +# This program is distributed in the hope that it will be useful, | ||
14 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | +# GNU General Public License for more details. | ||
17 | +# | ||
18 | +# You should have received a copy of the GNU Lesser General Public License | ||
19 | +# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
20 | + | ||
21 | +_realname=$(grep AC_INIT "${startdir}/configure.ac" | cut -d[ -f2 | cut -d] -f1) | ||
22 | + | ||
23 | +pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} | ||
24 | +source=() | ||
25 | + | ||
26 | +pkgver=$(grep AC_INIT "${startdir}/configure.ac" | cut -d[ -f3 | cut -d] -f1) | ||
27 | +pkgrel=0 | ||
28 | +pkgdesc="TN3270 Access library" | ||
29 | +url="https://github.com/PerryWerneck/${_realname}" | ||
30 | +arch=(i686 x86_64) | ||
31 | +license=(LGPL-3.0-or-later) | ||
32 | +depends=(${MINGW_PACKAGE_PREFIX}-gtk3 ${MINGW_PACKAGE_PREFIX}-lib3270 ${MINGW_PACKAGE_PREFIX}-libv3270) | ||
33 | +makedepends=(autoconf automake make libtool gzip dos2unix optipng gzip ${MINGW_PACKAGE_PREFIX}-gtk3 ${MINGW_PACKAGE_PREFIX}-lib3270 ${MINGW_PACKAGE_PREFIX}-libv3270) | ||
34 | +checkdepends=() | ||
35 | + | ||
36 | +provides=($pkgname) | ||
37 | +conflicts=($pkgname) | ||
38 | + | ||
39 | +prepare() { | ||
40 | + rm -fr "$srcdir/$pkgname" | ||
41 | + ln -snf "$startdir" "$srcdir/$pkgname" | ||
42 | +} | ||
43 | + | ||
44 | +build() { | ||
45 | + cd $pkgname | ||
46 | + ./autogen.sh \ | ||
47 | + --prefix=${MINGW_PREFIX} \ | ||
48 | + --build=${MINGW_CHOST} \ | ||
49 | + --host=${MINGW_CHOST} \ | ||
50 | + --target=${MINGW_CHOST} | ||
51 | + | ||
52 | + make all | ||
53 | +} | ||
54 | + | ||
55 | +package() { | ||
56 | + cd $pkgname | ||
57 | + make DESTDIR="${pkgdir}" install | ||
58 | + install \ | ||
59 | + -Dm644 \ | ||
60 | + "LICENSE" \ | ||
61 | + "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" | ||
62 | +} |
win/ci-build.sh
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | # | 2 | # |
3 | +# SPDX-License-Identifier: LGPL-3.0-or-later | ||
4 | +# | ||
5 | +# Copyright (C) 2008 Banco do Brasil S.A. | ||
6 | +# | ||
7 | +# This program is free software: you can redistribute it and/or modify | ||
8 | +# it under the terms of the GNU Lesser General Public License as published | ||
9 | +# by the Free Software Foundation, either version 3 of the License, or | ||
10 | +# (at your option) any later version. | ||
11 | +# | ||
12 | +# This program is distributed in the hope that it will be useful, | ||
13 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | +# GNU General Public License for more details. | ||
16 | +# | ||
17 | +# You should have received a copy of the GNU Lesser General Public License | ||
18 | +# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
19 | + | ||
20 | +# | ||
3 | # References: | 21 | # References: |
4 | # | 22 | # |
5 | # * https://www.msys2.org/docs/ci/ | 23 | # * https://www.msys2.org/docs/ci/ |
6 | # | 24 | # |
7 | -# | 25 | + |
8 | echo "Running ${0}" | 26 | echo "Running ${0}" |
9 | 27 | ||
10 | LOGFILE=build.log | 28 | LOGFILE=build.log |
@@ -16,36 +34,20 @@ die ( ) { | @@ -16,36 +34,20 @@ die ( ) { | ||
16 | exit -1 | 34 | exit -1 |
17 | } | 35 | } |
18 | 36 | ||
19 | -myDIR=$(dirname $(dirname $(readlink -f ${0}))) | ||
20 | -echo "myDIR=${myDIR}" | ||
21 | - | ||
22 | -cd ${myDIR} | ||
23 | -rm -fr ${myDIR}/.build | ||
24 | - | ||
25 | -# | ||
26 | -# Unpack LIB3270 | ||
27 | -# | ||
28 | -echo "Unpacking lib3270" | ||
29 | -tar -C / -Jxf mingw-lib3270.${MSYSTEM_CARCH}.tar.xz > $LOGFILE 2>&1 || die "Unpack lib3270 failure" | 37 | +cd $(dirname $(dirname $(readlink -f ${0}))) |
30 | 38 | ||
31 | # | 39 | # |
32 | -# Build LIBV3270 | 40 | +# Install pre-reqs |
33 | # | 41 | # |
34 | -echo "Unpacking libv3270" | ||
35 | -tar -C / -Jxf mingw-libv3270.tar.xz > $LOGFILE 2>&1 || die "Unpack libv3270 failure" | 42 | +echo "Installing pre-reqs..." |
43 | +pacman -U --noconfirm *.pkg.tar.zst || die "pacman failure" | ||
36 | 44 | ||
37 | # | 45 | # |
38 | -# Build PW3270 | 46 | +# Build |
39 | # | 47 | # |
40 | -echo "Building PW3270" | ||
41 | -cd ${myDIR} | ||
42 | -./autogen.sh > $LOGFILE 2>&1 || die "Autogen failure" | ||
43 | -./configure > $LOGFILE 2>&1 || die "Configure failure" | ||
44 | -make clean > $LOGFILE 2>&1 || die "Make clean failure" | ||
45 | -make all > $LOGFILE 2>&1 || die "Make failure" | ||
46 | - | ||
47 | -make DESTDIR=.bin/package install | ||
48 | -tar --create --xz --file=mingw-pw3270.${MSYSTEM_CARCH}.tar.xz --directory=.bin/package --verbose . | 48 | +echo "Building package..." |
49 | +dos2unix PKGBUILD.mingw || die "dos2unix failure" | ||
50 | +makepkg BUILDDIR=/tmp/pkg -p PKGBUILD.mingw || die "makepkg failure" | ||
49 | 51 | ||
50 | echo "Build complete" | 52 | echo "Build complete" |
51 | 53 |