Commit 0a66b0a0059409e206831b58f77bbd5565b78193

Authored by Perry Werneck
2 parents 0abc14bd c764cf96
Exists in master and in 2 other branches develop, macos

Merge branch 'master' into develop

README.md
... ... @@ -25,7 +25,7 @@ Building for Linux
25 25 1. Get lib3270 sources from git
26 26  
27 27 ```shell
28   - $ git clone https://github.com/PerryWerneck/lib3270.git ./lib3270
  28 + git clone https://github.com/PerryWerneck/lib3270.git ./lib3270
29 29 ```
30 30  
31 31 2. Install the required libraries
... ... @@ -47,9 +47,9 @@ Building for Linux
47 47 3. Configure and build
48 48  
49 49 ```shell
50   - $ ./autogen.sh
51   - $ make clean
52   - $ make all
  50 + ./autogen.sh
  51 + make clean
  52 + make all
53 53 ```
54 54  
55 55 Building for Windows
... ... @@ -61,35 +61,35 @@ Cross-compiling on SuSE Linux (Native or WSL)
61 61 1. First add the MinGW Repositories for your SuSE version from:
62 62  
63 63 ```shell
64   - $ sudo zypper ar obs://windows:mingw:win32 mingw32
65   - $ sudo zypper ar obs://windows:mingw:win64 mingw64
66   - $ sudo zypper ref
  64 + sudo zypper ar obs://windows:mingw:win32 mingw32
  65 + sudo zypper ar obs://windows:mingw:win64 mingw64
  66 + sudo zypper ref
67 67 ```
68 68  
69 69 2. Get lib3270 sources from git
70 70  
71 71 ```shell
72   - $ git clone https://github.com/PerryWerneck/lib3270.git ./lib3270
  72 + git clone https://github.com/PerryWerneck/lib3270.git ./lib3270
73 73 ```
74 74  
75 75 3. Install cross compilers
76 76  
77 77 ```shell
78   - $ ./lib3270/win/install-cross.sh --all (for 32 and 64 bits)
  78 + ./lib3270/win/install-cross.sh --all (for 32 and 64 bits)
79 79 ```
80 80  
81 81 3. Configure build
82 82  
83 83 ```shell
84   - $ ./lib3270/win/win-configure.sh --64 (for 64 bits)
  84 + ./lib3270/win/win-configure.sh --64 (for 64 bits)
85 85 ```
86 86  
87 87 4. Build
88 88  
89 89 ```shell
90   - $ cd lib3270
91   - $ make clean
92   - $ make all
  90 + cd lib3270
  91 + make clean
  92 + make all
93 93 ```
94 94  
95 95 Windows native with MSYS2
... ... @@ -106,28 +106,28 @@ Windows native with MSYS2
106 106 3. Install devel packages using pacman on mingw shell
107 107  
108 108 ```shell
109   - $ pacman -S --needed mingw-w64-x86_64-gcc automake autoconf make git pkg-config mingw-w64-x86_64-gettext mingw-w64-x86_64-openssl
  109 + pacman -S --needed mingw-w64-x86_64-gcc automake autoconf make git pkg-config mingw-w64-x86_64-gettext mingw-w64-x86_64-openssl libtool
110 110 ```
111 111 Afther this close and reopen mingw shell.
112 112  
113 113 4. Get lib3270 sources from git using the mingw shell
114 114  
115 115 ```shell
116   - $ git clone https://github.com/PerryWerneck/lib3270.git ./lib3270
  116 + git clone https://github.com/PerryWerneck/lib3270.git ./lib3270
117 117 ```
118 118  
119 119 5. Build library using the mingw shell
120 120  
121 121 ```shell
122   - $ cd lib3270
123   - $ ./autogen.sh
124   - $ make all
  122 + cd lib3270
  123 + ./autogen.sh
  124 + make all
125 125 ```
126 126  
127 127 6. Install
128 128  
129 129 ```shell
130   - $ make install
  130 + make install
131 131 ```
132 132  
133 133 Building for macOS (using homebrew)
... ... @@ -138,20 +138,20 @@ Building for macOS (using homebrew)
138 138 2. Install dependencies
139 139  
140 140 ```shell
141   - $ brew install automake binutils coreutils curl gettext libtool openldap openssl pkgconfig
  141 + brew install automake binutils coreutils curl gettext libtool openldap openssl pkgconfig
142 142 ```
143 143  
144 144 3. Use [open-keg](https://gist.github.com/andrebreves/5f36e78575e20162ed0a62bd27c4bcea) to make keg-only dependencies available during build process
145 145  
146 146 ```shell
147   - $ open-keg curl openldap openssl
  147 + open-keg curl openldap openssl
148 148 ```
149 149  
150 150 4. Configure, build and install (inside the [open-keg](https://gist.github.com/andrebreves/5f36e78575e20162ed0a62bd27c4bcea) shell opened above)
151 151  
152 152 ```shell
153   - $ ./autogen.sh --prefix="$(brew --cellar)/lib3270/5.3"
154   - $ make all && make install
  153 + ./autogen.sh --prefix="$(brew --cellar)/lib3270/5.3"
  154 + make all && make install
155 155 $ brew link lib3270
156 156 ```
157 157  
... ... @@ -161,6 +161,6 @@ Uninstalling
161 161 1. To uninstall
162 162  
163 163 ```shell
164   - $ brew unlink lib3270
165   - $ rm -fr "$(brew --cellar)/lib3270"
  164 + brew unlink lib3270
  165 + rm -fr "$(brew --cellar)/lib3270"
166 166 ```
... ...
win/x86_32/mingw32-lib3270.spec
... ... @@ -44,6 +44,7 @@ BuildRoot: /var/tmp/%{name}-%{version}
44 44  
45 45 BuildRequires: autoconf >= 2.61
46 46 BuildRequires: automake
  47 +BuildRequires: libtool
47 48 BuildRequires: gettext-devel
48 49 BuildRequires: xz
49 50 BuildRequires: fdupes
... ... @@ -66,7 +67,7 @@ For more details, see https://softwarepublico.gov.br/social/pw3270/ .
66 67 #---[ Library ]-------------------------------------------------------------------------------------------------------
67 68  
68 69 %define MAJOR_VERSION %(echo %{version} | cut -d. -f1)
69   -%define MINOR_VERSION %(echo %{version} | cut -d. -f2)
  70 +%define MINOR_VERSION %(echo %{version} | cut -d. -f2 | cut -d+ -f1)
70 71 %define _libvrs %{MAJOR_VERSION}_%{MINOR_VERSION}
71 72  
72 73 %package -n %{name}-%{_libvrs}
... ... @@ -111,7 +112,7 @@ make all %{?_smp_mflags}
111 112 #%{_mingw64_makeinstall}
112 113 make DESTDIR=%{buildroot} install
113 114  
114   -%_mingw32_find_lang %{_libname} langfiles
  115 +%_mingw32_find_lang %{_libname}-%{MAJOR_VERSION}.%{MINOR_VERSION} langfiles
115 116 %fdupes %{buildroot}
116 117  
117 118 %files -n %{name}-%{_libvrs} -f langfiles
... ...
win/x86_64/mingw64-lib3270.spec
... ... @@ -44,6 +44,7 @@ BuildRoot: /var/tmp/%{name}-%{version}
44 44  
45 45 BuildRequires: autoconf >= 2.61
46 46 BuildRequires: automake
  47 +BuildRequires: libtool
47 48 BuildRequires: gettext-devel
48 49 BuildRequires: xz
49 50 BuildRequires: fdupes
... ... @@ -66,7 +67,7 @@ For more details, see https://softwarepublico.gov.br/social/pw3270/ .
66 67 #---[ Library ]-------------------------------------------------------------------------------------------------------
67 68  
68 69 %define MAJOR_VERSION %(echo %{version} | cut -d. -f1)
69   -%define MINOR_VERSION %(echo %{version} | cut -d. -f2)
  70 +%define MINOR_VERSION %(echo %{version} | cut -d. -f2 | cut -d+ -f1)
70 71 %define _libvrs %{MAJOR_VERSION}_%{MINOR_VERSION}
71 72  
72 73 %package -n %{name}-%{_libvrs}
... ... @@ -111,7 +112,7 @@ make all %{?_smp_mflags}
111 112 #%{_mingw64_makeinstall}
112 113 make DESTDIR=%{buildroot} install
113 114  
114   -%_mingw64_find_lang %{_libname} langfiles
  115 +%_mingw64_find_lang %{_libname}-%{MAJOR_VERSION}.%{MINOR_VERSION} langfiles
115 116 %fdupes %{buildroot}
116 117  
117 118 %files -n %{name}-%{_libvrs} -f langfiles
... ...