Commit cff464dd943ea6d3ff69fb7621c18155616188aa
Committed by
GitHub
Exists in
develop
Merge pull request #33 from PerryWerneck/develop
Using mingw packages instead of .tar.xz
Showing
7 changed files
with
98 additions
and
66 deletions
Show diff stats
.github/workflows/publish.yml
| ... | ... | @@ -22,19 +22,19 @@ jobs: |
| 22 | 22 | with: |
| 23 | 23 | msystem: mingw64 |
| 24 | 24 | 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 | |
| 25 | + 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 | 26 | - uses: robinraju/release-downloader@v1.7 |
| 27 | 27 | with: |
| 28 | 28 | repository: "PerryWerneck/lib3270" |
| 29 | 29 | latest: true |
| 30 | - fileName: "mingw-w64-x86_64-lib3270.tar.xz" | |
| 30 | + fileName: "mingw-w64-x86_64-lib3270-5.4-0-x86_64.pkg.tar.zst" | |
| 31 | 31 | - name: CI-Build |
| 32 | 32 | run: | |
| 33 | 33 | ./win/ci-build.sh |
| 34 | 34 | - uses: ncipollo/release-action@v1 |
| 35 | 35 | with: |
| 36 | 36 | tag: ${{ steps.gettag.outputs.tag }} |
| 37 | - artifacts: "*-libv3270.tar.xz" | |
| 37 | + artifacts: "*-libv3270-*.pkg.tar.zst" | |
| 38 | 38 | allowUpdates: true |
| 39 | 39 | draft: false |
| 40 | 40 | makeLatest: true | ... | ... |
Makefile.in
| ... | ... | @@ -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) | |
| 33 | +makedepends=(autoconf automake make libtool gzip dos2unix ${MINGW_PACKAGE_PREFIX}-lib3270 ${MINGW_PACKAGE_PREFIX}-gtk3) | |
| 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 | +} | ... | ... |
locale/Makefile.in
| ... | ... | @@ -31,6 +31,7 @@ prefix=@prefix@ |
| 31 | 31 | exec_prefix=@exec_prefix@ |
| 32 | 32 | datarootdir=@datarootdir@ |
| 33 | 33 | localedir=${datarootdir}/locale |
| 34 | +srcdir=@srcdir@ | |
| 34 | 35 | |
| 35 | 36 | PACKAGE_NAME=@PACKAGE_NAME@ |
| 36 | 37 | GETTEXT_PACKAGE=@GETTEXT_PACKAGE@ |
| ... | ... | @@ -38,8 +39,7 @@ PACKAGE_VERSION=@PACKAGE_VERSION@ |
| 38 | 39 | PACKAGE_TARNAME=@PACKAGE_TARNAME@ |
| 39 | 40 | PRODUCT_NAME=@PRODUCT_NAME@ |
| 40 | 41 | |
| 41 | -BASEDIR=@BASEDIR@ | |
| 42 | -BINDIR=$(BASEDIR)/.bin/locale | |
| 42 | +BINDIR=.bin/locale | |
| 43 | 43 | |
| 44 | 44 | MKDIR=@MKDIR_P@ |
| 45 | 45 | MSGCAT=@MSGCAT@ | ... | ... |
locale/pt_BR.po
| ... | ... | @@ -5,7 +5,7 @@ msgid "" |
| 5 | 5 | msgstr "" |
| 6 | 6 | "Project-Id-Version: pw3270 5.0\n" |
| 7 | 7 | "Report-Msgid-Bugs-To: \n" |
| 8 | -"POT-Creation-Date: 2023-01-31 10:08-0300\n" | |
| 8 | +"POT-Creation-Date: 2023-04-05 11:08-0300\n" | |
| 9 | 9 | "PO-Revision-Date: 2021-11-22 22:07-0300\n" |
| 10 | 10 | "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" |
| 11 | 11 | "Language-Team: Brazilian Portuguese <perry.werneck@gmail.com>\n" | ... | ... |
win/PKGBUILD
| ... | ... | @@ -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 | 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 | 21 | # References: |
| 4 | 22 | # |
| 5 | 23 | # * https://www.msys2.org/docs/ci/ |
| 6 | 24 | # |
| 7 | -# | |
| 25 | + | |
| 8 | 26 | echo "Running ${0}" |
| 9 | 27 | |
| 10 | 28 | LOGFILE=build.log |
| ... | ... | @@ -16,31 +34,20 @@ die ( ) { |
| 16 | 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 | 52 | echo "Build complete" |
| 46 | 53 | ... | ... |