Commit d310058af21d1e23c3227fdbcb8e64da61e7b9a6
Committed by
GitHub
Exists in
develop
Merge pull request #46 from PerryWerneck/develop
Publishing mingw package instead of .tar.xz
Showing
10 changed files
with
193 additions
and
162 deletions
Show diff stats
.github/workflows/codeql.yml
.github/workflows/publish.yml
| ... | ... | @@ -5,7 +5,7 @@ on: |
| 5 | 5 | - master |
| 6 | 6 | jobs: |
| 7 | 7 | msys2-mingw: |
| 8 | - name: Publish for Windows 64 | |
| 8 | + name: Publish for MinGW 64 | |
| 9 | 9 | runs-on: windows-latest |
| 10 | 10 | defaults: |
| 11 | 11 | run: |
| ... | ... | @@ -21,13 +21,43 @@ jobs: |
| 21 | 21 | with: |
| 22 | 22 | msystem: mingw64 |
| 23 | 23 | update: true |
| 24 | - 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 | |
| 24 | + 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 | |
| 25 | 25 | - name: CI-Build |
| 26 | - run: ./win/ci-build.sh | |
| 26 | + run: ./win/mingw-build.sh | |
| 27 | 27 | - uses: ncipollo/release-action@v1 |
| 28 | 28 | with: |
| 29 | 29 | tag: ${{ steps.gettag.outputs.tag }} |
| 30 | - artifacts: "*-lib3270.tar.xz" | |
| 30 | + artifacts: "*-lib3270-*.pkg.tar.zst" | |
| 31 | + allowUpdates: true | |
| 32 | + draft: false | |
| 33 | + makeLatest: true | |
| 34 | + omitBody: true | |
| 35 | + omitPrereleaseDuringUpdate: true | |
| 36 | + replacesArtifacts: true | |
| 37 | + msys2-msvc: | |
| 38 | + name: Publish for MSVC 64 | |
| 39 | + runs-on: windows-latest | |
| 40 | + defaults: | |
| 41 | + run: | |
| 42 | + shell: msys2 {0} | |
| 43 | + steps: | |
| 44 | + - uses: actions/checkout@v3 | |
| 45 | + - uses: oprypin/find-latest-tag@v1 | |
| 46 | + id: gettag | |
| 47 | + with: | |
| 48 | + repository: PerryWerneck/lib3270 | |
| 49 | + releases-only: true | |
| 50 | + - uses: msys2/setup-msys2@v2 | |
| 51 | + with: | |
| 52 | + msystem: mingw64 | |
| 53 | + update: true | |
| 54 | + install: zip dos2unix mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool | |
| 55 | + - name: CI-Build | |
| 56 | + run: ./win/msvc-build.sh | |
| 57 | + - uses: ncipollo/release-action@v1 | |
| 58 | + with: | |
| 59 | + tag: ${{ steps.gettag.outputs.tag }} | |
| 60 | + artifacts: "*-lib3270-*.zip" | |
| 31 | 61 | allowUpdates: true |
| 32 | 62 | draft: false |
| 33 | 63 | makeLatest: true | ... | ... |
| ... | ... | @@ -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}-openssl) | |
| 33 | +makedepends=(autoconf automake make libtool gzip dos2unix ${MINGW_PACKAGE_PREFIX}-openssl) | |
| 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 | +} | ... | ... |
gitsync.sh
| ... | ... | @@ -1,34 +0,0 @@ |
| 1 | -#!/bin/bash | |
| 2 | -# | |
| 3 | -# https://help.github.com/articles/syncing-a-fork/ | |
| 4 | -# | |
| 5 | -# https://help.github.com/articles/configuring-a-remote-for-a-fork/ | |
| 6 | -# | |
| 7 | -# https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html | |
| 8 | -# | |
| 9 | -# Setup: | |
| 10 | -# | |
| 11 | -# git remote add github https://github.com/PerryWerneck/lib3270.git | |
| 12 | -# | |
| 13 | -# | |
| 14 | - | |
| 15 | -git push | |
| 16 | - | |
| 17 | -git fetch origin | |
| 18 | -git merge | |
| 19 | - | |
| 20 | -REPOS=$(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') | |
| 21 | - | |
| 22 | -for repo in ${REPOS} | |
| 23 | -do | |
| 24 | - echo "Getting updates from ${repo} ..." | |
| 25 | - git fetch ${repo} | |
| 26 | - git merge | |
| 27 | -done | |
| 28 | - | |
| 29 | -for repo in ${REPOS} | |
| 30 | -do | |
| 31 | - echo "Updating ${repo} ..." | |
| 32 | - git push ${repo} | |
| 33 | -done | |
| 34 | - |
locale/pt_BR.po
| ... | ... | @@ -2071,7 +2071,7 @@ msgstr "Aguardando resposta do pedido de upload" |
| 2071 | 2071 | msgid "Warning" |
| 2072 | 2072 | msgstr "Alerta" |
| 2073 | 2073 | |
| 2074 | -#: src/core/windows/util.c:123 src/core/windows/util.c:166 | |
| 2074 | +#: src/core/windows/util.c:124 src/core/windows/util.c:167 | |
| 2075 | 2075 | #, c-format |
| 2076 | 2076 | msgid "Windows error %d" |
| 2077 | 2077 | msgstr "Erro windows foi %d" | ... | ... |
pushtag.sh
| ... | ... | @@ -1,34 +0,0 @@ |
| 1 | -#!/bin/bash | |
| 2 | -# | |
| 3 | -# https://help.github.com/articles/syncing-a-fork/ | |
| 4 | -# | |
| 5 | -# https://help.github.com/articles/configuring-a-remote-for-a-fork/ | |
| 6 | -# | |
| 7 | -# https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html | |
| 8 | -# | |
| 9 | -# Setup: | |
| 10 | -# | |
| 11 | -# git remote add github https://github.com/PerryWerneck/lib3270.git | |
| 12 | -# | |
| 13 | -# | |
| 14 | - | |
| 15 | -if [ -z ${1} ]; then | |
| 16 | - echo "Inform target tag" | |
| 17 | - exit -1 | |
| 18 | -fi | |
| 19 | - | |
| 20 | -git push | |
| 21 | - | |
| 22 | -git fetch origin | |
| 23 | -#git checkout master | |
| 24 | -#git merge origin/master | |
| 25 | - | |
| 26 | -git tag -f ${1} | |
| 27 | -git push -f --tags | |
| 28 | - | |
| 29 | -for repo in $(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') | |
| 30 | -do | |
| 31 | - echo "Updating ${repo} ..." | |
| 32 | - git push ${repo} -f --tags | |
| 33 | -done | |
| 34 | - |
win/PKGBUILD
| ... | ... | @@ -1,51 +0,0 @@ |
| 1 | -# Maintainer: Perry Werneck <perry.werneck@gmail.com> | |
| 2 | -# References: https://www.msys2.org/wiki/Creating-Packages/ | |
| 3 | - | |
| 4 | -_realname=lib3270 | |
| 5 | -pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} | |
| 6 | -source=(git+https://github.com/PerryWerneck/lib3270#branch=develop) | |
| 7 | - | |
| 8 | -#pkgver() { | |
| 9 | -# cd ${srcdir}/${_realname} | |
| 10 | -# git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | |
| 11 | -#} | |
| 12 | - | |
| 13 | -pkgver=5.4 | |
| 14 | -pkgrel=1 | |
| 15 | -pkgdesc="TN3270 Access library" | |
| 16 | -url="https://github.com/PerryWerneck/lib3270" | |
| 17 | -arch=(i686 x86_64) | |
| 18 | -license=(GPL) | |
| 19 | -depends=(openssl) | |
| 20 | -makedepends=(autoconf automake make libtool gzip ${MINGW_PACKAGE_PREFIX}-openssl) | |
| 21 | -checkdepends=() | |
| 22 | - | |
| 23 | -sha256sums=('SKIP') | |
| 24 | - | |
| 25 | -provides=($pkgname) | |
| 26 | -conflicts=($pkgname) | |
| 27 | - | |
| 28 | -prepare() { | |
| 29 | - cd ${srcdir}/${_realname} | |
| 30 | -} | |
| 31 | - | |
| 32 | -build() { | |
| 33 | - rm -fr "${srcdir}/build-${CARCH}" | |
| 34 | - mkdir -p "${srcdir}/build-${CARCH}" | |
| 35 | - cd "${srcdir}/build-${CARCH}" | |
| 36 | - ${srcdir}/${_realname}/autogen.sh \ | |
| 37 | - --prefix=${MINGW_PREFIX} \ | |
| 38 | - --build=${MINGW_CHOST} \ | |
| 39 | - --host=${MINGW_CHOST} \ | |
| 40 | - --target=${MINGW_CHOST} | |
| 41 | - | |
| 42 | - make all | |
| 43 | -} | |
| 44 | - | |
| 45 | -package() { | |
| 46 | - cd "${srcdir}/build-${CARCH}" | |
| 47 | - make DESTDIR="${pkgdir}" install | |
| 48 | - install -Dm644 "${srcdir}/${_realname}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" | |
| 49 | -} | |
| 50 | - | |
| 51 | - |
win/ci-build.sh
| ... | ... | @@ -1,34 +0,0 @@ |
| 1 | -#!/bin/bash | |
| 2 | -# | |
| 3 | -# References: | |
| 4 | -# | |
| 5 | -# * https://www.msys2.org/docs/ci/ | |
| 6 | -# | |
| 7 | -# | |
| 8 | -echo "Running ${0}" | |
| 9 | - | |
| 10 | -LOGFILE=build.log | |
| 11 | -rm -f ${LOGFILE} | |
| 12 | - | |
| 13 | -die ( ) { | |
| 14 | - [ -s $LOGFILE ] && tail $LOGFILE | |
| 15 | - [ "$1" ] && echo "$*" | |
| 16 | - exit -1 | |
| 17 | -} | |
| 18 | - | |
| 19 | -cd $(dirname $(dirname $(readlink -f ${0}))) | |
| 20 | - | |
| 21 | -# | |
| 22 | -# Build LIB3270 | |
| 23 | -# | |
| 24 | -echo "Building lib3270" | |
| 25 | -./autogen.sh > $LOGFILE 2>&1 || die "Autogen failure" | |
| 26 | -./configure > $LOGFILE 2>&1 || die "Configure failure" | |
| 27 | -make clean > $LOGFILE 2>&1 || die "Make clean failure" | |
| 28 | -make all > $LOGFILE 2>&1 || die "Make failure" | |
| 29 | -make DESTDIR=.bin/package install | |
| 30 | - | |
| 31 | -tar --create --xz --file=${MINGW_PACKAGE_PREFIX}-lib3270.tar.xz --directory=.bin/package --verbose . | |
| 32 | - | |
| 33 | - | |
| 34 | - |
| ... | ... | @@ -0,0 +1,53 @@ |
| 1 | +#!/bin/bash | |
| 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 | +# | |
| 21 | +# References: | |
| 22 | +# | |
| 23 | +# * https://www.msys2.org/docs/ci/ | |
| 24 | +# | |
| 25 | + | |
| 26 | +echo "Running ${0}" | |
| 27 | + | |
| 28 | +LOGFILE=build.log | |
| 29 | +rm -f ${LOGFILE} | |
| 30 | + | |
| 31 | +die ( ) { | |
| 32 | + [ -s $LOGFILE ] && tail $LOGFILE | |
| 33 | + [ "$1" ] && echo "$*" | |
| 34 | + exit -1 | |
| 35 | +} | |
| 36 | + | |
| 37 | +cd $(dirname $(dirname $(readlink -f ${0}))) | |
| 38 | + | |
| 39 | +# | |
| 40 | +# Install pre-reqs | |
| 41 | +# | |
| 42 | +#echo "Installing pre-reqs..." | |
| 43 | +#pacman -U --noconfirm *.pkg.tar.zst || die "pacman failure" | |
| 44 | + | |
| 45 | +# | |
| 46 | +# Build | |
| 47 | +# | |
| 48 | +echo "Building package..." | |
| 49 | +dos2unix PKGBUILD.mingw || die "dos2unix failure" | |
| 50 | +makepkg BUILDDIR=/tmp/pkg -p PKGBUILD.mingw || die "makepkg failure" | |
| 51 | + | |
| 52 | +echo "Build complete" | |
| 53 | + | ... | ... |
| ... | ... | @@ -0,0 +1,40 @@ |
| 1 | +#!/bin/bash | |
| 2 | +# | |
| 3 | +# References: | |
| 4 | +# | |
| 5 | +# * https://www.msys2.org/docs/ci/ | |
| 6 | +# | |
| 7 | +# | |
| 8 | +echo "Running ${0}" | |
| 9 | + | |
| 10 | +LOGFILE=build.log | |
| 11 | +rm -f ${LOGFILE} | |
| 12 | + | |
| 13 | +die ( ) { | |
| 14 | + [ -s $LOGFILE ] && tail $LOGFILE | |
| 15 | + [ "$1" ] && echo "$*" | |
| 16 | + exit -1 | |
| 17 | +} | |
| 18 | + | |
| 19 | +cd $(dirname $(dirname $(readlink -f ${0}))) | |
| 20 | + | |
| 21 | +# | |
| 22 | +# Build LIB3270 | |
| 23 | +# | |
| 24 | +echo "Building lib3270" | |
| 25 | +./autogen.sh > $LOGFILE 2>&1 || die "Autogen failure" | |
| 26 | +./configure > $LOGFILE 2>&1 || die "Configure failure" | |
| 27 | +make clean > $LOGFILE 2>&1 || die "Make clean failure" | |
| 28 | +make all > $LOGFILE 2>&1 || die "Make failure" | |
| 29 | +make DESTDIR=.bin/package install > $LOGFILE 2>&1 || die "Install failure" | |
| 30 | + | |
| 31 | +cd .bin/package${MINGW_PREFIX} | |
| 32 | +zip \ | |
| 33 | + -9 -r \ | |
| 34 | + -x'*.a' \ | |
| 35 | + -x'*.pc' \ | |
| 36 | + ../../../${MINGW_PACKAGE_PREFIX}-lib3270-${MSYSTEM_CARCH}.zip * \ | |
| 37 | + > $LOGFILE 2>&1 || die "Zip failure" | |
| 38 | + | |
| 39 | + | |
| 40 | + | ... | ... |