Commit 4eaa954e59651695281c2fd3645c91705ef18412
1 parent
3796be5e
Exists in
develop
Using mingw packages instead of .tar.xz
Showing
4 changed files
with
95 additions
and
63 deletions
Show diff stats
.github/workflows/publish.yml
@@ -4,6 +4,9 @@ on: | @@ -4,6 +4,9 @@ on: | ||
4 | branches: | 4 | branches: |
5 | - master | 5 | - master |
6 | - develop | 6 | - develop |
7 | + push: | ||
8 | + branches: | ||
9 | + - develop | ||
7 | jobs: | 10 | jobs: |
8 | msys2-mingw: | 11 | msys2-mingw: |
9 | name: Publish Windows 64 | 12 | name: Publish Windows 64 |
@@ -22,19 +25,19 @@ jobs: | @@ -22,19 +25,19 @@ jobs: | ||
22 | with: | 25 | with: |
23 | msystem: mingw64 | 26 | msystem: mingw64 |
24 | update: true | 27 | update: true |
25 | - 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 | 28 | + 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 |
26 | - uses: robinraju/release-downloader@v1.7 | 29 | - uses: robinraju/release-downloader@v1.7 |
27 | with: | 30 | with: |
28 | repository: "PerryWerneck/lib3270" | 31 | repository: "PerryWerneck/lib3270" |
29 | latest: true | 32 | latest: true |
30 | - fileName: "mingw-w64-x86_64-lib3270.tar.xz" | 33 | + fileName: "mingw-w64-x86_64-lib3270-5.4-0-x86_64.pkg.tar.zst" |
31 | - name: CI-Build | 34 | - name: CI-Build |
32 | run: | | 35 | run: | |
33 | ./win/ci-build.sh | 36 | ./win/ci-build.sh |
34 | - uses: ncipollo/release-action@v1 | 37 | - uses: ncipollo/release-action@v1 |
35 | with: | 38 | with: |
36 | tag: ${{ steps.gettag.outputs.tag }} | 39 | tag: ${{ steps.gettag.outputs.tag }} |
37 | - artifacts: "*-libv3270.tar.xz" | 40 | + artifacts: "*-libv3270-*.pkg.tar.zst" |
38 | allowUpdates: true | 41 | allowUpdates: true |
39 | draft: false | 42 | draft: false |
40 | makeLatest: true | 43 | makeLatest: true |
@@ -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}-gtk+3 ${MINGW_PACKAGE_PREFIX}-lib3270) | ||
33 | +makedepends=(autoconf automake make libtool gzip dos2unix ${MINGW_PACKAGE_PREFIX}-lib3270 ${MINGW_PACKAGE_PREFIX}-gtk+3) | ||
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/PKGBUILD
@@ -1,40 +0,0 @@ | @@ -1,40 +0,0 @@ | ||
1 | -# Maintainer: Perry Werneck <perry.werneck@gmail.com> | ||
2 | - | ||
3 | -pkgname=${MINGW_PACKAGE_PREFIX}-libv3270 | ||
4 | - | ||
5 | -pkgver=5.2 | ||
6 | -pkgrel=1 | ||
7 | -pkgdesc="3270 Virtual Terminal for GTK" | ||
8 | -url="https://portal.softwarepublico.gov.br/social/pw3270/" | ||
9 | -arch=(i686 x86_64) | ||
10 | -license=(GPL) | ||
11 | -depends=(${MINGW_PACKAGE_PREFIX}-lib3270 ${MINGW_PACKAGE_PREFIX}-gtk3) | ||
12 | -makedepends=(autoconf automake make openssl ${MINGW_PACKAGE_PREFIX}-lib3270 ${MINGW_PACKAGE_PREFIX}-gtk3) | ||
13 | -checkdepends=() | ||
14 | - | ||
15 | -#groups=(gnome) | ||
16 | - | ||
17 | -source=(libv3270-$pkgver.tar.xz) | ||
18 | -sha256sums=('SKIP') | ||
19 | - | ||
20 | -provides=($pkgname) | ||
21 | -conflicts=($pkgname) | ||
22 | - | ||
23 | -prepare() { | ||
24 | - cd libv3270-$pkgver | ||
25 | - NOCONFIGURE=1 ./autogen.sh | ||
26 | - ./configure --prefix=$MINGW_PREFIX | ||
27 | -} | ||
28 | - | ||
29 | -build() { | ||
30 | - cd libv3270-$pkgver | ||
31 | - make all | ||
32 | -} | ||
33 | - | ||
34 | -package() { | ||
35 | - cd libv3270-$pkgver | ||
36 | - DESTDIR="$pkgdir" make install-dev | ||
37 | - install .bin/Release/libv3270.dll $MINGW_PREFIX/bin | ||
38 | - dlltool --dllname libv3270.dll --input-def .bin/Release/libv3270.def --output-lib $MINGW_PREFIX/lib/libv3270.a | ||
39 | -} | ||
40 | - |
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,31 +34,20 @@ die ( ) { | @@ -16,31 +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 | 37 | +cd $(dirname $(dirname $(readlink -f ${0}))) |
24 | 38 | ||
25 | # | 39 | # |
26 | -# Unpack lib3270 | 40 | +# Install pre-reqs |
27 | # | 41 | # |
28 | -echo "Unpacking lib3270" | ||
29 | -tar -C / -Jxf ${MINGW_PACKAGE_PREFIX}-lib3270.tar.xz > $LOGFILE 2>&1 || die "lib3270 unpack failure" | 42 | +echo "Installing pre-reqs..." |
43 | +pacman -U --noconfirm *.pkg.tar.zst || die "pacman failure" | ||
30 | 44 | ||
31 | # | 45 | # |
32 | -# Build libv3270 | 46 | +# Build |
33 | # | 47 | # |
34 | -echo "Building libv3270" | ||
35 | -cd ${myDIR} | ||
36 | -./autogen.sh > $LOGFILE 2>&1 || die "Autogen failure" | ||
37 | -./configure > $LOGFILE 2>&1 || die "Configure failure" | ||
38 | -make clean > $LOGFILE 2>&1 || die "Make clean failure" | ||
39 | -make all > $LOGFILE 2>&1 || die "Make failure" | ||
40 | - | ||
41 | -make DESTDIR=.bin/package install || die "Install failure" | ||
42 | -tar --create --xz --file=${MINGW_PACKAGE_PREFIX}-libv3270.tar.xz --directory=.bin/package --verbose . || die "Tar failure" | ||
43 | - | 48 | +echo "Building package..." |
49 | +dos2unix PKGBUILD.mingw || die "dos2unix failure" | ||
50 | +makepkg BUILDDIR=/tmp/pkg -p PKGBUILD.mingw || die "makepkg failure" | ||
44 | 51 | ||
45 | echo "Build complete" | 52 | echo "Build complete" |
46 | 53 |