From 428019a97720cbc4019ed2f6d339904487f15860 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Tue, 14 Jul 2020 11:47:27 -0300 Subject: [PATCH] Updating package & sdk. --- .gitignore | 2 +- README.md | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- configure.ac | 1 + link.sh | 11 +++++++++++ sdk/libhllapi.pc.in | 16 ++++++++++++++++ win/install-cross.sh | 6 ++++-- 6 files changed, 114 insertions(+), 5 deletions(-) create mode 100755 link.sh create mode 100644 sdk/libhllapi.pc.in diff --git a/.gitignore b/.gitignore index 738955e..9642d1a 100644 --- a/.gitignore +++ b/.gitignore @@ -24,5 +24,5 @@ doxyfile doxygen/html doxygen/rtf *~ - +*.pc diff --git a/README.md b/README.md index 72f7dbb..bcb8678 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,84 @@ -HLLAPI library for lib3270/pw3270 -================================= +## HLLAPI library for lib3270/pw3270 +## Installation + +### Linux + +For the supported distributions get the install repositories and instructions from https://software.opensuse.org/download.html?project=home%3APerryWerneck%3Apw3270&package=libhllapi + +### Windows + +TODO + +## Building for Linux + +1. Build and install [libipc3270](../../../libipc3270) + + +2. Get hllapi sources from git + + ``` + $ git clone https://github.com/PerryWerneck/libhllapi.git + ``` + +3. Build and install + + ``` + $ cd libhllapi + $ ./autogen.sh + $ make all + $ sudo make install + ``` + +## Building for Windows + +### Cross-compiling on SuSE Linux (Native or WSL) + +1. Add the MinGW Repositories + + ```shell + $ sudo zypper ar obs://windows:mingw:win32 mingw32 + $ sudo zypper ar obs://windows:mingw:win64 mingw64 + $ sudo zypper ar obs://home:PerryWerneck:pw3270 pw3270 + $ sudo zypper ref + ``` + +2. Get hllapi sources from git + + ``` + $ git clone https://github.com/PerryWerneck/libhllapi.git + ``` + +3. Install 64 bits cross compilers + + ``` + $ ./libhllapi/win/install-cross.sh --64 + ``` + +4. Run the build script + + ```shell + $ cd libhllapi + $ ./win/pack.sh + ``` + +### Windows native with MSYS2 + +1. Build and install [libipc3270](../../../libipc3270) + +2. Get hllapi sources from git + + ``` + $ git clone https://github.com/PerryWerneck/libhllapi.git + ``` + +3. Build and install + + ``` + $ cd libhllapi + $ ./autogen.sh + $ make all + $ make install + ``` diff --git a/configure.ac b/configure.ac index e9a227e..b3cb893 100644 --- a/configure.ac +++ b/configure.ac @@ -323,6 +323,7 @@ dnl --------------------------------------------------------------------------- AC_CONFIG_FILES(Makefile) AC_CONFIG_FILES(locale/Makefile) +AC_CONFIG_FILES(sdk/libhllapi.pc) dnl --------------------------------------------------------------------------- dnl Output the generated config.status script. diff --git a/link.sh b/link.sh new file mode 100755 index 0000000..d2bff85 --- /dev/null +++ b/link.sh @@ -0,0 +1,11 @@ +#!/bin/bash +make Debug + +sudo ln -sf $(readlink -f .bin/Debug/libhllapi.so.5.3) /usr/lib64/libhllapi.so.5.3 +sudo ln -sf $(readlink -f .bin/Debug/libhllapi.so.5.3) /usr/lib64/libhllapi.so +sudo ln -sf $(readlink -f src/include/lib3270/hllapi.h) /usr/include/lib3270/hllapi.h + +sudo ln -sf $(readlink -f sdk/*.pc) /usr/lib64/pkgconfig + + + diff --git a/sdk/libhllapi.pc.in b/sdk/libhllapi.pc.in new file mode 100644 index 0000000..32d9b18 --- /dev/null +++ b/sdk/libhllapi.pc.in @@ -0,0 +1,16 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +version_major=@PACKAGE_MAJOR_VERSION@ +version_minor=@PACKAGE_MINOR_VERSION@ + +Name: @PACKAGE_NAME@ +Description: @PACKAGE_DESCRIPTION@ +Version: @PACKAGE_VERSION@ +Requires: libipc3270 lib3270 +Libs: -lhllapi +Libs.private: @LIBS@ @INTL_LIBS@ @IPC3270_LIBS@ +Cflags: + diff --git a/win/install-cross.sh b/win/install-cross.sh index 340147d..0217cf0 100755 --- a/win/install-cross.sh +++ b/win/install-cross.sh @@ -54,8 +54,10 @@ do case $parameter in ar) - zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_42.3/ mingw32 - zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_42.3/ mingw64 + sudo zypper ar obs://windows:mingw:win32 mingw32 + sudo zypper ar obs://windows:mingw:win64 mingw64 + sudo zypper ar obs://home:PerryWerneck:pw3270 pw3270 + sudo zypper ref ;; 32) -- libgit2 0.21.2