diff --git a/apt.sh b/apt.sh deleted file mode 100755 index b7d7e91..0000000 --- a/apt.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -apt-get install autotools-dev -apt-get install autoconf -apt-get install automake -apt-get install libgtk-3-dev -apt-get install gettext -apt-get install libssl-dev -apt-get install desktop-file-utils -apt-get install libdbus-glib-1-dev -apt-get install libssl-dev -apt-get install xsltproc -apt-get install librsvg2-bin -apt-get install zip -apt-get install oorexx-dev -apt-get install imagemagick -apt-get install libreoffice-style-galaxy -apt-get install libreoffice-dev -apt-get install ure -apt-get install php5-cli -apt-get install php5-dev -apt-get install openjdk-7-jdk -apt-get install python-dev - diff --git a/colors.conf b/colors.conf deleted file mode 100644 index e4ea70b..0000000 --- a/colors.conf +++ /dev/null @@ -1,93 +0,0 @@ -# -# Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 -# (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a -# aplicativos mainframe. Registro no INPI sob o nome G3270. -# -# Copyright (C) <2008> -# -# Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob -# os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela -# Free Software Foundation. -# -# Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER -# GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO -# A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para -# obter mais detalhes. -# -# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este -# programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin -# St, Fifth Floor, Boston, MA 02110-1301 USA -# -# -# Contatos: -# -# perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) -# erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) -# - -[default] -label=PW3270 default - -base=#000000,#7890F0,#FF0000,#FF00FF,#00FF00,#00FFFF,#FFFF00,#FFFFFF,#000000,#000080,#FFA200,#800080,#008000,#008080,#A0A000,#C0C0C0 -field=#00FF00,#FF0000,#00FFFF,#FFFFFF -selection=#404040,#ffffff -OIA=#000000,#00FF00,#7890F0,#FFFFFF,#FF0000 - -cross-hair=#00FF00 - -[X3270] -label=X3270 - -base=black,deepSkyBlue,red,pink,green,turquoise,yellow,white,black,blue3,orange,purple,paleGreen,paleTurquoise2,grey,white -field=green,red,deepSkyBlue,white -selection=dimGrey,black -OIA=black,turquoise,turquoise,white,red - -cross-hair=white - -[Reverse] -label=Reverse -label[pt_BR]=Invertido - -base=white,blue,firebrick,pink,green4,cadetBlue,goldenrod,black,white,blue3,orange,purple,paleGreen,darkTurquoise,grey,black -selection=dimGrey,black -OIA=white,blue,blue,black,black - -cross-hair=black - -[Bright] -label=Bright -label[pt_BR]=Cores fortes - -base=black,blue,red,magenta,green,turquoise,yellow,white,black,blue3,orange,purple,paleGreen,cyan,grey,white -selection=dimGrey,black -OIA=black,blue,blue,white,red - -cross-hair=white - -[CPE] -label=CPE -base=black,LightBlue1,PaleVioletRed1,pink,green,turquoise,yellow,white,black,LightBlue3,orange,MediumPurple1,paleGreen,paleTurquoise2,grey80,white -selection=dimGrey,black -OIA=black,turquoise,turquoise,white,red - -cross-hair=white - -[Green] -label=Green -label[pt_BR]=Verde - -base=black,green - -[WB] -label=White on Black -label[pt_BR]=Branco com fundo preto - -base=black,white - -[BW] -label=Black on White -label[pt_BR]=Preto com fundo branco - -base=white,black - diff --git a/conf/colors.conf b/conf/colors.conf new file mode 100644 index 0000000..e4ea70b --- /dev/null +++ b/conf/colors.conf @@ -0,0 +1,93 @@ +# +# Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 +# (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a +# aplicativos mainframe. Registro no INPI sob o nome G3270. +# +# Copyright (C) <2008> +# +# Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob +# os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela +# Free Software Foundation. +# +# Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER +# GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO +# A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para +# obter mais detalhes. +# +# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este +# programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin +# St, Fifth Floor, Boston, MA 02110-1301 USA +# +# +# Contatos: +# +# perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) +# erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) +# + +[default] +label=PW3270 default + +base=#000000,#7890F0,#FF0000,#FF00FF,#00FF00,#00FFFF,#FFFF00,#FFFFFF,#000000,#000080,#FFA200,#800080,#008000,#008080,#A0A000,#C0C0C0 +field=#00FF00,#FF0000,#00FFFF,#FFFFFF +selection=#404040,#ffffff +OIA=#000000,#00FF00,#7890F0,#FFFFFF,#FF0000 + +cross-hair=#00FF00 + +[X3270] +label=X3270 + +base=black,deepSkyBlue,red,pink,green,turquoise,yellow,white,black,blue3,orange,purple,paleGreen,paleTurquoise2,grey,white +field=green,red,deepSkyBlue,white +selection=dimGrey,black +OIA=black,turquoise,turquoise,white,red + +cross-hair=white + +[Reverse] +label=Reverse +label[pt_BR]=Invertido + +base=white,blue,firebrick,pink,green4,cadetBlue,goldenrod,black,white,blue3,orange,purple,paleGreen,darkTurquoise,grey,black +selection=dimGrey,black +OIA=white,blue,blue,black,black + +cross-hair=black + +[Bright] +label=Bright +label[pt_BR]=Cores fortes + +base=black,blue,red,magenta,green,turquoise,yellow,white,black,blue3,orange,purple,paleGreen,cyan,grey,white +selection=dimGrey,black +OIA=black,blue,blue,white,red + +cross-hair=white + +[CPE] +label=CPE +base=black,LightBlue1,PaleVioletRed1,pink,green,turquoise,yellow,white,black,LightBlue3,orange,MediumPurple1,paleGreen,paleTurquoise2,grey80,white +selection=dimGrey,black +OIA=black,turquoise,turquoise,white,red + +cross-hair=white + +[Green] +label=Green +label[pt_BR]=Verde + +base=black,green + +[WB] +label=White on Black +label[pt_BR]=Branco com fundo preto + +base=black,white + +[BW] +label=Black on White +label[pt_BR]=Preto com fundo branco + +base=white,black + diff --git a/debian.changelog b/debian.changelog deleted file mode 100644 index 80ca4c9..0000000 --- a/debian.changelog +++ /dev/null @@ -1,7 +0,0 @@ -pw3270 (5.0-0) unstable; urgency=low - - * Initial Release - - -- Perry Werneck Wed, 2 May 2012 15:20:56 -0300 - - diff --git a/debian.control b/debian.control deleted file mode 100644 index 923df0d..0000000 --- a/debian.control +++ /dev/null @@ -1,45 +0,0 @@ -Source: pw3270 -Section: unknown -Priority: optional -Maintainer: Perry Werneck -Build-Depends: debhelper (>= 7), autotools-dev, autoconf, libgtk-3-dev, gettext, libssl-dev, desktop-file-utils, libdbus-glib-1-dev, libssl-dev, xsltproc, librsvg2-bin, oorexx-dev, zip, libreoffice-common, libreoffice-core, libreoffice-dev, uno-libs3, ure - -Package: pw3270 -Architecture: any -Depends: ${shlibs:Depends}, lib3270 (= ${binary:Version}) -Description: IBM 3270 Terminal emulator for gtk - IBM 3270 terminal emulator gtk. It can be used to communicate with - any IBM host that supports 3270-style connections over TELNET. - -Package: lib3270 -Architecture: any -Section: libs -Depends: ${misc:Depends} -Description: pw3270 shared libraries. - This package contains the pw3270 shared library for the core application. - -Package: lib3270-dev -Architecture: any -Section: libdevel -Depends: ${misc:Depends}, lib3270 (= ${binary:Version}) -Description: lib3270 development files. - This package contains the files needed for development of lib3270 based applications - -Package: pw3270-plugin-dbus -Architecture: any -Depends: ${misc:Depends}, pw3270 (= ${binary:Version}), libdbus-1-3 -Description: DBUS plugin for pw3270. - This package contains the plugin allowing scripting of a pw3270 session using dbus calls. - -Package: pw3270-plugin-rexx -Architecture: any -Depends: ${misc:Depends}, lib3270 (= ${binary:Version}), oorexx (>= 4.1.2) -Description: REXX script support for pw3270. - This package provides Rexx class and associated libraries allowing rexx scripts to access tn3270e hosts. - -Package: libreoffice-extension-pw3270 -Architecture: any -Depends: ${misc:Depends}, pw3270 (= ${binary:Version}), libreoffice-core -Description: DBUS plugin for pw3270. - This package contains the libreoffice modules for acessing 3270 hosts. - diff --git a/debian.rules b/debian.rules deleted file mode 100644 index 6040f21..0000000 --- a/debian.rules +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 to 1999 by Joey Hess. - -# Uncomment this to turn on verbose mode. -export DH_VERBOSE=1 - -# This is the debhelper compatibility version to use. -export DH_COMPAT=4 - -# Libreoffice stuff -export OFFICE_HOME=/usr/lib/libreoffice -export OO_SDK_URE_HOME=/usr/lib/ure - -CFLAGS = -g -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) -CFLAGS += -O0 -else -CFLAGS += -O2 -endif - -build: build-stamp -build-stamp: - dh_testdir - - # Add here commands to compile the package. - aclocal - autoconf - ./configure --prefix=/usr - rm -f debian/*.install - make Release - # --- end custom part for compiling - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - - # Add here commands to clean up after the build process. - if [ -e Makefile ]; then make clean ; fi - # --- end custom part for cleaning up - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Install main library - make DESTDIR=$(PWD)/debian/lib3270 install-lib - - # Install pw3270's GUI - make DESTDIR=$(PWD)/debian/pw3270 install-app - - # Install sdk - make DESTDIR=$(PWD)/debian/lib3270-dev install-sdk - - mkdir -p $(PWD)/debian/lib3270-dev/usr/share/pw3270/ui - mv -f $(PWD)/debian/pw3270/usr/share/pw3270/ui/*debug.xml $(PWD)/debian/lib3270-dev/usr/share/pw3270/ui/ - - # Install libreoffice extension - make DESTDIR=$(PWD)/debian/libreoffice-extension-pw3270 install-oxt - - # Install DBUS plugin - make DESTDIR=$(PWD)/debian/pw3270-plugin-dbus install-plugin-dbus - - # Install REXX plugin - make DESTDIR=$(PWD)/debian/pw3270-plugin-rexx install-plugin-rexx - - mkdir -p $(PWD)/debian/pw3270-plugin-rexx/usr/share/pw3270/ui/ - mv -f $(PWD)/debian/pw3270/usr/share/pw3270/ui/*rexx.xml $(PWD)/debian/pw3270-plugin-rexx/usr/share/pw3270/ui/ - - # Create updated file lists - find $(PWD)/debian/lib3270 -type f | sed -e "s@^$(PWD)/debian/lib3270/@/@g" > $(PWD)/debian/lib3270.install - - find $(PWD)/debian/pw3270 -type f | sed -e "s@^$(PWD)/debian/pw3270/@/@g" > $(PWD)/debian/pw3270.install - - find $(PWD)/debian/libreoffice-extension-pw3270 -type f | sed -e "s@^$(PWD)/debian/libreoffice-extension-pw3270/@/@g" > $(PWD)/debian/libreoffice-extension-pw3270.install - - find $(PWD)/debian/pw3270-plugin-dbus -type f | sed -e "s@^$(PWD)/debian/pw3270-plugin-dbus/@/@g" > $(PWD)/debian/pw3270-plugin-dbus.install - find $(PWD)/debian/pw3270-plugin-rexx -type f | sed -e "s@^$(PWD)/debian/pw3270-plugin-rexx/@/@g" > $(PWD)/debian/pw3270-plugin-rexx.install - - # --- end custom part for installing - -# Build architecture-independent files here. -binary-indep: build install - # We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot -# dh_installdebconf - dh_installdocs - dh_installexamples - dh_installmenu -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_installinit - dh_installcron - dh_installman - dh_installinfo -# dh_undocumented - dh_installchangelogs - dh_link - dh_strip - dh_compress - dh_fixperms -# dh_makeshlibs - dh_installdeb -# dh_perl -# dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install diff --git a/debian/apt.sh b/debian/apt.sh new file mode 100755 index 0000000..b7d7e91 --- /dev/null +++ b/debian/apt.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +apt-get install autotools-dev +apt-get install autoconf +apt-get install automake +apt-get install libgtk-3-dev +apt-get install gettext +apt-get install libssl-dev +apt-get install desktop-file-utils +apt-get install libdbus-glib-1-dev +apt-get install libssl-dev +apt-get install xsltproc +apt-get install librsvg2-bin +apt-get install zip +apt-get install oorexx-dev +apt-get install imagemagick +apt-get install libreoffice-style-galaxy +apt-get install libreoffice-dev +apt-get install ure +apt-get install php5-cli +apt-get install php5-dev +apt-get install openjdk-7-jdk +apt-get install python-dev + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..80ca4c9 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,7 @@ +pw3270 (5.0-0) unstable; urgency=low + + * Initial Release + + -- Perry Werneck Wed, 2 May 2012 15:20:56 -0300 + + diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..923df0d --- /dev/null +++ b/debian/control @@ -0,0 +1,45 @@ +Source: pw3270 +Section: unknown +Priority: optional +Maintainer: Perry Werneck +Build-Depends: debhelper (>= 7), autotools-dev, autoconf, libgtk-3-dev, gettext, libssl-dev, desktop-file-utils, libdbus-glib-1-dev, libssl-dev, xsltproc, librsvg2-bin, oorexx-dev, zip, libreoffice-common, libreoffice-core, libreoffice-dev, uno-libs3, ure + +Package: pw3270 +Architecture: any +Depends: ${shlibs:Depends}, lib3270 (= ${binary:Version}) +Description: IBM 3270 Terminal emulator for gtk + IBM 3270 terminal emulator gtk. It can be used to communicate with + any IBM host that supports 3270-style connections over TELNET. + +Package: lib3270 +Architecture: any +Section: libs +Depends: ${misc:Depends} +Description: pw3270 shared libraries. + This package contains the pw3270 shared library for the core application. + +Package: lib3270-dev +Architecture: any +Section: libdevel +Depends: ${misc:Depends}, lib3270 (= ${binary:Version}) +Description: lib3270 development files. + This package contains the files needed for development of lib3270 based applications + +Package: pw3270-plugin-dbus +Architecture: any +Depends: ${misc:Depends}, pw3270 (= ${binary:Version}), libdbus-1-3 +Description: DBUS plugin for pw3270. + This package contains the plugin allowing scripting of a pw3270 session using dbus calls. + +Package: pw3270-plugin-rexx +Architecture: any +Depends: ${misc:Depends}, lib3270 (= ${binary:Version}), oorexx (>= 4.1.2) +Description: REXX script support for pw3270. + This package provides Rexx class and associated libraries allowing rexx scripts to access tn3270e hosts. + +Package: libreoffice-extension-pw3270 +Architecture: any +Depends: ${misc:Depends}, pw3270 (= ${binary:Version}), libreoffice-core +Description: DBUS plugin for pw3270. + This package contains the libreoffice modules for acessing 3270 hosts. + diff --git a/debian/makedeb.sh b/debian/makedeb.sh new file mode 100755 index 0000000..4451976 --- /dev/null +++ b/debian/makedeb.sh @@ -0,0 +1,19 @@ +#!/bin/bash +#./autogen.sh + +VERSION=$(grep AC_INIT configure.ac | cut -d[ -f3 | cut -d] -f1) +TIMESTAMP=$(LANG=en_US date) +. ./revision + +rm -fr debian +mkdir debian + +echo 7 > debian/compat +cp debian.control debian/control +cp debian.rules debian/rules +chmod +x debian/rules + +EDITOR=true dch --preserve -v $VERSION-$PACKAGE_LEVEL -u low --create --package pw3270 +sed -i "s@UNRELEASED@unstable@;s@Initial release. (Closes: #XXXXXX)@SVN Revision $PACKAGE_REVISION@" debian/changelog + +dpkg-buildpackage -rfakeroot -uc -us diff --git a/debian/pw3270.dsc b/debian/pw3270.dsc new file mode 100644 index 0000000..e34abbf --- /dev/null +++ b/debian/pw3270.dsc @@ -0,0 +1,11 @@ +Format: 1.0 +Source: pw3270 +Version: 5.0.0 +Binary: pw3270 +Maintainer: Perry Werneck +Architecture: any +Build-Depends: debhelper (>= 7), autotools-dev, autoconf, libgtk-3-dev, gettext, libssl-dev, desktop-file-utils, libdbus-glib-1-dev, libreoffice-dev, ure, imagemagick, librsvg2-bin +Files: + 00000000000000000000000000000000 000000 pw3270-5.0.tar.gz + + diff --git a/debian/rules b/debian/rules new file mode 100644 index 0000000..6040f21 --- /dev/null +++ b/debian/rules @@ -0,0 +1,124 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +export DH_COMPAT=4 + +# Libreoffice stuff +export OFFICE_HOME=/usr/lib/libreoffice +export OO_SDK_URE_HOME=/usr/lib/ure + +CFLAGS = -g +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +CFLAGS += -O0 +else +CFLAGS += -O2 +endif + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + aclocal + autoconf + ./configure --prefix=/usr + rm -f debian/*.install + make Release + # --- end custom part for compiling + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + if [ -e Makefile ]; then make clean ; fi + # --- end custom part for cleaning up + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Install main library + make DESTDIR=$(PWD)/debian/lib3270 install-lib + + # Install pw3270's GUI + make DESTDIR=$(PWD)/debian/pw3270 install-app + + # Install sdk + make DESTDIR=$(PWD)/debian/lib3270-dev install-sdk + + mkdir -p $(PWD)/debian/lib3270-dev/usr/share/pw3270/ui + mv -f $(PWD)/debian/pw3270/usr/share/pw3270/ui/*debug.xml $(PWD)/debian/lib3270-dev/usr/share/pw3270/ui/ + + # Install libreoffice extension + make DESTDIR=$(PWD)/debian/libreoffice-extension-pw3270 install-oxt + + # Install DBUS plugin + make DESTDIR=$(PWD)/debian/pw3270-plugin-dbus install-plugin-dbus + + # Install REXX plugin + make DESTDIR=$(PWD)/debian/pw3270-plugin-rexx install-plugin-rexx + + mkdir -p $(PWD)/debian/pw3270-plugin-rexx/usr/share/pw3270/ui/ + mv -f $(PWD)/debian/pw3270/usr/share/pw3270/ui/*rexx.xml $(PWD)/debian/pw3270-plugin-rexx/usr/share/pw3270/ui/ + + # Create updated file lists + find $(PWD)/debian/lib3270 -type f | sed -e "s@^$(PWD)/debian/lib3270/@/@g" > $(PWD)/debian/lib3270.install + + find $(PWD)/debian/pw3270 -type f | sed -e "s@^$(PWD)/debian/pw3270/@/@g" > $(PWD)/debian/pw3270.install + + find $(PWD)/debian/libreoffice-extension-pw3270 -type f | sed -e "s@^$(PWD)/debian/libreoffice-extension-pw3270/@/@g" > $(PWD)/debian/libreoffice-extension-pw3270.install + + find $(PWD)/debian/pw3270-plugin-dbus -type f | sed -e "s@^$(PWD)/debian/pw3270-plugin-dbus/@/@g" > $(PWD)/debian/pw3270-plugin-dbus.install + find $(PWD)/debian/pw3270-plugin-rexx -type f | sed -e "s@^$(PWD)/debian/pw3270-plugin-rexx/@/@g" > $(PWD)/debian/pw3270-plugin-rexx.install + + # --- end custom part for installing + +# Build architecture-independent files here. +binary-indep: build install + # We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs + dh_installexamples + dh_installmenu +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit + dh_installcron + dh_installman + dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb +# dh_perl +# dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/devel/lib3270.pc.in b/devel/lib3270.pc.in new file mode 100644 index 0000000..ccbd8c9 --- /dev/null +++ b/devel/lib3270.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: lib3270 +Description: TN3270E Library calls used by @PACKAGE@ +Version: @PACKAGE_VERSION@ +Libs: -L\@libdir@ -l3270 +Libs.private: @LIBSSL_LIBS@ @INTL_LIBS@ @SOCKET_LIBS@ +Cflags: -I@includedir@ + diff --git a/devel/pw3270.pc.in b/devel/pw3270.pc.in new file mode 100644 index 0000000..56e7003 --- /dev/null +++ b/devel/pw3270.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: pw3270 +Description: @PACKAGE@ GTK widgets and support calls for plugin development +Version: @PACKAGE_VERSION@ +Libs: -L\@libdir@ -l@PACKAGE_TARNAME@ +Libs.private: lib3270 +Cflags: -I@includedir@ + diff --git a/hllapipacket.sh b/hllapipacket.sh deleted file mode 100755 index 2b7dc2c..0000000 --- a/hllapipacket.sh +++ /dev/null @@ -1,136 +0,0 @@ -#!/bin/bash - - -# -# Gera binários windows -# -# $1 = Arquitetura (x86_32/x86_64) -# -build() -{ - echo -e "\e]2;${PACKAGE_NAME}-${1}\a" - - case ${1} in - x86_32) - host=i686-w64-mingw32 - host_cpu=i686 - prefix=/usr/i686-w64-mingw32/sys-root/mingw - tools=i686-w64-mingw32 - ;; - - x86_64) - host=x86_64-w64-mingw32 - host_cpu=x86_64 - prefix=/usr/x86_64-w64-mingw32/sys-root/mingw - tools=x86_64-w64-mingw32 - ;; - - - *) - failed "Arquitetura desconhecida: ${1}" - - esac - - # Detecto argumentos - ARGS="" - - ./configure \ - --cache-file=.${1}.cache \ - --host=${host} \ - --prefix=${prefix} \ - --disable-rexx - --disable-java \ - --disable-office - - if [ "$?" != "0" ]; then - failed "Erro ao configurar" - fi - - make clean - rm -f *.exe - - make Release - if [ "$?" != "0" ]; then - failed "Erro ao compilar fontes" - fi - - mkdir -p ${TEMPDIR}/package/${host_cpu} - - cp -v .bin/Release/hllapi.dll* ${TEMPDIR}/package/${host_cpu} - if [ "$?" != "0" ]; then - failed "Erro ao copiar pacotes" - fi - - make clean - rm -f *.exe - -} - -myDIR=$(readlink -f $(dirname $0)) -TEMPDIR=$(mktemp -d) -DESTDIR=${HOME}/public_html/win -RUNTIMEDIR=$(mktemp -d) -ARCHS="x86_32 x86_64" -RUNTIME=1 -COMPLETE=1 - -trap cleanup INT - -until [ -z "$1" ] -do - if [ ${1:0:2} = '--' ]; then - tmp=${1:2} - parameter=${tmp%%=*} - parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") - - case $parameter in - - 32) - ARCHS="x86_32" - ;; - - 64) - ARCHS="x86_64" - ;; - - OUT) - DESTDIR=$value - ;; - - ARCH) - value=${tmp##*=} - ARCHS=$value - ;; - - *) - value=${tmp##*=} - eval $parameter=$value - esac - - fi - - shift -done - -# Configura -aclocal -if [ "$?" != "0" ]; then - exit -1 -fi - -autoconf -if [ "$?" != "0" ]; then - exit -1 -fi - -# Gera pacotes -for i in ${ARCHS}; do - - build "${i}" - -done - -cd ${TEMPDIR}/package - -zip -9 -m -r ~/public_html/win/hllapi_$(date "+%Y%m%d").zip . - diff --git a/install-cross.sh b/install-cross.sh deleted file mode 100755 index cbcb952..0000000 --- a/install-cross.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash - -install_packages() -{ - -TEMPFILE=$(mktemp) - -cat > ${TEMPFILE} << EOF -libopenssl-devel -libintl-devel -libepoxy0 -libgdk_pixbuf-2_0-0 -atk-devel -pango-devel -win_iconv-devel -pixman-devel -glib2-devel -cairo-devel -freetype-devel -winpthreads-devel -gtk3-devel -cross-gcc-c++ -cross-pkg-config -cross-cpp -cross-binutils -cross-nsis -filesystem -gettext-tools -gtk3-data -gtk3-tools -headers -gnome-icon-theme -hicolor-icon-theme -gdk-pixbuf-loader-rsvg -gdk-pixbuf-query-loaders -EOF - -# python-devel - -# Instala apicativos e temas necessários -sudo zypper --non-interactive in \ - adwaita-icon-theme \ - gettext-tools \ - glib2-devel - -while read FILE -do - sudo zypper --non-interactive in ${1}-${FILE} -done < ${TEMPFILE} - -rm -f ${TEMPFILE} - -} - -if [ -z ${1} ]; then - echo "Use ${0} --32 for 32 bits cross-compiler" - echo "Use ${0} --64 for 64 bits cross-compiler" - exit -1 -fi - - -until [ -z "${1}" ] -do - if [ ${1:0:2} = '--' ]; then - tmp=${1:2} - parameter=${tmp%%=*} - parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") - - case $parameter in - - ar) - zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_42.1/ mingw32 - zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_42.1/ mingw64 - ;; - - 32) - install_packages mingw32 - ;; - - 64) - install_packages mingw64 - ;; - - ALL) - install_packages mingw32 - install_packages mingw64 - ;; - - - *) - value=${tmp##*=} - eval $parameter=$value - esac - - fi - - shift -done - - diff --git a/lib3270.pc.in b/lib3270.pc.in deleted file mode 100644 index ccbd8c9..0000000 --- a/lib3270.pc.in +++ /dev/null @@ -1,12 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: lib3270 -Description: TN3270E Library calls used by @PACKAGE@ -Version: @PACKAGE_VERSION@ -Libs: -L\@libdir@ -l3270 -Libs.private: @LIBSSL_LIBS@ @INTL_LIBS@ @SOCKET_LIBS@ -Cflags: -I@includedir@ - diff --git a/makedeb.sh b/makedeb.sh deleted file mode 100755 index 4451976..0000000 --- a/makedeb.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -#./autogen.sh - -VERSION=$(grep AC_INIT configure.ac | cut -d[ -f3 | cut -d] -f1) -TIMESTAMP=$(LANG=en_US date) -. ./revision - -rm -fr debian -mkdir debian - -echo 7 > debian/compat -cp debian.control debian/control -cp debian.rules debian/rules -chmod +x debian/rules - -EDITOR=true dch --preserve -v $VERSION-$PACKAGE_LEVEL -u low --create --package pw3270 -sed -i "s@UNRELEASED@unstable@;s@Initial release. (Closes: #XXXXXX)@SVN Revision $PACKAGE_REVISION@" debian/changelog - -dpkg-buildpackage -rfakeroot -uc -us diff --git a/makegtkruntime.sh.in b/makegtkruntime.sh.in deleted file mode 100644 index 68cdd8b..0000000 --- a/makegtkruntime.sh.in +++ /dev/null @@ -1,356 +0,0 @@ -#!/bin/bash -PKG_CONFIG="@PKG_CONFIG@" -GTK_VERSION="gtk+-@GTK_VERSION@" - -GTK_PREFIX=$($PKG_CONFIG --variable=prefix $GTK_VERSION) -TARGET_PATH=".bin/gtkruntime" - -# Clean target folder -rm -fr "$TARGET_PATH/*" -mkdir -p "$TARGET_PATH" - -copyFile() { - - GTKPATH=$(find "$GTK_PREFIX/bin" -name "$1") - SYSPATH=$(find "/bin" -name "$1") - - if [ ! -z "$GTKPATH" ]; then - echo "$GTKPATH ..." - cp $GTKPATH "$TARGET_PATH" - if [ "$?" != "0" ]; then - echo "Can´t copy $GTKPATH" - return 1 - fi - elif [ ! -z "$SYSPATH" ]; then - echo "$SYSPATH ..." - cp $SYSPATH "$TARGET_PATH" - if [ "$?" != "0" ]; then - echo "Can´t copy $SYSPATH" - return 1 - fi - - else - echo "Can´t find ${GTK_PREFIX}/bin/${1}" - return 1 - fi - - return 0 -} - -copyFiles() { - - while read FILE - do - copyFile "$FILE" - if [ "$?" != "0" ]; then - exit -1 - fi - done < $1 - rm -f $1 - -} - -copy_locale() { - - rm -fr $TARGET_PATH/share/locale/pt_BR/LC_MESSAGES - mkdir -p $TARGET_PATH/share/locale/pt_BR/LC_MESSAGES - - while read FILE - do - echo "$GTK_PREFIX/share/locale/pt_BR/LC_MESSAGES/$FILE ..." - - if [ -e "$GTK_PREFIX/share/locale/pt_BR/LC_MESSAGES/$FILE" ]; then - cp "$GTK_PREFIX/share/locale/pt_BR/LC_MESSAGES/$FILE" "$TARGET_PATH/share/locale/pt_BR/LC_MESSAGES" - if [ "$?" != "0" ]; then - echo "Can´t copy $FILE" - exit -1 - fi - fi - - done < $1 - rm -f $1 -} - -CopyGTK3Theme() { - - mkdir -p ${TARGET_PATH}/share/icons - if [ "$?" != 0 ]; then - echo "Can´t create icons folder" - exit -1 - fi - - cp -rv /usr/share/icons/${1} ${TARGET_PATH}/share/icons - if [ "$?" != 0 ]; then - echo "Can´t copy ${1} icons" - exit -1 - fi - - mkdir -p ${TARGET_PATH}/share/themes - if [ "$?" != 0 ]; then - echo "Can´t create themes folder" - exit -1 - fi - - cp -rv /usr/share/themes/${1} ${TARGET_PATH}/share/themes - if [ "$?" != 0 ]; then - echo "Can´t copy ${1} theme" - exit -1 - fi - - -} - - -gtk3() { - -TEMPFILE="temp1.tmp" -cat > $TEMPFILE << EOF -libglib-*.dll -libintl*.dll -libgmodule*.dll -libgobject*.dll -libffi*.dll -libgtk-*.dll -libgdk-*.dll -libcairo-gobject*.dll -libcairo-2*.dll -libfontconfig-1*.dll -libfreetype-6*.dll -zlib1.dll -libxml2-*.dll -libpixman-1*.dll -libpng*.dll -libgdk_pixbuf*.dll -libgio-*.dll -libjasper-*.dll -libjpeg-8*.dll -libtiff-5*.dll -liblzma-5*.dll -libpango-1*.dll -libpangocairo-1*.dll -libpangoft2-1*.dll -libpangowin32-1*.dll -libatk-*.dll -libcrypto-*.dll -libssl-*.dll -libharfbuzz-0.dll -libstdc++-6.dll -icule53.dll -icuuc53.dll -icudata53.dll -libgraphite2.dll -librsvg-*.dll -libepoxy-*.dll -gspawn-win*-helper-console.exe -gspawn-win*-helper.exe -gdk-pixbuf-query-loaders.exe -EOF -copyFiles $TEMPFILE - - -# Copy loaders -GDK_LOADERS=$(${PKG_CONFIG} --variable=gdk_pixbuf_binarydir gdk-pixbuf-2.0)/loaders -GDK_PREFIX=$(${PKG_CONFIG} --variable=prefix gdk-pixbuf-2.0) -GDK_TARGET=$(echo ${GDK_LOADERS}/ | sed -e "s@${GDK_PREFIX}@@g") - -mkdir -p ${TARGET_PATH}/${GDK_TARGET} - -cp -v ${GDK_LOADERS}/* ${TARGET_PATH}/${GDK_TARGET} -if [ "$?" != 0 ]; then - echo "Can´t copy loaders" - exit -1 -fi - - -# Copy optional files -copyFile libgcc_s_sjlj-1.dll -copyFile libgcc_s_seh-1.dll - -# Build locale dirs -cat > $TEMPFILE << EOF -atk10.mo -gdk-pixbuf.mo -glib20.mo -gtk30-properties.mo -EOF - -copy_locale $TEMPFILE - -mkdir -p $TARGET_PATH/share/glib-2.0/schemas -if [ "$?" != 0 ]; then - echo "Can´t create schemas folder" - exit -1 -fi - -if [ ! -e $GTK_PREFIX/share/glib-2.0/schemas/gschemas.compiled ]; then - glib-compile-schemas $GTK_PREFIX/share/glib-2.0/schemas -fi - -cp $GTK_PREFIX/share/glib-2.0/schemas/gschemas.compiled $TARGET_PATH/share/glib-2.0/schemas/gschemas.compiled -if [ "$?" != 0 ]; then - echo "Can´t copy gshemas.compiled" - exit -1 -fi - -# Copia Adwaita -CopyGTK3Theme "Adwaita" - -#mkdir -p $TARGET_PATH/share/icons/Adwaita -#if [ "$?" != 0 ]; then -# echo "Can´t create icons folder" -# exit -1 -#fi -# -#cp -rv /usr/share/icons/Adwaita $TARGET_PATH/share/icons/Adwaita -#if [ "$?" != 0 ]; then -# echo "Can´t copy icons" -# exit -1 -#fi -# -#mkdir -p $TARGET_PATH/share/themes/Adwaita -#if [ "$?" != 0 ]; then -# echo "Can´t create Adwaita theme" -# exit -1 -#fi -# -#cp -rv /usr/share/themes/Adwaita $TARGET_PATH/share/themes/Adwaita -#if [ "$?" != 0 ]; then -# echo "Can´t copy Adwaita theme" -# exit -1 -#fi - - -# Copia gnome -#mkdir -p $TARGET_PATH/share/icons/gnome -#if [ "$?" != 0 ]; then -# echo "Can´t create icons folder" -# exit -1 -#fi -# -#cp -rv $GTK_PREFIX/share/icons/gnome $TARGET_PATH/share/icons/gnome -#if [ "$?" != 0 ]; then -# echo "Can´t copy icons" -# exit -1 -#fi - -mkdir -p $TARGET_PATH/etc -cp -rv $GTK_PREFIX/etc/gtk-3.0 $TARGET_PATH/etc/gtk-3.0 -if [ "$?" != 0 ]; then - echo "Can´t copy theme" - exit -1 -fi - -cat > $TARGET_PATH/etc/gtk-3.0/settings.ini << EOF -[Settings] -gtk-theme-name = Adwaita -gtk-icon-theme-name = Adwaita -gtk-fallback-icon-theme = Adwaita -gtk-font-name = Sans 10 -gtk-button-images = 1 -EOF -} - -gtk2() { - -# Build DLL list -TEMPFILE="temp1.tmp" -cat > $TEMPFILE << EOF -intl.dll -libatk-1.0-0.dll -libcairo-2.dll -libgailutil-18.dll -libgdk_pixbuf-2.0-0.dll -libgdk-win32-2.0-0.dll -libgettextlib-0-*.dll -libgettextpo*.dll -libgettextsrc*.dll -libgio-2.0-0.dll -libglib-2.0-0.dll -libgmodule-2.0-0.dll -libgobject-2.0-0.dll -libgthread-2.0-0.dll -libgtk-win32-2.0-0.dll -libpango-1.0-0.dll -libpangocairo-1.0-0.dll -libpangoft2-1.0-0.dll -libpangowin32-1.0-0.dll -zlib1.dll -libpng*.dll -libfontconfig*.dll -libasprintf*.dll -libgettextlib*.dll -libexpat*.dll -freetype*.dll -gspawn-win32-helper-console.exe -gspawn-win32-helper.exe -gdk-pixbuf-query-loaders.exe -EOF - -# jpeg62.dll -# libtiff*.dll -copyFiles $TEMPFILE - -# Build locale dirs -cat > $TEMPFILE << EOF -atk10.mo -gdk-pixbuf.mo -gettext-runtime.mo -gettext-tools.mo -glib20.mo -gtk20-properties.mo -gtk20.mo -libiconv.mo -EOF - -copy_locale $TEMPFILE - -# Copy default theme -THEME_PATH="themes/MS-Windows/gtk-2.0" -rm -fr "$TARGET_PATH/$THEME_PATH" -mkdir -p "$TARGET_PATH/share/$THEME_PATH" - -echo "$GTK_PREFIX/share/$THEME_PATH/gtkrc ..." -cp "$GTK_PREFIX/share/$THEME_PATH/gtkrc" "$TARGET_PATH/share/$THEME_PATH/gtkrc" -if [ "$?" != "0" ]; then - echo "Can´t copy default theme" - exit -1 -fi - -cat > $TEMPFILE << EOF -engines -loaders -EOF - -rm -fr $TARGET_PATH/lib/gtk-2.0/$GTK_RUNTIME_VERSION/ -mkdir -p $TARGET_PATH/lib/gtk-2.0/$GTK_RUNTIME_VERSION/ -while read DIRNAME -do - if [ -d "$GTK_PREFIX/lib/gtk-2.0/$GTK_RUNTIME_VERSION/$DIRNAME" ]; then - echo "$GTK_PREFIX/lib/gtk-2.0/$GTK_RUNTIME_VERSION/$DIRNAME ..." - mkdir -p "$TARGET_PATH/lib/gtk-2.0/$GTK_RUNTIME_VERSION/$DIRNAME" - cp -r "$GTK_PREFIX/lib/gtk-2.0/$GTK_RUNTIME_VERSION/$DIRNAME" "$TARGET_PATH/lib/gtk-2.0/$GTK_RUNTIME_VERSION" - if [ "$?" != "0" ]; then - echo "Can´t copy $DIRNAME" - exit -1 - fi - fi -done < $TEMPFILE -rm -f $TEMPFILE - -mkdir -p $TARGET_PATH/etc/gtk-2.0/ -echo "gtk-theme-name = \"MS-Windows\"" > $TARGET_PATH/etc/gtk-2.0/gtkrc -if [ "$?" != "0" ]; then - echo "Can´t set theme name" - exit -1 -fi - -} - -if [ "$GTK_VERSION" == "gtk+-3.0" ]; then - gtk3 -else - gtk2 -fi - -echo $0 Complete - diff --git a/pw3270.dsc b/pw3270.dsc deleted file mode 100644 index e34abbf..0000000 --- a/pw3270.dsc +++ /dev/null @@ -1,11 +0,0 @@ -Format: 1.0 -Source: pw3270 -Version: 5.0.0 -Binary: pw3270 -Maintainer: Perry Werneck -Architecture: any -Build-Depends: debhelper (>= 7), autotools-dev, autoconf, libgtk-3-dev, gettext, libssl-dev, desktop-file-utils, libdbus-glib-1-dev, libreoffice-dev, ure, imagemagick, librsvg2-bin -Files: - 00000000000000000000000000000000 000000 pw3270-5.0.tar.gz - - diff --git a/pw3270.pc.in b/pw3270.pc.in deleted file mode 100644 index 56e7003..0000000 --- a/pw3270.pc.in +++ /dev/null @@ -1,12 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: pw3270 -Description: @PACKAGE@ GTK widgets and support calls for plugin development -Version: @PACKAGE_VERSION@ -Libs: -L\@libdir@ -l@PACKAGE_TARNAME@ -Libs.private: lib3270 -Cflags: -I@includedir@ - diff --git a/pw3270.spec.in b/pw3270.spec.in deleted file mode 100644 index 2b43bb7..0000000 --- a/pw3270.spec.in +++ /dev/null @@ -1,585 +0,0 @@ -# -# spec file for package @PACKAGE@ -# -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. -# Copyright (C) <2008> -# -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -# Please submit bugfixes or comments via http://bugs.opensuse.org/ -# - -%define LIBVERSION @MAJOR_VERSION@_@MINOR_VERSION@ - -# -# References: -# -# https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto#Detect_a_distribution_flavor_for_special_code -# - -%define _dbus 1 -%define _office 0 -%define _php 0 -%define _ooRexx 1 -%define _java 0 -%define _python 1 - -%define _distro linux - -#---[ Packaging ]----------------------------------------------------------------------------------------------------- - -Name: @PACKAGE@ -Version: @PACKAGE_VERSION@ -Release: @PACKAGE_LEVEL@ -Summary: IBM 3270 Terminal emulator for GTK -License: GPL-2.0 -Group: System/X11/Terminals -Url: https://portal.softwarepublico.gov.br/social/pw3270/ - -Source: %{name}-%{version}.tar.bz2 - -BuildRoot: %{_tmppath}/%{name}-%{version}-build - -Requires: lib3270 = %{version} -Requires: shared-mime-info - -Provides: lib@PACKAGE@ = %{version} -Provides: lib@PACKAGE@.so = %{version} - -#--[ Red HAT ]-------------------------------------------------------------------------------------------------------- - -%if 0%{?rhel_version} - -%define _distro rhel%{rhel_version} - -BuildRequires: dbus-devel -BuildRequires: dbus-glib-devel -BuildRequires: openssl-devel - -%define _office 0 -%define _php 0 - -%if 0%{?rhel_version} >= 0700 - -# RHEL 7.0 - -BuildRequires: gtk3-devel - -%else - -# RHEL 6.0 -%define _python 0 - -BuildRequires: gtk2-devel -BuildRequires: java-1.6.0-devel - -%endif - -%endif - -#--[ CentOS ]--------------------------------------------------------------------------------------------------------- - -%if 0%{?centos_version} - -%define _distro centos%{centos_version} - -BuildRequires: pkgconfig(dbus-1) -BuildRequires: pkgconfig(dbus-glib-1) -BuildRequires: pkgconfig(openssl) - -%if 0%{?centos_version} >= 0700 - -# CentOS 7 - -%define _php 5 -BuildRequires: php-devel - -%define _office 0 - -BuildRequires: pkgconfig(gtk+-3.0) - -%else - -# CentOS 6 - -%define _office 0 -%define _python 0 - -BuildRequires: gtk2-devel -BuildRequires: java-1.8.0-devel - -%endif - -%endif - -#--[ Fedora ]--------------------------------------------------------------------------------------------------------- - -%if 0%{?fedora} - -%define _distro fedora%{fedora} - -BuildRequires: pkgconfig(dbus-1) -BuildRequires: pkgconfig(dbus-glib-1) -BuildRequires: pkgconfig(gtk+-3.0) -BuildRequires: pkgconfig(openssl) - -%define _php 5 -BuildRequires: php-devel - -%if 0%{?fedora} >= 21 - -# Fedora 21 fails on libreoffice sdk -%define _office 0 - -%else - -#%define _office 0 -#BuildRequires: libreoffice-sdk -#BuildRequires: libreoffice-ure -#BuildRequires: librsvg2-tools - -%endif - -%endif - -#--[ SuSE ]----------------------------------------------------------------------------------------------------------- - -%if 0%{?suse_version} - -# https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros#.25sles_version -%if 0%{?sles_version} - %define _distro sles%{sles_version} - %define _office 0 -%else -%if 0%{?sled_version} - %define _distro sled%{sled_version} - %define _office 0 -%else - %define _distro suse%{suse_version} -%endif - -%endif - -BuildRequires: libopenssl-devel -BuildRequires: rsvg-view - -# OpenSUSE >= 12.2 enable GTK3 & D-Bus -%if 0%{?suse_version} >= 1220 - -BuildRequires: pkgconfig(dbus-1) -BuildRequires: pkgconfig(dbus-glib-1) -BuildRequires: pkgconfig(gtk+-3.0) - -%else - -%define _dbus 0 -%define _python 0 -BuildRequires: gtk2-devel - -%endif - -# OpenSUSE >= 13.1 uses PHP5 -%if 0%{?suse_version} >= 1310 -%define _php 5 -BuildRequires: php%{_php}-devel -%endif - -%endif - -#--------------------------------------------------------------------------------------------------------------------- - -BuildRequires: autoconf >= 2.61 -BuildRequires: automake -BuildRequires: binutils -BuildRequires: coreutils - -%if 0%{?_ooRexx} -BuildRequires: ooRexx-devel >= 4.2.0 -%endif - -%if 0%{?_python} -BuildRequires: python -BuildRequires: python-devel - -%define pythonextpath %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()") -%endif - -%if 0%{?_php} -%define _phpextdir %(php-config --extension-dir) -%define _phpconf %(php-config | sed 's@ @\\n@g' | grep "^--with-config-file-scan-dir=" | cut -d= -f2) -%endif - -%if 0%{?_java} -BuildRequires: java-devel -BuildRequires: javapackages-tools -%endif - -BuildRequires: desktop-file-utils -BuildRequires: findutils -BuildRequires: gcc-c++ -BuildRequires: gettext-devel -BuildRequires: m4 -BuildRequires: pkgconfig -BuildRequires: sed - - -%description -Open-source GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET. -Based on the original x3270 code, pw3270 was originally created for Banco do Brasil, and is now used worldwide. - -#--[ lib3270 ]-------------------------------------------------------------------------------------------------------- - -%package -n lib3270-%LIBVERSION -Summary: 3270 Communication library for %{name} -Group: Development/Libraries/C and C++ -Requires: openssl -Provides: lib3270 - -%description -n lib3270-%LIBVERSION -Open-source GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET. - -This package contains the tn3270 protocol library for %{name} - -#--[ Devel ]---------------------------------------------------------------------------------------------------------- - -%package -n lib3270-devel -Summary: Devel for 3270 Communication library for %{name} -Group: Development/Libraries/C and C++ -Requires: lib3270-%LIBVERSION = %{version} - -%description -n lib3270-devel -Open-source GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET. -This package contains the development files for tn3270 protocol library for %{name} - -%package -n @PACKAGE@-devel -Summary: Files required for development of %{name} plugins -Group: Development/Libraries/C and C++ -Requires: lib3270-devel = %{version} -Requires: @PACKAGE@ = %{version} - -%description -n @PACKAGE@-devel -Open-source GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET. - -This package contains the development files for %{name} - -#--[ Plugins ]-------------------------------------------------------------------------------------------------------- - -%if 0%{?_dbus} -%package plugin-dbus -Summary: DBUS object for %{name} -Group: System/X11/Terminals -Requires: %{name} = %{version} -Requires: dbus-1 - -%description plugin-dbus -Plugin exporting a DBUS object from every %{name} open session. -%endif - -%if 0%{?_ooRexx} -%package -n %{name}-plugin-rexx -Summary: Rexx class for 3270 access -Group: Development/Languages/Other -Requires: lib3270 = %{version} -Requires: ooRexx >= 4.1 - -%description -n %{name}-plugin-rexx -This package provides Rexx class and associated libraries -allowing rexx scripts to access tn3270e hosts. -%endif - -#--[ Extensions ]----------------------------------------------------------------------------------------------------- - -%if 0%{?_office} -%package -n %{name}-libreoffice -Summary: 3270 host access extension for libreoffice -Group: Productivity/Office/Suite -Requires: lib3270 = %{version} -Requires: libreoffice - -%description -n %{name}-libreoffice -This package provides 3270 access object to StarBasic. -%endif - -%if 0%{?_php} -%package -n php%{_php}-tn3270 -Summary: PHP%{_php} Extension Module implementing tn3270 protocol -Group: Development/Libraries/PHP -Requires: lib3270 = %{version} - -%description -n php%{_php}-tn3270 -This is an extension for acessing 3270 hosts directly -from PHP apps. -%endif - -%if 0%{?_python} -%package -n python-tn3270 -Summary: Python Extension Module implementing tn3270 protocol -Group: Development/Libraries/Python -Requires: lib3270 = %{version} - -%description -n python-tn3270 -This is an extension for acessing 3270 hosts directly -from python apps. -%endif - -%if 0%{?_java} -%package java -Summary: Java class to interact with @PACKAGE@ -Group: Development/Libraries/Java -Requires: javapackages-tools -Requires: lib3270 = %{version} - -%description java -Java class for lib3270/@PACKAGE@ interaction. - -%package plugin-java -Summary: Java plugin for %{name} -Group: Development/Libraries/Java -Requires: %{name} = %{version} -Requires: %{name}-java = %{version} - -%description plugin-java -This package provides a plugin allowing calling of java classes -from @PACKAGE@ application. - -%package javadoc -Summary: Javadoc for %{name} -Group: Documentation -Requires: jpackage-utils - -%description javadoc -API documentation for %{name}. -%endif - -#---[ Build & Install ]----------------------------------------------------------------------------------------------- - -%prep - -echo "Distribution: %{_distro}" - -%if 0%{?_php} - echo " * PHP%{_php} is enabled" -%endif -%if 0%{?_dbus} - echo " * DBUS is enabled" -%endif - -%setup -q -n %{name}-%{version} -find . -exec touch {} \; -aclocal -autoconf - -export CFLAGS="$RPM_OPT_FLAGS" -export CXXFLAGS="$RPM_OPT_FLAGS" -export FFLAGS="$RPM_OPT_FLAGS" - -%if 0%{?_java} -export JAVA_HOME=%{java_home} -echo "JAVA_HOME=$JAVA_HOME" -echo "javadocdir=%{_javadocdir}" -%endif - -%configure --disable-strip \ - --enable-pic \ - --with-jnidir="%{_jnidir}" \ - --with-jvmjardir="%{_jvmjardir}" \ - --with-javadocdir="%{_javadocdir}" - -%build -make clean -make all - -%install -export NO_BRP_CHECK_BYTECODE_VERSION=true - -make DESTDIR=$RPM_BUILD_ROOT install - -find $RPM_BUILD_ROOT - -%find_lang %{name} langfiles - -cat > @PACKAGE@.desktop << EOF -[Desktop Entry] -X-SuSE-translate=true -GenericName=@PACKAGE@ -Name=3270 Terminal -Comment=IBM 3270 Terminal emulator -Exec=@PACKAGE@ -Icon=%{_datadir}/@PACKAGE@/@PACKAGE@.png -Terminal=false -Type=Application -StartupNotify=true -EOF -chmod 644 @PACKAGE@.desktop - -desktop-file-install --mode 644 \ - --dir $RPM_BUILD_ROOT/%{_datadir}/applications \ - --add-category System \ - --add-category TerminalEmulator \ - @PACKAGE@.desktop - -%if 0%{?_ooRexx} == 0 -# remove rexx-files from builddir if it's disabled -rm -f ${RPM_BUILD_ROOT}/%{_datadir}/@PACKAGE@/ui/80rexx.xml -%endif - -%if 0%{?_java} == 0 -# remove java-files from builddir if it's disabled -rm ${RPM_BUILD_ROOT}/%{_datadir}/@PACKAGE@/ui/*java*.xml -%endif - -find ${RPM_BUILD_ROOT} - -%clean -rm -rf %{buildroot} - -#---[ Files ]--------------------------------------------------------------------------------------------------------- - -%files -f langfiles -%defattr(-,root,root) -%doc AUTHORS LICENSE -%{_mandir}/*/* - -# Main application -%dir %{_datadir}/@PACKAGE@ -%dir %{_datadir}/@PACKAGE@/ui -%{_bindir}/@PACKAGE@ -%{_libdir}/lib@PACKAGE@.so.5 -%{_libdir}/lib@PACKAGE@.so.%version - -%{_datadir}/applications/@PACKAGE@.desktop - -%{_datadir}/@PACKAGE@/ui/00default.xml -%{_datadir}/@PACKAGE@/ui/10functions.xml -%{_datadir}/@PACKAGE@/ui/10keypad.xml -%{_datadir}/@PACKAGE@/colors.conf -%{_datadir}/@PACKAGE@/@PACKAGE@.png -%{_datadir}/@PACKAGE@/@PACKAGE@-logo.png -%{_datadir}/locale/pt_BR/LC_MESSAGES/@PACKAGE@.mo -%dir %{_libdir}/@PACKAGE@-plugins - -%files -n lib3270-%LIBVERSION -%defattr(-,root,root) -%{_libdir}/lib3270.so.%version -%{_libdir}/lib3270.so.5 - -%files -n lib3270-devel -%defattr(-,root,root) -%{_includedir}/lib3270 -%{_includedir}/lib3270.h -%{_libdir}/pkgconfig/lib3270.pc -%{_libdir}/lib3270.so - -%files -n @PACKAGE@-devel -%defattr(-,root,root) -%{_includedir}/@PACKAGE@ -%{_includedir}/@PACKAGE@.h -%{_datadir}/@PACKAGE@/ui/98trace.xml -%{_datadir}/@PACKAGE@/ui/99debug.xml -%{_libdir}/lib@PACKAGE@.so -%{_libdir}/pkgconfig/@PACKAGE@.pc - -%{_libdir}/lib@PACKAGE@cpp.a -%{_includedir}/@PACKAGE@cpp.h - -%dir %{_datadir}/@PACKAGE@/sample -%{_datadir}/@PACKAGE@/sample/* - -%if 0%{?_dbus} -%files plugin-dbus -%defattr(-,root,root) -%{_libdir}/@PACKAGE@-plugins/dbus3270.so -%endif - -%if 0%{?_office} -%files -n %{name}-libreoffice -%defattr(-,root,root) -%dir %{_libdir}/libreoffice/share/extensions/%{name} -%dir %{_libdir}/libreoffice/share/extensions/%{name}/META-INF -%{_libdir}/libreoffice/share/extensions/%{name}/META-INF/manifest.xml -%{_libdir}/libreoffice/share/extensions/%{name}/description.txt -%{_libdir}/libreoffice/share/extensions/%{name}/description.xml -%{_libdir}/libreoffice/share/extensions/%{name}/@PACKAGE@.png -%{_libdir}/libreoffice/share/extensions/%{name}/@PACKAGE@.rdb -%{_libdir}/libreoffice/share/extensions/%{name}/@PACKAGE@.uno.so -%endif - -%if 0%{?_ooRexx} -%files -n %{name}-plugin-rexx -%defattr(-,root,root) -%{_rexxlibdir}/librx3270.so.%version -%{_rexxlibdir}/librx3270.so -%{_rexxclassdir}/rx3270.cls -%{_libdir}/@PACKAGE@-plugins/rx3270.so -%{_datadir}/@PACKAGE@/ui/80rexx.xml -%endif - -%if 0%{?_php} -%files -n php%{_php}-tn3270 -%defattr(-,root,root) -%config %{_phpconf}/tn3270.ini -%{_phpextdir}/*.so -%endif - -%if 0%{?_python} -%files -n python-tn3270 -%defattr(-,root,root) -%{pythonextpath}/py3270.so -%endif - -%if 0%{?_java} -%files java -%defattr(-,root,root) -%dir %{_jnidir} -%dir %{_jvmjardir} - -%{_jnidir}/libjni3270.so -%{_jvmjardir}/@PACKAGE@.jar - -%files plugin-java -%defattr(-,root,root) -%{_libdir}/@PACKAGE@-plugins/j3270.so - -%files javadoc -%defattr(-,root,root) -%dir %{_javadocdir} -%{_javadocdir}/%{name} -%{_datadir}/@PACKAGE@/ui/*java*.xml -%endif - -#---[ Scripts ]------------------------------------------------------------------------------------------------------- - -%post -/sbin/ldconfig -exit 0 - -%postun -/sbin/ldconfig -exit 0 - -%post -n lib3270-%LIBVERSION -/sbin/ldconfig -exit 0 - -%postun -n lib3270-%LIBVERSION -/sbin/ldconfig -exit 0 - -%if 0%{?_ooRexx} -%post -n %{name}-plugin-rexx -/sbin/ldconfig -exit 0 - -%postun -n %{name}-plugin-rexx -/sbin/ldconfig -exit 0 -%endif - -%changelog diff --git a/rpm/install-cross.sh b/rpm/install-cross.sh new file mode 100755 index 0000000..cbcb952 --- /dev/null +++ b/rpm/install-cross.sh @@ -0,0 +1,100 @@ +#!/bin/bash + +install_packages() +{ + +TEMPFILE=$(mktemp) + +cat > ${TEMPFILE} << EOF +libopenssl-devel +libintl-devel +libepoxy0 +libgdk_pixbuf-2_0-0 +atk-devel +pango-devel +win_iconv-devel +pixman-devel +glib2-devel +cairo-devel +freetype-devel +winpthreads-devel +gtk3-devel +cross-gcc-c++ +cross-pkg-config +cross-cpp +cross-binutils +cross-nsis +filesystem +gettext-tools +gtk3-data +gtk3-tools +headers +gnome-icon-theme +hicolor-icon-theme +gdk-pixbuf-loader-rsvg +gdk-pixbuf-query-loaders +EOF + +# python-devel + +# Instala apicativos e temas necessários +sudo zypper --non-interactive in \ + adwaita-icon-theme \ + gettext-tools \ + glib2-devel + +while read FILE +do + sudo zypper --non-interactive in ${1}-${FILE} +done < ${TEMPFILE} + +rm -f ${TEMPFILE} + +} + +if [ -z ${1} ]; then + echo "Use ${0} --32 for 32 bits cross-compiler" + echo "Use ${0} --64 for 64 bits cross-compiler" + exit -1 +fi + + +until [ -z "${1}" ] +do + if [ ${1:0:2} = '--' ]; then + tmp=${1:2} + parameter=${tmp%%=*} + parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") + + case $parameter in + + ar) + zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_42.1/ mingw32 + zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_42.1/ mingw64 + ;; + + 32) + install_packages mingw32 + ;; + + 64) + install_packages mingw64 + ;; + + ALL) + install_packages mingw32 + install_packages mingw64 + ;; + + + *) + value=${tmp##*=} + eval $parameter=$value + esac + + fi + + shift +done + + diff --git a/rpm/pw3270.spec b/rpm/pw3270.spec new file mode 100644 index 0000000..2b43bb7 --- /dev/null +++ b/rpm/pw3270.spec @@ -0,0 +1,585 @@ +# +# spec file for package @PACKAGE@ +# +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (C) <2008> +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +%define LIBVERSION @MAJOR_VERSION@_@MINOR_VERSION@ + +# +# References: +# +# https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto#Detect_a_distribution_flavor_for_special_code +# + +%define _dbus 1 +%define _office 0 +%define _php 0 +%define _ooRexx 1 +%define _java 0 +%define _python 1 + +%define _distro linux + +#---[ Packaging ]----------------------------------------------------------------------------------------------------- + +Name: @PACKAGE@ +Version: @PACKAGE_VERSION@ +Release: @PACKAGE_LEVEL@ +Summary: IBM 3270 Terminal emulator for GTK +License: GPL-2.0 +Group: System/X11/Terminals +Url: https://portal.softwarepublico.gov.br/social/pw3270/ + +Source: %{name}-%{version}.tar.bz2 + +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +Requires: lib3270 = %{version} +Requires: shared-mime-info + +Provides: lib@PACKAGE@ = %{version} +Provides: lib@PACKAGE@.so = %{version} + +#--[ Red HAT ]-------------------------------------------------------------------------------------------------------- + +%if 0%{?rhel_version} + +%define _distro rhel%{rhel_version} + +BuildRequires: dbus-devel +BuildRequires: dbus-glib-devel +BuildRequires: openssl-devel + +%define _office 0 +%define _php 0 + +%if 0%{?rhel_version} >= 0700 + +# RHEL 7.0 + +BuildRequires: gtk3-devel + +%else + +# RHEL 6.0 +%define _python 0 + +BuildRequires: gtk2-devel +BuildRequires: java-1.6.0-devel + +%endif + +%endif + +#--[ CentOS ]--------------------------------------------------------------------------------------------------------- + +%if 0%{?centos_version} + +%define _distro centos%{centos_version} + +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(dbus-glib-1) +BuildRequires: pkgconfig(openssl) + +%if 0%{?centos_version} >= 0700 + +# CentOS 7 + +%define _php 5 +BuildRequires: php-devel + +%define _office 0 + +BuildRequires: pkgconfig(gtk+-3.0) + +%else + +# CentOS 6 + +%define _office 0 +%define _python 0 + +BuildRequires: gtk2-devel +BuildRequires: java-1.8.0-devel + +%endif + +%endif + +#--[ Fedora ]--------------------------------------------------------------------------------------------------------- + +%if 0%{?fedora} + +%define _distro fedora%{fedora} + +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(dbus-glib-1) +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(openssl) + +%define _php 5 +BuildRequires: php-devel + +%if 0%{?fedora} >= 21 + +# Fedora 21 fails on libreoffice sdk +%define _office 0 + +%else + +#%define _office 0 +#BuildRequires: libreoffice-sdk +#BuildRequires: libreoffice-ure +#BuildRequires: librsvg2-tools + +%endif + +%endif + +#--[ SuSE ]----------------------------------------------------------------------------------------------------------- + +%if 0%{?suse_version} + +# https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros#.25sles_version +%if 0%{?sles_version} + %define _distro sles%{sles_version} + %define _office 0 +%else +%if 0%{?sled_version} + %define _distro sled%{sled_version} + %define _office 0 +%else + %define _distro suse%{suse_version} +%endif + +%endif + +BuildRequires: libopenssl-devel +BuildRequires: rsvg-view + +# OpenSUSE >= 12.2 enable GTK3 & D-Bus +%if 0%{?suse_version} >= 1220 + +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(dbus-glib-1) +BuildRequires: pkgconfig(gtk+-3.0) + +%else + +%define _dbus 0 +%define _python 0 +BuildRequires: gtk2-devel + +%endif + +# OpenSUSE >= 13.1 uses PHP5 +%if 0%{?suse_version} >= 1310 +%define _php 5 +BuildRequires: php%{_php}-devel +%endif + +%endif + +#--------------------------------------------------------------------------------------------------------------------- + +BuildRequires: autoconf >= 2.61 +BuildRequires: automake +BuildRequires: binutils +BuildRequires: coreutils + +%if 0%{?_ooRexx} +BuildRequires: ooRexx-devel >= 4.2.0 +%endif + +%if 0%{?_python} +BuildRequires: python +BuildRequires: python-devel + +%define pythonextpath %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()") +%endif + +%if 0%{?_php} +%define _phpextdir %(php-config --extension-dir) +%define _phpconf %(php-config | sed 's@ @\\n@g' | grep "^--with-config-file-scan-dir=" | cut -d= -f2) +%endif + +%if 0%{?_java} +BuildRequires: java-devel +BuildRequires: javapackages-tools +%endif + +BuildRequires: desktop-file-utils +BuildRequires: findutils +BuildRequires: gcc-c++ +BuildRequires: gettext-devel +BuildRequires: m4 +BuildRequires: pkgconfig +BuildRequires: sed + + +%description +Open-source GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET. +Based on the original x3270 code, pw3270 was originally created for Banco do Brasil, and is now used worldwide. + +#--[ lib3270 ]-------------------------------------------------------------------------------------------------------- + +%package -n lib3270-%LIBVERSION +Summary: 3270 Communication library for %{name} +Group: Development/Libraries/C and C++ +Requires: openssl +Provides: lib3270 + +%description -n lib3270-%LIBVERSION +Open-source GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET. + +This package contains the tn3270 protocol library for %{name} + +#--[ Devel ]---------------------------------------------------------------------------------------------------------- + +%package -n lib3270-devel +Summary: Devel for 3270 Communication library for %{name} +Group: Development/Libraries/C and C++ +Requires: lib3270-%LIBVERSION = %{version} + +%description -n lib3270-devel +Open-source GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET. +This package contains the development files for tn3270 protocol library for %{name} + +%package -n @PACKAGE@-devel +Summary: Files required for development of %{name} plugins +Group: Development/Libraries/C and C++ +Requires: lib3270-devel = %{version} +Requires: @PACKAGE@ = %{version} + +%description -n @PACKAGE@-devel +Open-source GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET. + +This package contains the development files for %{name} + +#--[ Plugins ]-------------------------------------------------------------------------------------------------------- + +%if 0%{?_dbus} +%package plugin-dbus +Summary: DBUS object for %{name} +Group: System/X11/Terminals +Requires: %{name} = %{version} +Requires: dbus-1 + +%description plugin-dbus +Plugin exporting a DBUS object from every %{name} open session. +%endif + +%if 0%{?_ooRexx} +%package -n %{name}-plugin-rexx +Summary: Rexx class for 3270 access +Group: Development/Languages/Other +Requires: lib3270 = %{version} +Requires: ooRexx >= 4.1 + +%description -n %{name}-plugin-rexx +This package provides Rexx class and associated libraries +allowing rexx scripts to access tn3270e hosts. +%endif + +#--[ Extensions ]----------------------------------------------------------------------------------------------------- + +%if 0%{?_office} +%package -n %{name}-libreoffice +Summary: 3270 host access extension for libreoffice +Group: Productivity/Office/Suite +Requires: lib3270 = %{version} +Requires: libreoffice + +%description -n %{name}-libreoffice +This package provides 3270 access object to StarBasic. +%endif + +%if 0%{?_php} +%package -n php%{_php}-tn3270 +Summary: PHP%{_php} Extension Module implementing tn3270 protocol +Group: Development/Libraries/PHP +Requires: lib3270 = %{version} + +%description -n php%{_php}-tn3270 +This is an extension for acessing 3270 hosts directly +from PHP apps. +%endif + +%if 0%{?_python} +%package -n python-tn3270 +Summary: Python Extension Module implementing tn3270 protocol +Group: Development/Libraries/Python +Requires: lib3270 = %{version} + +%description -n python-tn3270 +This is an extension for acessing 3270 hosts directly +from python apps. +%endif + +%if 0%{?_java} +%package java +Summary: Java class to interact with @PACKAGE@ +Group: Development/Libraries/Java +Requires: javapackages-tools +Requires: lib3270 = %{version} + +%description java +Java class for lib3270/@PACKAGE@ interaction. + +%package plugin-java +Summary: Java plugin for %{name} +Group: Development/Libraries/Java +Requires: %{name} = %{version} +Requires: %{name}-java = %{version} + +%description plugin-java +This package provides a plugin allowing calling of java classes +from @PACKAGE@ application. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation +Requires: jpackage-utils + +%description javadoc +API documentation for %{name}. +%endif + +#---[ Build & Install ]----------------------------------------------------------------------------------------------- + +%prep + +echo "Distribution: %{_distro}" + +%if 0%{?_php} + echo " * PHP%{_php} is enabled" +%endif +%if 0%{?_dbus} + echo " * DBUS is enabled" +%endif + +%setup -q -n %{name}-%{version} +find . -exec touch {} \; +aclocal +autoconf + +export CFLAGS="$RPM_OPT_FLAGS" +export CXXFLAGS="$RPM_OPT_FLAGS" +export FFLAGS="$RPM_OPT_FLAGS" + +%if 0%{?_java} +export JAVA_HOME=%{java_home} +echo "JAVA_HOME=$JAVA_HOME" +echo "javadocdir=%{_javadocdir}" +%endif + +%configure --disable-strip \ + --enable-pic \ + --with-jnidir="%{_jnidir}" \ + --with-jvmjardir="%{_jvmjardir}" \ + --with-javadocdir="%{_javadocdir}" + +%build +make clean +make all + +%install +export NO_BRP_CHECK_BYTECODE_VERSION=true + +make DESTDIR=$RPM_BUILD_ROOT install + +find $RPM_BUILD_ROOT + +%find_lang %{name} langfiles + +cat > @PACKAGE@.desktop << EOF +[Desktop Entry] +X-SuSE-translate=true +GenericName=@PACKAGE@ +Name=3270 Terminal +Comment=IBM 3270 Terminal emulator +Exec=@PACKAGE@ +Icon=%{_datadir}/@PACKAGE@/@PACKAGE@.png +Terminal=false +Type=Application +StartupNotify=true +EOF +chmod 644 @PACKAGE@.desktop + +desktop-file-install --mode 644 \ + --dir $RPM_BUILD_ROOT/%{_datadir}/applications \ + --add-category System \ + --add-category TerminalEmulator \ + @PACKAGE@.desktop + +%if 0%{?_ooRexx} == 0 +# remove rexx-files from builddir if it's disabled +rm -f ${RPM_BUILD_ROOT}/%{_datadir}/@PACKAGE@/ui/80rexx.xml +%endif + +%if 0%{?_java} == 0 +# remove java-files from builddir if it's disabled +rm ${RPM_BUILD_ROOT}/%{_datadir}/@PACKAGE@/ui/*java*.xml +%endif + +find ${RPM_BUILD_ROOT} + +%clean +rm -rf %{buildroot} + +#---[ Files ]--------------------------------------------------------------------------------------------------------- + +%files -f langfiles +%defattr(-,root,root) +%doc AUTHORS LICENSE +%{_mandir}/*/* + +# Main application +%dir %{_datadir}/@PACKAGE@ +%dir %{_datadir}/@PACKAGE@/ui +%{_bindir}/@PACKAGE@ +%{_libdir}/lib@PACKAGE@.so.5 +%{_libdir}/lib@PACKAGE@.so.%version + +%{_datadir}/applications/@PACKAGE@.desktop + +%{_datadir}/@PACKAGE@/ui/00default.xml +%{_datadir}/@PACKAGE@/ui/10functions.xml +%{_datadir}/@PACKAGE@/ui/10keypad.xml +%{_datadir}/@PACKAGE@/colors.conf +%{_datadir}/@PACKAGE@/@PACKAGE@.png +%{_datadir}/@PACKAGE@/@PACKAGE@-logo.png +%{_datadir}/locale/pt_BR/LC_MESSAGES/@PACKAGE@.mo +%dir %{_libdir}/@PACKAGE@-plugins + +%files -n lib3270-%LIBVERSION +%defattr(-,root,root) +%{_libdir}/lib3270.so.%version +%{_libdir}/lib3270.so.5 + +%files -n lib3270-devel +%defattr(-,root,root) +%{_includedir}/lib3270 +%{_includedir}/lib3270.h +%{_libdir}/pkgconfig/lib3270.pc +%{_libdir}/lib3270.so + +%files -n @PACKAGE@-devel +%defattr(-,root,root) +%{_includedir}/@PACKAGE@ +%{_includedir}/@PACKAGE@.h +%{_datadir}/@PACKAGE@/ui/98trace.xml +%{_datadir}/@PACKAGE@/ui/99debug.xml +%{_libdir}/lib@PACKAGE@.so +%{_libdir}/pkgconfig/@PACKAGE@.pc + +%{_libdir}/lib@PACKAGE@cpp.a +%{_includedir}/@PACKAGE@cpp.h + +%dir %{_datadir}/@PACKAGE@/sample +%{_datadir}/@PACKAGE@/sample/* + +%if 0%{?_dbus} +%files plugin-dbus +%defattr(-,root,root) +%{_libdir}/@PACKAGE@-plugins/dbus3270.so +%endif + +%if 0%{?_office} +%files -n %{name}-libreoffice +%defattr(-,root,root) +%dir %{_libdir}/libreoffice/share/extensions/%{name} +%dir %{_libdir}/libreoffice/share/extensions/%{name}/META-INF +%{_libdir}/libreoffice/share/extensions/%{name}/META-INF/manifest.xml +%{_libdir}/libreoffice/share/extensions/%{name}/description.txt +%{_libdir}/libreoffice/share/extensions/%{name}/description.xml +%{_libdir}/libreoffice/share/extensions/%{name}/@PACKAGE@.png +%{_libdir}/libreoffice/share/extensions/%{name}/@PACKAGE@.rdb +%{_libdir}/libreoffice/share/extensions/%{name}/@PACKAGE@.uno.so +%endif + +%if 0%{?_ooRexx} +%files -n %{name}-plugin-rexx +%defattr(-,root,root) +%{_rexxlibdir}/librx3270.so.%version +%{_rexxlibdir}/librx3270.so +%{_rexxclassdir}/rx3270.cls +%{_libdir}/@PACKAGE@-plugins/rx3270.so +%{_datadir}/@PACKAGE@/ui/80rexx.xml +%endif + +%if 0%{?_php} +%files -n php%{_php}-tn3270 +%defattr(-,root,root) +%config %{_phpconf}/tn3270.ini +%{_phpextdir}/*.so +%endif + +%if 0%{?_python} +%files -n python-tn3270 +%defattr(-,root,root) +%{pythonextpath}/py3270.so +%endif + +%if 0%{?_java} +%files java +%defattr(-,root,root) +%dir %{_jnidir} +%dir %{_jvmjardir} + +%{_jnidir}/libjni3270.so +%{_jvmjardir}/@PACKAGE@.jar + +%files plugin-java +%defattr(-,root,root) +%{_libdir}/@PACKAGE@-plugins/j3270.so + +%files javadoc +%defattr(-,root,root) +%dir %{_javadocdir} +%{_javadocdir}/%{name} +%{_datadir}/@PACKAGE@/ui/*java*.xml +%endif + +#---[ Scripts ]------------------------------------------------------------------------------------------------------- + +%post +/sbin/ldconfig +exit 0 + +%postun +/sbin/ldconfig +exit 0 + +%post -n lib3270-%LIBVERSION +/sbin/ldconfig +exit 0 + +%postun -n lib3270-%LIBVERSION +/sbin/ldconfig +exit 0 + +%if 0%{?_ooRexx} +%post -n %{name}-plugin-rexx +/sbin/ldconfig +exit 0 + +%postun -n %{name}-plugin-rexx +/sbin/ldconfig +exit 0 +%endif + +%changelog diff --git a/rpm/rpmlintrc b/rpm/rpmlintrc new file mode 100644 index 0000000..8f9d73b --- /dev/null +++ b/rpm/rpmlintrc @@ -0,0 +1,7 @@ +# Requires for ooRexx plugin +addFilter("devel-file-in-non-devel-package.*/usr/lib.*") + +# Requires for Libreoffice (starts whith lib but isn't a library) +addFilter("shlib-policy-nonversioned-dir.*/libreoffice") +addFilter("explicit-lib-dependency libreoffice") + diff --git a/rpmlintrc b/rpmlintrc deleted file mode 100644 index 8f9d73b..0000000 --- a/rpmlintrc +++ /dev/null @@ -1,7 +0,0 @@ -# Requires for ooRexx plugin -addFilter("devel-file-in-non-devel-package.*/usr/lib.*") - -# Requires for Libreoffice (starts whith lib but isn't a library) -addFilter("shlib-policy-nonversioned-dir.*/libreoffice") -addFilter("explicit-lib-dependency libreoffice") - diff --git a/win/hllapipacket.sh b/win/hllapipacket.sh new file mode 100755 index 0000000..2b7dc2c --- /dev/null +++ b/win/hllapipacket.sh @@ -0,0 +1,136 @@ +#!/bin/bash + + +# +# Gera binários windows +# +# $1 = Arquitetura (x86_32/x86_64) +# +build() +{ + echo -e "\e]2;${PACKAGE_NAME}-${1}\a" + + case ${1} in + x86_32) + host=i686-w64-mingw32 + host_cpu=i686 + prefix=/usr/i686-w64-mingw32/sys-root/mingw + tools=i686-w64-mingw32 + ;; + + x86_64) + host=x86_64-w64-mingw32 + host_cpu=x86_64 + prefix=/usr/x86_64-w64-mingw32/sys-root/mingw + tools=x86_64-w64-mingw32 + ;; + + + *) + failed "Arquitetura desconhecida: ${1}" + + esac + + # Detecto argumentos + ARGS="" + + ./configure \ + --cache-file=.${1}.cache \ + --host=${host} \ + --prefix=${prefix} \ + --disable-rexx + --disable-java \ + --disable-office + + if [ "$?" != "0" ]; then + failed "Erro ao configurar" + fi + + make clean + rm -f *.exe + + make Release + if [ "$?" != "0" ]; then + failed "Erro ao compilar fontes" + fi + + mkdir -p ${TEMPDIR}/package/${host_cpu} + + cp -v .bin/Release/hllapi.dll* ${TEMPDIR}/package/${host_cpu} + if [ "$?" != "0" ]; then + failed "Erro ao copiar pacotes" + fi + + make clean + rm -f *.exe + +} + +myDIR=$(readlink -f $(dirname $0)) +TEMPDIR=$(mktemp -d) +DESTDIR=${HOME}/public_html/win +RUNTIMEDIR=$(mktemp -d) +ARCHS="x86_32 x86_64" +RUNTIME=1 +COMPLETE=1 + +trap cleanup INT + +until [ -z "$1" ] +do + if [ ${1:0:2} = '--' ]; then + tmp=${1:2} + parameter=${tmp%%=*} + parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") + + case $parameter in + + 32) + ARCHS="x86_32" + ;; + + 64) + ARCHS="x86_64" + ;; + + OUT) + DESTDIR=$value + ;; + + ARCH) + value=${tmp##*=} + ARCHS=$value + ;; + + *) + value=${tmp##*=} + eval $parameter=$value + esac + + fi + + shift +done + +# Configura +aclocal +if [ "$?" != "0" ]; then + exit -1 +fi + +autoconf +if [ "$?" != "0" ]; then + exit -1 +fi + +# Gera pacotes +for i in ${ARCHS}; do + + build "${i}" + +done + +cd ${TEMPDIR}/package + +zip -9 -m -r ~/public_html/win/hllapi_$(date "+%Y%m%d").zip . + diff --git a/win/makegtkruntime.sh.in b/win/makegtkruntime.sh.in new file mode 100644 index 0000000..68cdd8b --- /dev/null +++ b/win/makegtkruntime.sh.in @@ -0,0 +1,356 @@ +#!/bin/bash +PKG_CONFIG="@PKG_CONFIG@" +GTK_VERSION="gtk+-@GTK_VERSION@" + +GTK_PREFIX=$($PKG_CONFIG --variable=prefix $GTK_VERSION) +TARGET_PATH=".bin/gtkruntime" + +# Clean target folder +rm -fr "$TARGET_PATH/*" +mkdir -p "$TARGET_PATH" + +copyFile() { + + GTKPATH=$(find "$GTK_PREFIX/bin" -name "$1") + SYSPATH=$(find "/bin" -name "$1") + + if [ ! -z "$GTKPATH" ]; then + echo "$GTKPATH ..." + cp $GTKPATH "$TARGET_PATH" + if [ "$?" != "0" ]; then + echo "Can´t copy $GTKPATH" + return 1 + fi + elif [ ! -z "$SYSPATH" ]; then + echo "$SYSPATH ..." + cp $SYSPATH "$TARGET_PATH" + if [ "$?" != "0" ]; then + echo "Can´t copy $SYSPATH" + return 1 + fi + + else + echo "Can´t find ${GTK_PREFIX}/bin/${1}" + return 1 + fi + + return 0 +} + +copyFiles() { + + while read FILE + do + copyFile "$FILE" + if [ "$?" != "0" ]; then + exit -1 + fi + done < $1 + rm -f $1 + +} + +copy_locale() { + + rm -fr $TARGET_PATH/share/locale/pt_BR/LC_MESSAGES + mkdir -p $TARGET_PATH/share/locale/pt_BR/LC_MESSAGES + + while read FILE + do + echo "$GTK_PREFIX/share/locale/pt_BR/LC_MESSAGES/$FILE ..." + + if [ -e "$GTK_PREFIX/share/locale/pt_BR/LC_MESSAGES/$FILE" ]; then + cp "$GTK_PREFIX/share/locale/pt_BR/LC_MESSAGES/$FILE" "$TARGET_PATH/share/locale/pt_BR/LC_MESSAGES" + if [ "$?" != "0" ]; then + echo "Can´t copy $FILE" + exit -1 + fi + fi + + done < $1 + rm -f $1 +} + +CopyGTK3Theme() { + + mkdir -p ${TARGET_PATH}/share/icons + if [ "$?" != 0 ]; then + echo "Can´t create icons folder" + exit -1 + fi + + cp -rv /usr/share/icons/${1} ${TARGET_PATH}/share/icons + if [ "$?" != 0 ]; then + echo "Can´t copy ${1} icons" + exit -1 + fi + + mkdir -p ${TARGET_PATH}/share/themes + if [ "$?" != 0 ]; then + echo "Can´t create themes folder" + exit -1 + fi + + cp -rv /usr/share/themes/${1} ${TARGET_PATH}/share/themes + if [ "$?" != 0 ]; then + echo "Can´t copy ${1} theme" + exit -1 + fi + + +} + + +gtk3() { + +TEMPFILE="temp1.tmp" +cat > $TEMPFILE << EOF +libglib-*.dll +libintl*.dll +libgmodule*.dll +libgobject*.dll +libffi*.dll +libgtk-*.dll +libgdk-*.dll +libcairo-gobject*.dll +libcairo-2*.dll +libfontconfig-1*.dll +libfreetype-6*.dll +zlib1.dll +libxml2-*.dll +libpixman-1*.dll +libpng*.dll +libgdk_pixbuf*.dll +libgio-*.dll +libjasper-*.dll +libjpeg-8*.dll +libtiff-5*.dll +liblzma-5*.dll +libpango-1*.dll +libpangocairo-1*.dll +libpangoft2-1*.dll +libpangowin32-1*.dll +libatk-*.dll +libcrypto-*.dll +libssl-*.dll +libharfbuzz-0.dll +libstdc++-6.dll +icule53.dll +icuuc53.dll +icudata53.dll +libgraphite2.dll +librsvg-*.dll +libepoxy-*.dll +gspawn-win*-helper-console.exe +gspawn-win*-helper.exe +gdk-pixbuf-query-loaders.exe +EOF +copyFiles $TEMPFILE + + +# Copy loaders +GDK_LOADERS=$(${PKG_CONFIG} --variable=gdk_pixbuf_binarydir gdk-pixbuf-2.0)/loaders +GDK_PREFIX=$(${PKG_CONFIG} --variable=prefix gdk-pixbuf-2.0) +GDK_TARGET=$(echo ${GDK_LOADERS}/ | sed -e "s@${GDK_PREFIX}@@g") + +mkdir -p ${TARGET_PATH}/${GDK_TARGET} + +cp -v ${GDK_LOADERS}/* ${TARGET_PATH}/${GDK_TARGET} +if [ "$?" != 0 ]; then + echo "Can´t copy loaders" + exit -1 +fi + + +# Copy optional files +copyFile libgcc_s_sjlj-1.dll +copyFile libgcc_s_seh-1.dll + +# Build locale dirs +cat > $TEMPFILE << EOF +atk10.mo +gdk-pixbuf.mo +glib20.mo +gtk30-properties.mo +EOF + +copy_locale $TEMPFILE + +mkdir -p $TARGET_PATH/share/glib-2.0/schemas +if [ "$?" != 0 ]; then + echo "Can´t create schemas folder" + exit -1 +fi + +if [ ! -e $GTK_PREFIX/share/glib-2.0/schemas/gschemas.compiled ]; then + glib-compile-schemas $GTK_PREFIX/share/glib-2.0/schemas +fi + +cp $GTK_PREFIX/share/glib-2.0/schemas/gschemas.compiled $TARGET_PATH/share/glib-2.0/schemas/gschemas.compiled +if [ "$?" != 0 ]; then + echo "Can´t copy gshemas.compiled" + exit -1 +fi + +# Copia Adwaita +CopyGTK3Theme "Adwaita" + +#mkdir -p $TARGET_PATH/share/icons/Adwaita +#if [ "$?" != 0 ]; then +# echo "Can´t create icons folder" +# exit -1 +#fi +# +#cp -rv /usr/share/icons/Adwaita $TARGET_PATH/share/icons/Adwaita +#if [ "$?" != 0 ]; then +# echo "Can´t copy icons" +# exit -1 +#fi +# +#mkdir -p $TARGET_PATH/share/themes/Adwaita +#if [ "$?" != 0 ]; then +# echo "Can´t create Adwaita theme" +# exit -1 +#fi +# +#cp -rv /usr/share/themes/Adwaita $TARGET_PATH/share/themes/Adwaita +#if [ "$?" != 0 ]; then +# echo "Can´t copy Adwaita theme" +# exit -1 +#fi + + +# Copia gnome +#mkdir -p $TARGET_PATH/share/icons/gnome +#if [ "$?" != 0 ]; then +# echo "Can´t create icons folder" +# exit -1 +#fi +# +#cp -rv $GTK_PREFIX/share/icons/gnome $TARGET_PATH/share/icons/gnome +#if [ "$?" != 0 ]; then +# echo "Can´t copy icons" +# exit -1 +#fi + +mkdir -p $TARGET_PATH/etc +cp -rv $GTK_PREFIX/etc/gtk-3.0 $TARGET_PATH/etc/gtk-3.0 +if [ "$?" != 0 ]; then + echo "Can´t copy theme" + exit -1 +fi + +cat > $TARGET_PATH/etc/gtk-3.0/settings.ini << EOF +[Settings] +gtk-theme-name = Adwaita +gtk-icon-theme-name = Adwaita +gtk-fallback-icon-theme = Adwaita +gtk-font-name = Sans 10 +gtk-button-images = 1 +EOF +} + +gtk2() { + +# Build DLL list +TEMPFILE="temp1.tmp" +cat > $TEMPFILE << EOF +intl.dll +libatk-1.0-0.dll +libcairo-2.dll +libgailutil-18.dll +libgdk_pixbuf-2.0-0.dll +libgdk-win32-2.0-0.dll +libgettextlib-0-*.dll +libgettextpo*.dll +libgettextsrc*.dll +libgio-2.0-0.dll +libglib-2.0-0.dll +libgmodule-2.0-0.dll +libgobject-2.0-0.dll +libgthread-2.0-0.dll +libgtk-win32-2.0-0.dll +libpango-1.0-0.dll +libpangocairo-1.0-0.dll +libpangoft2-1.0-0.dll +libpangowin32-1.0-0.dll +zlib1.dll +libpng*.dll +libfontconfig*.dll +libasprintf*.dll +libgettextlib*.dll +libexpat*.dll +freetype*.dll +gspawn-win32-helper-console.exe +gspawn-win32-helper.exe +gdk-pixbuf-query-loaders.exe +EOF + +# jpeg62.dll +# libtiff*.dll +copyFiles $TEMPFILE + +# Build locale dirs +cat > $TEMPFILE << EOF +atk10.mo +gdk-pixbuf.mo +gettext-runtime.mo +gettext-tools.mo +glib20.mo +gtk20-properties.mo +gtk20.mo +libiconv.mo +EOF + +copy_locale $TEMPFILE + +# Copy default theme +THEME_PATH="themes/MS-Windows/gtk-2.0" +rm -fr "$TARGET_PATH/$THEME_PATH" +mkdir -p "$TARGET_PATH/share/$THEME_PATH" + +echo "$GTK_PREFIX/share/$THEME_PATH/gtkrc ..." +cp "$GTK_PREFIX/share/$THEME_PATH/gtkrc" "$TARGET_PATH/share/$THEME_PATH/gtkrc" +if [ "$?" != "0" ]; then + echo "Can´t copy default theme" + exit -1 +fi + +cat > $TEMPFILE << EOF +engines +loaders +EOF + +rm -fr $TARGET_PATH/lib/gtk-2.0/$GTK_RUNTIME_VERSION/ +mkdir -p $TARGET_PATH/lib/gtk-2.0/$GTK_RUNTIME_VERSION/ +while read DIRNAME +do + if [ -d "$GTK_PREFIX/lib/gtk-2.0/$GTK_RUNTIME_VERSION/$DIRNAME" ]; then + echo "$GTK_PREFIX/lib/gtk-2.0/$GTK_RUNTIME_VERSION/$DIRNAME ..." + mkdir -p "$TARGET_PATH/lib/gtk-2.0/$GTK_RUNTIME_VERSION/$DIRNAME" + cp -r "$GTK_PREFIX/lib/gtk-2.0/$GTK_RUNTIME_VERSION/$DIRNAME" "$TARGET_PATH/lib/gtk-2.0/$GTK_RUNTIME_VERSION" + if [ "$?" != "0" ]; then + echo "Can´t copy $DIRNAME" + exit -1 + fi + fi +done < $TEMPFILE +rm -f $TEMPFILE + +mkdir -p $TARGET_PATH/etc/gtk-2.0/ +echo "gtk-theme-name = \"MS-Windows\"" > $TARGET_PATH/etc/gtk-2.0/gtkrc +if [ "$?" != "0" ]; then + echo "Can´t set theme name" + exit -1 +fi + +} + +if [ "$GTK_VERSION" == "gtk+-3.0" ]; then + gtk3 +else + gtk2 +fi + +echo $0 Complete + diff --git a/win/winpacket.sh b/win/winpacket.sh new file mode 100755 index 0000000..91cf30d --- /dev/null +++ b/win/winpacket.sh @@ -0,0 +1,355 @@ +#!/bin/bash + +PACKAGE_NAME="pw3270" + +cleanup() +{ + # + # Apaga diretorio temporário caso o script seja interrompido + # + cd ${myDIR} + rm -fr ${TEMPDIR} + rm -fr ${RUNTIMEDIR} + exit -1 +} + +failed() +{ + echo -e "\e]2;Failed!\a" + echo $1 + cleanup +} + +# +# Copia pacote gerado +# +# $1 = Arquitetura (i686/x86_64) +# $2 = Tipo do link +# +CopyPacket() +{ + # + # Primeiro move a versão baseada no runtime + # + FILENAME=$(find nsi -maxdepth 1 -name "${PACKAGE_NAME}-*-requires-gtk-*-${1}.exe" | head --lines 1) + + if [ ! -z ${FILENAME} ]; then + + mkdir -p ${DESTDIR}/${1} + + echo "Copiando ${FILENAME} para ${DESTDIR}/${1}" + + mv "${FILENAME}" "${DESTDIR}/${1}" + if [ "$?" != "0" ]; then + echo "src=${FILENAME}" + echo "dst=${DESTDIR}/${1}" + failed "Erro ao copiar instalador sem o runtime" + fi + + # + # Cria link do pacote sem GTK para "latest" + # + ln -sf $(basename ${FILENAME}) ${DESTDIR}/${1}/${PACKAGE_NAME}-without-gtk-${2}-${1}.exe + if [ "$?" != "0" ]; then + failed "Erro ao criar o link simbólico" + fi + + + fi + + # + # Depois copia o pacote completo + # + FILENAME=$(find nsi -maxdepth 1 -name "${PACKAGE_NAME}-*-gtk-*-${1}.exe" | head --lines 1) + + if [ ! -z ${FILENAME} ]; then + + mkdir -p ${DESTDIR}/${1} + + echo "Copiando ${FILENAME} para ${DESTDIR}/${1}" + + mv "${FILENAME}" "${DESTDIR}/${1}" + if [ "$?" != "0" ]; then + echo "src=${FILENAME}" + echo "dst=${DESTDIR}/${1}" + failed "Erro ao copiar instalador completo" + fi + + # + # Cria link do pacote completo para "latest" + # + ln -sf $(basename ${FILENAME}) ${DESTDIR}/${1}/${PACKAGE_NAME}-with-gtk-${2}-${1}.exe + if [ "$?" != "0" ]; then + failed "Erro ao criar o link simbólico" + fi + + fi + +} + + +# +# Gera pacote windows +# +# $1 = Arquitetura (x86_32/x86_64) +# +build() +{ + echo -e "\e]2;${PACKAGE_NAME}-${1}\a" + + case ${1} in + x86_32) + host=i686-w64-mingw32 + host_cpu=i686 + prefix=/usr/i686-w64-mingw32/sys-root/mingw + tools=i686-w64-mingw32 + ;; + + x86_64) + host=x86_64-w64-mingw32 + host_cpu=x86_64 + prefix=/usr/x86_64-w64-mingw32/sys-root/mingw + tools=x86_64-w64-mingw32 + ;; + + + *) + failed "Arquitetura desconhecida: ${1}" + + esac + + # Detecto argumentos + ARGS="" + + REXXCONFIG=$(which ${tools}-oorexx-config) + if [ -z ${REXXCONFIG} ]; then + echo "Desabilitando suporte ooRexx" + ARGS="${ARGS} --disable-rexx" + fi + + ./configure \ + --cache-file=.${1}.cache \ + --host=${host} \ + --prefix=${prefix} \ + --disable-python \ + ${ARGS} + + if [ "$?" != "0" ]; then + failed "Erro ao configurar" + fi + + make clean + rm -f *.exe + + make -C nsi ${PACKAGE_NAME}-${host_cpu}.nsi + if [ "$?" != "0" ]; then + failed "Erro ao gerar script de empacotamento windows" + fi + + make Release + if [ "$?" != "0" ]; then + failed "Erro ao compilar fontes" + fi + + ln -sf .${prefix}/share/locale .bin/Release/locale + if [ "$?" != "0" ]; then + failed "Erro ao criar link para traduções" + fi + + if [ "${COMPLETE}" != "0" ]; then + + # Gera pacote completo + + chmod +x makegtkruntime.sh + ./makegtkruntime.sh + if [ "$?" != "0" ]; then + failed "Erro ao construir runtime gtk" + fi + + echo -e "\e]2;${PACKAGE_NAME}-install-${host_cpu}.exe\a" + make -C nsi package + if [ "$?" != "0" ]; then + failed "Erro ao gerar pacote windows" + fi + + fi + + if [ "${RUNTIME}" != "0" ]; then + + make -C nsi package-no-gtk + if [ "$?" != "0" ]; then + failed "Erro ao gerar pacote windows" + fi + + fi + + CopyPacket ${host_cpu} "latest" + + make clean + rm -f *.exe + +} + +myDIR=$(readlink -f $(dirname $0)) +TEMPDIR=$(mktemp -d) +DESTDIR=${HOME}/public_html/win +RUNTIMEDIR=$(mktemp -d) +ARCHS="x86_32 x86_64" +RUNTIME=1 +COMPLETE=1 + +find . -exec touch {} \; + +trap cleanup INT + +until [ -z "$1" ] +do + if [ ${1:0:2} = '--' ]; then + tmp=${1:2} + parameter=${tmp%%=*} + parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") + + case $parameter in + + 32) + ARCHS="x86_32" + ;; + + 64) + ARCHS="x86_64" + ;; + + FULL) + RUNTIME=0 + COMPLETE=1 + ;; + + RT) + RUNTIME=1 + COMPLETE=0 + ;; + + NAME) + PACKAGE_NAME=$value + ;; + + OUT) + DESTDIR=$value + ;; + + ARCH) + value=${tmp##*=} + ARCHS=$value + ;; + + *) + value=${tmp##*=} + eval $parameter=$value + esac + + fi + + shift +done + +# Configura +aclocal +if [ "$?" != "0" ]; then + exit -1 +fi + +autoconf +if [ "$?" != "0" ]; then + exit -1 +fi + +# Gera pacotes +for i in ${ARCHS}; do + + build "${i}" + +done + +if [ "${RUNTIME}" == "1" ]; then + + echo -e "\e]2;Baixando runtime\a" + + # + # Puxo scripts de construção do GTK direto da sourceforge. + # + cd ${RUNTIMEDIR} + git clone http://git.code.sf.net/p/gtk3win/code . + if [ "$?" != "0" ]; then + exit -1 + fi + + for i in ${ARCHS}; do + + echo -e "\e]2;gtk-runtime-${i}\a" + + case ${i} in + x86_32) + host_cpu=i686 + ./win32.sh + if [ "$?" != "0" ]; then + exit -1 + fi + ;; + + x86_64) + host_cpu=x86_64 + ./win64.sh + if [ "$?" != "0" ]; then + exit -1 + fi + ;; + + *) + echo "Arquitetura desconhecida ${i}" + exit -1 + + esac + + rm -f gtk-runtime-*-${host_cpu}.exe + + + chmod +x ./makeruntime.sh + + ./makeruntime.sh + if [ "$?" != "0" ]; then + exit -1 + fi + + # Copia o pacote gerado + FILENAME=$(find . -maxdepth 1 -name "gtk-runtime-*-${host_cpu}.exe" | head --lines 1) + + mkdir -p ${DESTDIR}/${host_cpu} + + mv gtk-runtime-*-${host_cpu}.exe ${DESTDIR}/${host_cpu} + if [ "$?" != "0" ]; then + failed "Erro ao copiar instalador" + fi + + ln -sf $(basename ${FILENAME}) "${DESTDIR}/${host_cpu}/gtk-runtime-latest-${host_cpu}.exe" + if [ "$?" != "0" ]; then + failed "Erro ao criar o link simbólico" + fi + + done + +fi + +cd $myDIR +rm -fr ${TEMPDIR} +rm -fr ${RUNTIMEDIR} + +# Gera pacotes para envio ao SPB +zip -9 -r -j ${HOME}/public_html/win/${PACKAGE_NAME}-latest.zip \ + ${HOME}/public_html/win/x86_32/${PACKAGE_NAME}-with-gtk-latest-i686.exe \ + ${HOME}/public_html/win/x86_64/${PACKAGE_NAME}-with-gtk-latest-x86_64.exe + +echo -e "\e]2;Success!\a" + + + + diff --git a/winpacket.sh b/winpacket.sh deleted file mode 100755 index 91cf30d..0000000 --- a/winpacket.sh +++ /dev/null @@ -1,355 +0,0 @@ -#!/bin/bash - -PACKAGE_NAME="pw3270" - -cleanup() -{ - # - # Apaga diretorio temporário caso o script seja interrompido - # - cd ${myDIR} - rm -fr ${TEMPDIR} - rm -fr ${RUNTIMEDIR} - exit -1 -} - -failed() -{ - echo -e "\e]2;Failed!\a" - echo $1 - cleanup -} - -# -# Copia pacote gerado -# -# $1 = Arquitetura (i686/x86_64) -# $2 = Tipo do link -# -CopyPacket() -{ - # - # Primeiro move a versão baseada no runtime - # - FILENAME=$(find nsi -maxdepth 1 -name "${PACKAGE_NAME}-*-requires-gtk-*-${1}.exe" | head --lines 1) - - if [ ! -z ${FILENAME} ]; then - - mkdir -p ${DESTDIR}/${1} - - echo "Copiando ${FILENAME} para ${DESTDIR}/${1}" - - mv "${FILENAME}" "${DESTDIR}/${1}" - if [ "$?" != "0" ]; then - echo "src=${FILENAME}" - echo "dst=${DESTDIR}/${1}" - failed "Erro ao copiar instalador sem o runtime" - fi - - # - # Cria link do pacote sem GTK para "latest" - # - ln -sf $(basename ${FILENAME}) ${DESTDIR}/${1}/${PACKAGE_NAME}-without-gtk-${2}-${1}.exe - if [ "$?" != "0" ]; then - failed "Erro ao criar o link simbólico" - fi - - - fi - - # - # Depois copia o pacote completo - # - FILENAME=$(find nsi -maxdepth 1 -name "${PACKAGE_NAME}-*-gtk-*-${1}.exe" | head --lines 1) - - if [ ! -z ${FILENAME} ]; then - - mkdir -p ${DESTDIR}/${1} - - echo "Copiando ${FILENAME} para ${DESTDIR}/${1}" - - mv "${FILENAME}" "${DESTDIR}/${1}" - if [ "$?" != "0" ]; then - echo "src=${FILENAME}" - echo "dst=${DESTDIR}/${1}" - failed "Erro ao copiar instalador completo" - fi - - # - # Cria link do pacote completo para "latest" - # - ln -sf $(basename ${FILENAME}) ${DESTDIR}/${1}/${PACKAGE_NAME}-with-gtk-${2}-${1}.exe - if [ "$?" != "0" ]; then - failed "Erro ao criar o link simbólico" - fi - - fi - -} - - -# -# Gera pacote windows -# -# $1 = Arquitetura (x86_32/x86_64) -# -build() -{ - echo -e "\e]2;${PACKAGE_NAME}-${1}\a" - - case ${1} in - x86_32) - host=i686-w64-mingw32 - host_cpu=i686 - prefix=/usr/i686-w64-mingw32/sys-root/mingw - tools=i686-w64-mingw32 - ;; - - x86_64) - host=x86_64-w64-mingw32 - host_cpu=x86_64 - prefix=/usr/x86_64-w64-mingw32/sys-root/mingw - tools=x86_64-w64-mingw32 - ;; - - - *) - failed "Arquitetura desconhecida: ${1}" - - esac - - # Detecto argumentos - ARGS="" - - REXXCONFIG=$(which ${tools}-oorexx-config) - if [ -z ${REXXCONFIG} ]; then - echo "Desabilitando suporte ooRexx" - ARGS="${ARGS} --disable-rexx" - fi - - ./configure \ - --cache-file=.${1}.cache \ - --host=${host} \ - --prefix=${prefix} \ - --disable-python \ - ${ARGS} - - if [ "$?" != "0" ]; then - failed "Erro ao configurar" - fi - - make clean - rm -f *.exe - - make -C nsi ${PACKAGE_NAME}-${host_cpu}.nsi - if [ "$?" != "0" ]; then - failed "Erro ao gerar script de empacotamento windows" - fi - - make Release - if [ "$?" != "0" ]; then - failed "Erro ao compilar fontes" - fi - - ln -sf .${prefix}/share/locale .bin/Release/locale - if [ "$?" != "0" ]; then - failed "Erro ao criar link para traduções" - fi - - if [ "${COMPLETE}" != "0" ]; then - - # Gera pacote completo - - chmod +x makegtkruntime.sh - ./makegtkruntime.sh - if [ "$?" != "0" ]; then - failed "Erro ao construir runtime gtk" - fi - - echo -e "\e]2;${PACKAGE_NAME}-install-${host_cpu}.exe\a" - make -C nsi package - if [ "$?" != "0" ]; then - failed "Erro ao gerar pacote windows" - fi - - fi - - if [ "${RUNTIME}" != "0" ]; then - - make -C nsi package-no-gtk - if [ "$?" != "0" ]; then - failed "Erro ao gerar pacote windows" - fi - - fi - - CopyPacket ${host_cpu} "latest" - - make clean - rm -f *.exe - -} - -myDIR=$(readlink -f $(dirname $0)) -TEMPDIR=$(mktemp -d) -DESTDIR=${HOME}/public_html/win -RUNTIMEDIR=$(mktemp -d) -ARCHS="x86_32 x86_64" -RUNTIME=1 -COMPLETE=1 - -find . -exec touch {} \; - -trap cleanup INT - -until [ -z "$1" ] -do - if [ ${1:0:2} = '--' ]; then - tmp=${1:2} - parameter=${tmp%%=*} - parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") - - case $parameter in - - 32) - ARCHS="x86_32" - ;; - - 64) - ARCHS="x86_64" - ;; - - FULL) - RUNTIME=0 - COMPLETE=1 - ;; - - RT) - RUNTIME=1 - COMPLETE=0 - ;; - - NAME) - PACKAGE_NAME=$value - ;; - - OUT) - DESTDIR=$value - ;; - - ARCH) - value=${tmp##*=} - ARCHS=$value - ;; - - *) - value=${tmp##*=} - eval $parameter=$value - esac - - fi - - shift -done - -# Configura -aclocal -if [ "$?" != "0" ]; then - exit -1 -fi - -autoconf -if [ "$?" != "0" ]; then - exit -1 -fi - -# Gera pacotes -for i in ${ARCHS}; do - - build "${i}" - -done - -if [ "${RUNTIME}" == "1" ]; then - - echo -e "\e]2;Baixando runtime\a" - - # - # Puxo scripts de construção do GTK direto da sourceforge. - # - cd ${RUNTIMEDIR} - git clone http://git.code.sf.net/p/gtk3win/code . - if [ "$?" != "0" ]; then - exit -1 - fi - - for i in ${ARCHS}; do - - echo -e "\e]2;gtk-runtime-${i}\a" - - case ${i} in - x86_32) - host_cpu=i686 - ./win32.sh - if [ "$?" != "0" ]; then - exit -1 - fi - ;; - - x86_64) - host_cpu=x86_64 - ./win64.sh - if [ "$?" != "0" ]; then - exit -1 - fi - ;; - - *) - echo "Arquitetura desconhecida ${i}" - exit -1 - - esac - - rm -f gtk-runtime-*-${host_cpu}.exe - - - chmod +x ./makeruntime.sh - - ./makeruntime.sh - if [ "$?" != "0" ]; then - exit -1 - fi - - # Copia o pacote gerado - FILENAME=$(find . -maxdepth 1 -name "gtk-runtime-*-${host_cpu}.exe" | head --lines 1) - - mkdir -p ${DESTDIR}/${host_cpu} - - mv gtk-runtime-*-${host_cpu}.exe ${DESTDIR}/${host_cpu} - if [ "$?" != "0" ]; then - failed "Erro ao copiar instalador" - fi - - ln -sf $(basename ${FILENAME}) "${DESTDIR}/${host_cpu}/gtk-runtime-latest-${host_cpu}.exe" - if [ "$?" != "0" ]; then - failed "Erro ao criar o link simbólico" - fi - - done - -fi - -cd $myDIR -rm -fr ${TEMPDIR} -rm -fr ${RUNTIMEDIR} - -# Gera pacotes para envio ao SPB -zip -9 -r -j ${HOME}/public_html/win/${PACKAGE_NAME}-latest.zip \ - ${HOME}/public_html/win/x86_32/${PACKAGE_NAME}-with-gtk-latest-i686.exe \ - ${HOME}/public_html/win/x86_64/${PACKAGE_NAME}-with-gtk-latest-x86_64.exe - -echo -e "\e]2;Success!\a" - - - - -- libgit2 0.21.2