Commit 88c47013c41cd8a510bc55870080291097559b52
1 parent
14d899e3
Exists in
develop
Implementing mingw package.
Showing
5 changed files
with
96 additions
and
129 deletions
Show diff stats
@@ -0,0 +1,67 @@ | @@ -0,0 +1,67 @@ | ||
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=lib3270 | ||
22 | + | ||
23 | +pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} | ||
24 | +source=(git+https://github.com/PerryWerneck/lib3270#branch=develop) | ||
25 | + | ||
26 | +#pkgver() { | ||
27 | +# cd ${srcdir}/${_realname} | ||
28 | +# git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | ||
29 | +#} | ||
30 | + | ||
31 | +pkgver=5.4 | ||
32 | +pkgrel=1 | ||
33 | +pkgdesc="TN3270 Access library" | ||
34 | +url="https://github.com/PerryWerneck/${_realname}" | ||
35 | +arch=(i686 x86_64) | ||
36 | +license=(LGPL-3.0-or-later) | ||
37 | +depends=(${MINGW_PACKAGE_PREFIX}-openssl) | ||
38 | +makedepends=(autoconf automake make libtool gzip dos2unix ${MINGW_PACKAGE_PREFIX}-openssl) | ||
39 | +checkdepends=() | ||
40 | + | ||
41 | +provides=($pkgname) | ||
42 | +conflicts=($pkgname) | ||
43 | + | ||
44 | +prepare() { | ||
45 | + rm -fr "$srcdir/$pkgname" | ||
46 | + ln -snf "$startdir" "$srcdir/$pkgname" | ||
47 | +} | ||
48 | + | ||
49 | +build() { | ||
50 | + cd $pkgname | ||
51 | + ./autogen.sh \ | ||
52 | + --prefix=${MINGW_PREFIX} \ | ||
53 | + --build=${MINGW_CHOST} \ | ||
54 | + --host=${MINGW_CHOST} \ | ||
55 | + --target=${MINGW_CHOST} | ||
56 | + | ||
57 | + make all | ||
58 | +} | ||
59 | + | ||
60 | +package() { | ||
61 | + cd $pkgname | ||
62 | + make DESTDIR="${pkgdir}" install | ||
63 | + install \ | ||
64 | + -Dm644 \ | ||
65 | + "LICENSE" \ | ||
66 | + "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" | ||
67 | +} |
gitsync.sh
@@ -1,34 +0,0 @@ | @@ -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 | - |
pushtag.sh
@@ -1,34 +0,0 @@ | @@ -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,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 | #!/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 |
@@ -19,16 +37,17 @@ die ( ) { | @@ -19,16 +37,17 @@ die ( ) { | ||
19 | cd $(dirname $(dirname $(readlink -f ${0}))) | 37 | cd $(dirname $(dirname $(readlink -f ${0}))) |
20 | 38 | ||
21 | # | 39 | # |
22 | -# Build LIB3270 | 40 | +# Install pre-reqs |
23 | # | 41 | # |
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 | 42 | +#echo "Installing pre-reqs..." |
43 | +#pacman -U --noconfirm *.pkg.tar.zst || die "pacman failure" | ||
30 | 44 | ||
31 | -tar --create --xz --file=${MINGW_PACKAGE_PREFIX}-lib3270.tar.xz --directory=.bin/package --verbose . | ||
32 | - | 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" | ||
33 | 51 | ||
52 | +echo "Build complete" | ||
34 | 53 |