-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from PerryWerneck/develop
Updating publish action.
- Loading branch information
Showing
5 changed files
with
106 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,6 @@ on: | |
push: | ||
branches: | ||
- develop | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
analyze: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,30 +18,29 @@ jobs: | |
- uses: oprypin/find-latest-tag@v1 | ||
id: gettag | ||
with: | ||
repository: PerryWerneck/libhllapi # The repository to scan. | ||
releases-only: true # We know that all relevant tags have a GitHub release for them. | ||
repository: PerryWerneck/libhllapi | ||
releases-only: true | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: mingw64 | ||
update: true | ||
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 zip | ||
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 zip | ||
- uses: robinraju/[email protected] | ||
with: | ||
repository: "PerryWerneck/lib3270" | ||
latest: true | ||
fileName: "mingw-w64-x86_64-lib3270.tar.xz" | ||
fileName: "mingw-w64-x86_64-lib3270-5.4-0-x86_64.pkg.tar.zst" | ||
- uses: robinraju/[email protected] | ||
with: | ||
repository: "PerryWerneck/libipc3270" | ||
latest: true | ||
fileName: "mingw-w64-x86_64-libipc3270.tar.xz" | ||
fileName: "mingw-w64-x86_64-libipc3270-5.5-0-x86_64.pkg.tar.zst" | ||
- name: CI-Build | ||
run: | | ||
./win/ci-build.sh | ||
run: ./win/ci-build.sh | ||
- uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ steps.gettag.outputs.tag }} | ||
artifacts: "*-hllapi.tar.xz" | ||
artifacts: "*-libhllapi-*.pkg.tar.zst" | ||
allowUpdates: true | ||
draft: false | ||
makeLatest: true | ||
|
@@ -50,30 +49,30 @@ jobs: | |
replacesArtifacts: true | ||
msvc-pack: | ||
runs-on: windows-latest | ||
name: Publish MSVC Library | ||
name: Publish MSVC 64 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: oprypin/find-latest-tag@v1 | ||
id: gettag | ||
with: | ||
repository: PerryWerneck/libhllapi # The repository to scan. | ||
releases-only: true # We know that all relevant tags have a GitHub release for them. | ||
repository: PerryWerneck/libhllapi | ||
releases-only: true | ||
- uses: ilammy/[email protected] | ||
- uses: robinraju/[email protected] | ||
with: | ||
repository: "PerryWerneck/libipc3270" | ||
latest: true | ||
fileName: "msvc-libipc3270.zip" | ||
fileName: "msvc-libipc3270-x86_64.zip" | ||
- name: Extract libipc3270 | ||
run: 7z x msvc-libipc3270.zip -y -oipc3270 | ||
run: 7z x msvc-libipc3270-x86_64.zip -y -oipc3270 | ||
- name: Build | ||
run: nmake /f win\Makefile-ci.msc LIB3270_SDK_PATH=ipc3270 DESTDIR=hllapi.msvc install | ||
- name: pack | ||
run: 7z a msvc-hllapi.zip .\hllapi.msvc\* | ||
run: 7z a msvc-hllapi-x86_64.zip .\hllapi.msvc\* | ||
- uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ steps.gettag.outputs.tag }} | ||
artifacts: "msvc-hllapi.zip" | ||
artifacts: "*-hllapi-*.zip" | ||
allowUpdates: true | ||
draft: false | ||
makeLatest: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Maintainer: Perry Werneck <[email protected]> | ||
# References: https://www.msys2.org/wiki/Creating-Packages/ | ||
|
||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
# | ||
# Copyright (C) 2008 Banco do Brasil S.A. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Lesser General Public License as published | ||
# by the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
_realname=$(grep AC_INIT "${startdir}/configure.ac" | cut -d[ -f2 | cut -d] -f1) | ||
|
||
pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} | ||
source=() | ||
|
||
pkgver=$(grep AC_INIT "${startdir}/configure.ac" | cut -d[ -f3 | cut -d] -f1 | cut -d. -f1-2) | ||
pkgrel=0 | ||
pkgdesc="IPC client library for lib3270/pw3270" | ||
url="https://github.com/PerryWerneck/${_realname}" | ||
arch=(i686 x86_64) | ||
license=(LGPL-3.0-or-later) | ||
depends=(${MINGW_PACKAGE_PREFIX}-lib3270 ${MINGW_PACKAGE_PREFIX}-libipc3270) | ||
makedepends=(autoconf automake make libtool gzip dos2unix ${MINGW_PACKAGE_PREFIX}-lib3270 ${MINGW_PACKAGE_PREFIX}-libipc3270) | ||
checkdepends=() | ||
|
||
provides=($pkgname) | ||
conflicts=($pkgname) | ||
|
||
prepare() { | ||
rm -fr "$srcdir/$pkgname" | ||
ln -snf "$startdir" "$srcdir/$pkgname" | ||
} | ||
|
||
build() { | ||
cd $pkgname | ||
./autogen.sh \ | ||
--prefix=${MINGW_PREFIX} \ | ||
--build=${MINGW_CHOST} \ | ||
--host=${MINGW_CHOST} \ | ||
--target=${MINGW_CHOST} | ||
|
||
make all | ||
} | ||
|
||
package() { | ||
cd $pkgname | ||
make DESTDIR="${pkgdir}" install | ||
install \ | ||
-Dm644 \ | ||
"LICENSE" \ | ||
"${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ AC_PREREQ(2.59) | |
|
||
dnl Initialise automake with the package name, version and | ||
dnl bug-reporting address. | ||
AC_INIT([libhllapi], [5.4.1], [[email protected]], [libhllapi], [https://github.com/PerryWerneck/libhllapi]) | ||
AC_INIT([libhllapi], [5.5.0], [[email protected]], [libhllapi], [https://github.com/PerryWerneck/libhllapi]) | ||
|
||
dnl Place auxilliary scripts here. | ||
AC_CONFIG_AUX_DIR([scripts]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,53 @@ | ||
#!/bin/bash -x | ||
#!/bin/bash | ||
# | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
# | ||
# Copyright (C) 2008 Banco do Brasil S.A. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Lesser General Public License as published | ||
# by the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
# | ||
# References: | ||
# | ||
# * https://www.msys2.org/docs/ci/ | ||
# | ||
# | ||
|
||
echo "Running ${0}" | ||
|
||
LOGFILE=build.log | ||
rm -f ${LOGFILE} | ||
|
||
die ( ) { | ||
[ -s $LOGFILE ] && tail $LOGFILE | ||
[ "$1" ] && echo "$*" | ||
exit -1 | ||
} | ||
|
||
myDIR=$(dirname $(dirname $(readlink -f ${0}))) | ||
|
||
cd ${myDIR} | ||
rm -fr ./.build | ||
mkdir -p ./.build | ||
|
||
# | ||
# Unpack LIB3270 | ||
# | ||
echo "Unpacking lib3270" | ||
tar -C / -Jxvf ${MINGW_PACKAGE_PREFIX}-lib3270.tar.xz | ||
cd $(dirname $(dirname $(readlink -f ${0}))) | ||
|
||
# | ||
# Unpack LIBIPC3270 | ||
# Install pre-reqs | ||
# | ||
echo "Unpacking libipc3270" | ||
tar -C / -Jxvf ${MINGW_PACKAGE_PREFIX}-libipc3270.tar.xz | ||
echo "Installing pre-reqs..." | ||
pacman -U --noconfirm *.pkg.tar.zst || die "pacman failure" | ||
|
||
# | ||
# Build HLLAPI | ||
# Build | ||
# | ||
echo "Building HLLAPI" | ||
./autogen.sh || die "Autogen failure" | ||
./configure || die "Configure failure" | ||
make clean || die "Make clean failure" | ||
make all || die "Make failure" | ||
|
||
make DESTDIR=.bin/package install || die "Install failure" | ||
tar --create --xz --file=${MINGW_PACKAGE_PREFIX}-hllapi.tar.xz --directory=.bin/package --verbose . || die "Package failure" | ||
echo "Building package..." | ||
dos2unix PKGBUILD.mingw || die "dos2unix failure" | ||
makepkg BUILDDIR=/tmp/pkg -p PKGBUILD.mingw || die "makepkg failure" | ||
|
||
echo "Build complete" | ||
|