From 0958a783775cbb9cecd31b7a1249f3e3112895e5 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Mon, 23 Jan 2017 10:54:16 -0200 Subject: [PATCH] Ajustando compilação windows, reativando plugin hllapi --- configure.ac | 2 ++ src/plugins/hllapi/Makefile.in | 275 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------ src/plugins/hllapi/calls.cc | 2 +- src/plugins/hllapi/pluginmain.c | 2 +- win/mingw64-pw3270-unstable.spec | 208 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- win/mingw64-pw3270.spec | 208 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 445 insertions(+), 252 deletions(-) delete mode 100644 win/mingw64-pw3270-unstable.spec create mode 100644 win/mingw64-pw3270.spec diff --git a/configure.ac b/configure.ac index 7c270d0..c8dadf6 100644 --- a/configure.ac +++ b/configure.ac @@ -93,7 +93,9 @@ case "$host" in LIBS="$LIBS -lws2_32 -lntdll -lwtsapi32 -lintl -lcomdlg32" AC_CONFIG_FILES(win/makegtkruntime.sh) + AC_CONFIG_FILES(src/plugins/hllapi/Makefile) + PLUGINS="$PLUGINS hllapi" ;; *-apple-*) diff --git a/src/plugins/hllapi/Makefile.in b/src/plugins/hllapi/Makefile.in index 11aee09..070e886 100644 --- a/src/plugins/hllapi/Makefile.in +++ b/src/plugins/hllapi/Makefile.in @@ -22,74 +22,265 @@ # # perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) # erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) -# licinio@bb.com.br (Licínio Luis Branco) -# kraucer@bb.com.br (Kraucer Fernandes Mazuco) # -#---[ Sources ]---------------------------------------------------------------- - MODULE_NAME=hllapi -DEPENDS=*.h ../../include/*.h ../../include/lib3270/*.h Makefile ../../classlib/*.cc -PLUGIN_SRC=pluginmain.c -EXTAPI_SRC=calls.c hllapi.c +LIBNAME=lib$(MODULE_NAME)@DLLEXT@ + +PLUGIN_SOURCES=pluginmain.c +API_SOURCES=calls.c hllapi.c + +#---[ Configuration values ]------------------------------------------------------------- + +PACKAGE_NAME=@PACKAGE_NAME@ +PACKAGE_VERSION=@PACKAGE_VERSION@ +PACKAGE_TARNAME=@PACKAGE_TARNAME@ + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +bindir=@bindir@ +sbindir=@sbindir@ +libdir=@libdir@ + +BASEDIR=@BASEDIR@ +SRCDIR=$(BASEDIR)/.src/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)/src/plugins/$(MODULE_NAME) +POTDIR=$(BASEDIR)/.pot/plugins/$(MODULE_NAME) + +OBJDIR=$(BASEDIR)/.obj/plugins/$(MODULE_NAME) +OBJDBG=$(OBJDIR)/Debug +OBJRLS=$(OBJDIR)/Release -#---[ Include plugin rules ]--------------------------------------------------- +BINDIR=$(BASEDIR)/.bin +BINDBG=$(BINDIR)/Debug +BINRLS=$(BINDIR)/Release -CLASSLIBDIR=../../classlib -LIBS=@LIBS@ +MKDIR=@MKDIR_P@ +CC=@CC@ +CXX=@CXX@ +LD=@CXX@ +AR=@AR@ +XGETTEXT=@XGETTEXT@ +MSGCAT=@MSGCAT@ +INSTALL=@INSTALL@ +INSTALL_DATA=@INSTALL_DATA@ +INSTALL_PROGRAM=@INSTALL_PROGRAM@ +LN_S=@LN_S@ -include ../../include/plugin.mak -include $(CLASSLIBDIR)/class.mak +CFLAGS=@CFLAGS@ @GTK_CFLAGS@ -I$(BASEDIR)/src/include -#---[ Release Targets ]-------------------------------------------------------- +LIBS=@LIBS@ +API_LIBS=$(LIBS) -lpw3270cpp @LIBICONV@ +PLUGIN_LIBS=$(LIBS) @GTK_LIBS@ @GLIB_LIBS@ @LIB3270_LIBS@ @PW3270_LIBS@ -$(BINRLS)/$(PLUGIN_NAME): \ - $(foreach SRC, $(basename $(PLUGIN_SRC)), $(OBJRLS)/$(SRC).o) \ - $(BINRLS)$(DLL_NAME) +#---[ Rules ]---------------------------------------------------------------------------- - @echo " CCLD `basename $@`" +DEPENDS=*.h Makefile + +$(OBJDBG)/%.o: \ + %.c \ + $(DEPENDS) + + @echo $< ... @$(MKDIR) `dirname $@` - @$(CXX) $(DLL_FLAGS) @LDSOFLAGS@ $(LDFLAGS) @RLS_LDFLAGS@ -o $@ $^ $(LIBS) $(LIB3270_LIBS) $(GTK_LIBS) $(GLIB_LIBS) $(PW3270_LIBS) + @$(CC) $(CFLAGS) \ + @DBG_CFLAGS@ \ + -DBUILD_DATE=`date +"0x%Y%m%d"`\ + -o $@ -c $< -$(BINRLS)$(DLL_NAME).$(VERSION): \ - $(foreach SRC, $(basename $(EXTAPI_SRC)), $(OBJRLS)/$(SRC).o) $(CLASS_RELEASE_OBJECTS) +$(OBJDBG)/%.o: \ + %.cc \ + $(DEPENDS) - @echo " CCLD `basename $@`" + @echo $< ... @$(MKDIR) `dirname $@` - @$(CXX) $(SYSDLL_FLAGS) @LDSOFLAGS@ $(LDFLAGS) @RLS_LDFLAGS@ -o $@ $^ $(CLASS_LIBS) + @$(CXX) $(CFLAGS) \ + @DBG_CFLAGS@ \ + -DBUILD_DATE=`date +"0x%Y%m%d"`\ + -o $@ -c $< -install: +$(OBJRLS)/%.o: \ + %.c \ + $(DEPENDS) -#---[ Debug Targets ]---------------------------------------------------------- + @echo $< ... + @$(MKDIR) `dirname $@` + @$(CC) $(CFLAGS) \ + @RLS_CFLAGS@ \ + -DBUILD_DATE=`date +"0x%Y%m%d"` \ + -o $@ -c $< -$(BINDBG)/$(PLUGIN_NAME): \ - $(foreach SRC, $(basename $(PLUGIN_SRC)), $(OBJDBG)/$(SRC).o) \ - $(BINDBG)$(DLL_NAME) +$(OBJRLS)/%.o: \ + %.cc \ + $(DEPENDS) - @echo " CCLD `basename $@`" + @echo $< ... @$(MKDIR) `dirname $@` - @$(CXX) $(DLL_FLAGS) @LDSOFLAGS@ @DBGRPATH@ $(LDFLAGS) -o $@ $^ $(LIBS) $(LIB3270_LIBS) $(GTK_LIBS) $(GLIB_LIBS) $(PW3270_LIBS) + @$(CXX) $(CFLAGS) \ + @RLS_CFLAGS@ \ + -DBUILD_DATE=`date +"0x%Y%m%d"` \ + -o $@ -c $< -$(BINDBG)$(DLL_NAME).$(VERSION): \ - $(foreach SRC, $(basename $(EXTAPI_SRC)), $(OBJDBG)/$(SRC)@OBJEXT@) $(CLASS_DEBUG_OBJECTS) +$(POTDIR)/%.pot: %.c - @echo " CCLD `basename $@`" + @echo $(notdir $@) ... @$(MKDIR) `dirname $@` - @$(CXX) $(SYSDLL_FLAGS) $(LDFLAGS) @LDSOFLAGS@ @DBGRPATH@ -L../../../.bin/Debug -o $@ $^ $(CLASS_LIBS) + @$(XGETTEXT) \ + --default-domain=$(PACKAGE) \ + --language=C \ + --keyword=_ \ + --keyword=N_ \ + --keyword=MSG_:2 \ + --output=$@ \ + $< -test: \ - $(BINDBG)/test@EXEEXT@ + @touch $@ -cleantest: \ - clean +#---[ Release Targets ]------------------------------------------------------------------ + +Release: \ + $(BINRLS)/plugins/$(MODULE_NAME)@DLLEXT@ + +install: \ + $(BINRLS)/$(LIBNAME) \ + $(BINRLS)/plugins/$(MODULE_NAME)@DLLEXT@ + + @echo $@ ... + @$(MKDIR) $(DESTDIR)$(libdir)/$(PACKAGE_TARNAME)-plugins + @$(INSTALL_PROGRAM) $(BINRLS)/$(MODULE_NAME)@DLLEXT@ $(DESTDIR)$(libdir)/$(PACKAGE_TARNAME)-plugins/$(MODULE_NAME)@DLLEXT@ + + @$(MKDIR) $(DESTDIR)$(libdir) + @$(INSTALL_PROGRAM) $(BINRLS)/$(LIBNAME) $(DESTDIR)$(libdir) + +$(DESTDIR)$(libdir)/$(PACKAGE_TARNAME)-plugins/$(MODULE_NAME)@DLLEXT@: \ + $(BINRLS)/$(LIBNAME) \ + $(BINRLS)/plugins/$(MODULE_NAME)@DLLEXT@ + + @echo $@ ... + @$(MKDIR) `dirname $@` + @$(INSTALL_PROGRAM) $(BINRLS)/$(MODULE_NAME)@DLLEXT@ $@ + + @$(MKDIR) $(DESTDIR)$(libdir) + @$(INSTALL_PROGRAM) $(BINRLS)/$(LIBNAME) $(DESTDIR)$(libdir) + +$(BINRLS)/$(LIBNAME): \ + $(BINRLS)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@ + + @echo $(basename $@) ... + @$(MKDIR) `dirname $@` + @$(LN_S) -f $(LIBNAME).@PACKAGE_MAJOR_VERSION@ $@ + +$(BINRLS)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@: \ + $(BINRLS)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@ + + @echo $(basename $@) ... + @$(MKDIR) `dirname $@` + @$(LN_S) -f $(LIBNAME).@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@ $@ + +$(BINRLS)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@: \ + $(foreach SRC, $(basename $(API_SOURCES)), $(OBJRLS)/$(SRC).o) + + @echo $@ ... + @$(MKDIR) `dirname $@` + $(LD) \ + -shared \ + -Wl,-soname,`basename $@` \ + -L$(BASEDIR)/.bin/Release \ + -o $@ $^ \ + $(API_LIBS) -cleanDebug: \ +$(BINRLS)/plugins/$(MODULE_NAME)@DLLEXT@: \ + $(BINRLS)/$(LIBNAME) \ + $(foreach SRC, $(basename $(PLUGIN_SOURCES)), $(OBJRLS)/$(SRC).o) + + @echo $@ ... + @$(MKDIR) `dirname $@` + @$(LD) \ + -shared \ + -Wl,-soname,$(MODULE_NAME)d \ + -L$(BASEDIR)/.bin/Release \ + -o $@ $(foreach SRC, $(basename $(PLUGIN_SOURCES)), $(OBJRLS)/$(SRC).o) \ + $(PLUGIN_LIBS) + +pot: \ + $(BASEDIR)/.pot/plugins/$(MODULE_NAME).pot + +$(BASEDIR)/.pot/plugins/$(MODULE_NAME).pot: \ + $(foreach SRC, $(basename $(SOURCES)), $(POTDIR)/$(SRC).pot) + + @rm -f $@ + @mkdir -p `dirname $@` + @$(MSGCAT) --sort-output $^ > $@ + +$(SRCDIR): \ clean -$(BINDBG)/test@EXEEXT@: \ - $(BINDBG)$(DLL_NAME).$(VERSION) $(OBJDBG)/testprogram.o + @$(MKDIR) $@ + @$(INSTALL_DATA) *.c *.h *.in *.xml *.cbp $@ + - @echo " CCLD `basename $@`" +#---[ Debug Targets ]-------------------------------------------------------------------- + +Debug: \ + $(BINDBG)/plugins/$(MODULE_NAME)@DLLEXT@ + +$(BINDBG)/$(LIBNAME): \ + $(BINDBG)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@ + + @echo $(basename $@) ... @$(MKDIR) `dirname $@` - $(LD) -o $@ $^ -Wl,-rpath,$(BINDBG)/lib $(LIBS) $(BINDBG)$(DLL_NAME).$(VERSION) + @$(LN_S) -f $(LIBNAME).@PACKAGE_MAJOR_VERSION@ $@ + +$(BINDBG)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@: \ + $(BINDBG)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@ + + @echo $(basename $@) ... + @$(MKDIR) `dirname $@` + @$(LN_S) -f $(LIBNAME).@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@ $@ + +$(BINDBG)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@: \ + $(foreach SRC, $(basename $(API_SOURCES)), $(OBJDBG)/$(SRC).o) + + @echo $@ ... + @$(MKDIR) `dirname $@` + $(LD) \ + -shared \ + -Wl,-soname,`basename $@` \ + -L$(BASEDIR)/.bin/Debug \ + -o $@ $^ \ + $(API_LIBS) + +$(BINDBG)/plugins/$(MODULE_NAME)@DLLEXT@: \ + $(BINDBG)/$(LIBNAME) \ + $(foreach SRC, $(basename $(PLUGIN_SOURCES)), $(OBJDBG)/$(SRC).o) + + @echo $@ ... + @$(MKDIR) `dirname $@` + @$(LD) \ + -shared \ + -Wl,-soname,$(MODULE_NAME)d,--rpath,$(BASEDIR)/.bin/Debug \ + -L$(BASEDIR)/.bin/Debug \ + -o $@ $(foreach SRC, $(basename $(PLUGIN_SOURCES)), $(OBJDBG)/$(SRC).o) \ + $(PLUGIN_LIBS) + + +#---[ Clean Targets]--------------------------------------------------------------------- + +cleanDebug: + + @rm -fr $(BINDBG)/$(MODULE_NAME)@DLLEXT@ \ + $(OBJDBG) \ + dbus-glue.h + +cleanRelease: + + @rm -fr $(BINRLS)/$(MODULE_NAME)@DLLEXT@ \ + $(OBJRLS) \ + dbus-glue.h + + @rm -fr $(POTDIR) + +clean: \ + cleanDebug \ + cleanRelease + diff --git a/src/plugins/hllapi/calls.cc b/src/plugins/hllapi/calls.cc index d1447a3..f2041dc 100644 --- a/src/plugins/hllapi/calls.cc +++ b/src/plugins/hllapi/calls.cc @@ -31,7 +31,7 @@ #include #include - #include + #include #include #include "client.h" diff --git a/src/plugins/hllapi/pluginmain.c b/src/plugins/hllapi/pluginmain.c index 25af58e..0136d45 100644 --- a/src/plugins/hllapi/pluginmain.c +++ b/src/plugins/hllapi/pluginmain.c @@ -38,7 +38,7 @@ #endif // _WIN32 #include - #include + #include #include #include #include diff --git a/win/mingw64-pw3270-unstable.spec b/win/mingw64-pw3270-unstable.spec deleted file mode 100644 index 3841392..0000000 --- a/win/mingw64-pw3270-unstable.spec +++ /dev/null @@ -1,208 +0,0 @@ -# -# spec file for package mingw64-pw3270 -# -# Copyright (c) 2014 SUSE LINUX Products 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 MAJOR_VERSION 5 -%define MINOR_VERSION 1 - -%define __strip %{_mingw64_strip} -%define __objdump %{_mingw64_objdump} -%define _use_internal_dependency_generator 0 -%define __find_requires %{_mingw64_findrequires} -%define __find_provides %{_mingw64_findprovides} -%define __os_install_post %{_mingw64_debug_install_post} \ - %{_mingw64_install_post} - -#---[ Packaging ]----------------------------------------------------------------------------------------------------- - -Name: mingw64-pw3270 -Version: 5.1 -Release: 0 -Summary: IBM 3270 Terminal emulator for GTK -License: GPL-2.0 -Group: System/X11/Terminals -Url: http://www.softwarepublico.gov.br/dotlrn/clubs/pw3270 -Source: pw3270-%{version}.tar.bz2 -BuildRoot: %{_tmppath}/%{name}-%{version}-build - -BuildArch: noarch - -Requires: mingw64-gtk3 -Requires: mingw64-lib3270 = %{version} - -Provides: mingw64(lib:pw3270) = %{version} -Requires: mingw64-lib3270-%{MAJOR_VERSION}_%{MINOR_VERSION} = %{version} - -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: rsvg-view -BuildRequires: gettext-tools -BuildRequires: glib2-devel -BuildRequires: gtk3-devel -BuildRequires: desktop-file-utils -BuildRequires: optipng - -BuildRequires: mingw64-cross-binutils -BuildRequires: mingw64-cross-gcc -BuildRequires: mingw64-cross-gcc-c++ -BuildRequires: mingw64-cross-pkg-config -BuildRequires: mingw64-filesystem -BuildRequires: mingw64-libopenssl-devel -BuildRequires: mingw64-zlib-devel -BuildRequires: mingw64-gtk3-devel - -#--------------------------------------------------------------------------------------------------------------------- - -%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 mingw64-lib3270-%{MAJOR_VERSION}_%{MINOR_VERSION} -Summary: 3270 Communication library for %{name} -Group: Development/Libraries/C and C++ -Requires: openssl - -Provides: mingw64-lib3270 = %{version} -Provides: mingw64-lib3270-%{MAJOR_VERSION}_%{MINOR_VERSION} = %{version} -Provides: mingw64(lib:3270) = %{version} - -%description -n mingw64-lib3270-%{MAJOR_VERSION}_%{MINOR_VERSION} -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 mingw64-lib3270-devel -Summary: Devel for 3270 Communication library for %{name} -Group: Development/Libraries/C and C++ - -Requires: mingw64-lib3270-%{MAJOR_VERSION}_%{MINOR_VERSION} = %{version} -Provides: mingw64-lib3270-devel-%{MAJOR_VERSION}_%{MINOR_VERSION} = %{version} -Requires: mingw64-lib3270-%{MAJOR_VERSION}_%{MINOR_VERSION} = %{version} - -%description -n mingw64-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 %{name}-devel -Summary: Files required for development of %{name} plugins -Group: Development/Libraries/C and C++ - -Requires: mingw64-lib3270-devel-%{MAJOR_VERSION}_%{MINOR_VERSION} = %{version} -Requires: mingw64-libpw3270-%{MAJOR_VERSION}_%{MINOR_VERSION} = %{version} - -%description -n %{name}-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} - -#---[ Build & Install ]----------------------------------------------------------------------------------------------- - -%prep - -%setup -q -n pw3270-%{version} - -echo "m4_define([SVN_REVISION], %{release})" > revision.m4 -echo "m4_define([SVN_URL], http://softwarepublico.gov.br/gitlab/pw3270/principal.git)" >> revision.m4 -echo "m4_define([APP_LEVEL], 0)" >> revision.m4 - -find . -exec touch {} \; -aclocal -autoconf -%{_mingw64_configure} - -%build -make clean -make all - -%install -%{_mingw64_makeinstall} - -rm -f %{buildroot}%{_mingw64_datadir}/pw3270/ui/80javasamples.xml -rm -f %{buildroot}%{_mingw64_datadir}/pw3270/ui/80rexx.xml - -#install --mode=755 .bin/Release/hllapi.dll.%{MAJOR_VERSION}.%{MINOR_VERSION} %{buildroot}%{_mingw64_libdir}/libhllapi.dll -#install --mode=755 .bin/Release/plugins/hllapi.dll %{buildroot}%{_mingw64_libdir}/pw3270-plugins/hllapi.dll - -%clean -rm -rf %{buildroot} - -#---[ Files ]--------------------------------------------------------------------------------------------------------- - -%files -%defattr(-,root,root) -%doc AUTHORS LICENSE -%{_mingw64_mandir}/*/* - -# Main application -%dir %{_mingw64_datadir}/pw3270 -%dir %{_mingw64_datadir}/pw3270/ui -%{_mingw64_bindir}/pw3270.exe -%{_mingw64_libdir}/pw3270.dll -%{_mingw64_libdir}/pw3270.dll.%{MAJOR_VERSION} -%{_mingw64_libdir}/pw3270.dll.%{MAJOR_VERSION}.%{MINOR_VERSION} - -%dir %{_mingw64_datadir}/applications -%{_mingw64_datadir}/applications/pw3270.desktop - -%{_mingw64_datadir}/pw3270/ui/00default.xml -%{_mingw64_datadir}/pw3270/ui/10functions.xml -%{_mingw64_datadir}/pw3270/ui/10keypad.xml -%{_mingw64_datadir}/pw3270/colors.conf -%{_mingw64_datadir}/pw3270/pw3270.png -%{_mingw64_datadir}/pw3270/pw3270-logo.png - -%dir %{_mingw64_datadir}/locale -%dir %{_mingw64_datadir}/locale/pt_BR -%dir %{_mingw64_datadir}/locale/pt_BR/LC_MESSAGES -%{_mingw64_datadir}/locale/pt_BR/LC_MESSAGES/pw3270.mo - -%dir %{_mingw64_libdir}/pw3270-plugins -%{_mingw64_libdir}/libhllapi.dll -%{_mingw64_libdir}/pw3270-plugins/hllapi.dll - -%files -n mingw64-lib3270-%{MAJOR_VERSION}_%{MINOR_VERSION} -%defattr(-,root,root) -%{_mingw64_libdir}/lib3270.dll.%{MAJOR_VERSION}.%{MINOR_VERSION} -%{_mingw64_libdir}/lib3270.dll.%{MAJOR_VERSION} -%{_mingw64_libdir}/lib3270.dll - -%files -n mingw64-lib3270-devel -%defattr(-,root,root) -%{_mingw64_includedir}/lib3270 -%{_mingw64_includedir}/lib3270.h -%{_mingw64_libdir}/pkgconfig/lib3270.pc - -%files -n %{name}-devel -%defattr(-,root,root) -%{_mingw64_includedir}/pw3270 -%{_mingw64_includedir}/pw3270.h -%{_mingw64_libdir}/pkgconfig/pw3270.pc -%{_mingw64_datadir}/pw3270/ui/98trace.xml -%{_mingw64_datadir}/pw3270/ui/99debug.xml - -%{_mingw64_includedir}/pw3270cpp.h -%{_mingw64_libdir}/libpw3270cpp.a - -%dir %{_mingw64_datadir}/pw3270/sample -%{_mingw64_datadir}/pw3270/sample/* - -%changelog - diff --git a/win/mingw64-pw3270.spec b/win/mingw64-pw3270.spec new file mode 100644 index 0000000..3841392 --- /dev/null +++ b/win/mingw64-pw3270.spec @@ -0,0 +1,208 @@ +# +# spec file for package mingw64-pw3270 +# +# Copyright (c) 2014 SUSE LINUX Products 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 MAJOR_VERSION 5 +%define MINOR_VERSION 1 + +%define __strip %{_mingw64_strip} +%define __objdump %{_mingw64_objdump} +%define _use_internal_dependency_generator 0 +%define __find_requires %{_mingw64_findrequires} +%define __find_provides %{_mingw64_findprovides} +%define __os_install_post %{_mingw64_debug_install_post} \ + %{_mingw64_install_post} + +#---[ Packaging ]----------------------------------------------------------------------------------------------------- + +Name: mingw64-pw3270 +Version: 5.1 +Release: 0 +Summary: IBM 3270 Terminal emulator for GTK +License: GPL-2.0 +Group: System/X11/Terminals +Url: http://www.softwarepublico.gov.br/dotlrn/clubs/pw3270 +Source: pw3270-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +BuildArch: noarch + +Requires: mingw64-gtk3 +Requires: mingw64-lib3270 = %{version} + +Provides: mingw64(lib:pw3270) = %{version} +Requires: mingw64-lib3270-%{MAJOR_VERSION}_%{MINOR_VERSION} = %{version} + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: rsvg-view +BuildRequires: gettext-tools +BuildRequires: glib2-devel +BuildRequires: gtk3-devel +BuildRequires: desktop-file-utils +BuildRequires: optipng + +BuildRequires: mingw64-cross-binutils +BuildRequires: mingw64-cross-gcc +BuildRequires: mingw64-cross-gcc-c++ +BuildRequires: mingw64-cross-pkg-config +BuildRequires: mingw64-filesystem +BuildRequires: mingw64-libopenssl-devel +BuildRequires: mingw64-zlib-devel +BuildRequires: mingw64-gtk3-devel + +#--------------------------------------------------------------------------------------------------------------------- + +%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 mingw64-lib3270-%{MAJOR_VERSION}_%{MINOR_VERSION} +Summary: 3270 Communication library for %{name} +Group: Development/Libraries/C and C++ +Requires: openssl + +Provides: mingw64-lib3270 = %{version} +Provides: mingw64-lib3270-%{MAJOR_VERSION}_%{MINOR_VERSION} = %{version} +Provides: mingw64(lib:3270) = %{version} + +%description -n mingw64-lib3270-%{MAJOR_VERSION}_%{MINOR_VERSION} +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 mingw64-lib3270-devel +Summary: Devel for 3270 Communication library for %{name} +Group: Development/Libraries/C and C++ + +Requires: mingw64-lib3270-%{MAJOR_VERSION}_%{MINOR_VERSION} = %{version} +Provides: mingw64-lib3270-devel-%{MAJOR_VERSION}_%{MINOR_VERSION} = %{version} +Requires: mingw64-lib3270-%{MAJOR_VERSION}_%{MINOR_VERSION} = %{version} + +%description -n mingw64-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 %{name}-devel +Summary: Files required for development of %{name} plugins +Group: Development/Libraries/C and C++ + +Requires: mingw64-lib3270-devel-%{MAJOR_VERSION}_%{MINOR_VERSION} = %{version} +Requires: mingw64-libpw3270-%{MAJOR_VERSION}_%{MINOR_VERSION} = %{version} + +%description -n %{name}-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} + +#---[ Build & Install ]----------------------------------------------------------------------------------------------- + +%prep + +%setup -q -n pw3270-%{version} + +echo "m4_define([SVN_REVISION], %{release})" > revision.m4 +echo "m4_define([SVN_URL], http://softwarepublico.gov.br/gitlab/pw3270/principal.git)" >> revision.m4 +echo "m4_define([APP_LEVEL], 0)" >> revision.m4 + +find . -exec touch {} \; +aclocal +autoconf +%{_mingw64_configure} + +%build +make clean +make all + +%install +%{_mingw64_makeinstall} + +rm -f %{buildroot}%{_mingw64_datadir}/pw3270/ui/80javasamples.xml +rm -f %{buildroot}%{_mingw64_datadir}/pw3270/ui/80rexx.xml + +#install --mode=755 .bin/Release/hllapi.dll.%{MAJOR_VERSION}.%{MINOR_VERSION} %{buildroot}%{_mingw64_libdir}/libhllapi.dll +#install --mode=755 .bin/Release/plugins/hllapi.dll %{buildroot}%{_mingw64_libdir}/pw3270-plugins/hllapi.dll + +%clean +rm -rf %{buildroot} + +#---[ Files ]--------------------------------------------------------------------------------------------------------- + +%files +%defattr(-,root,root) +%doc AUTHORS LICENSE +%{_mingw64_mandir}/*/* + +# Main application +%dir %{_mingw64_datadir}/pw3270 +%dir %{_mingw64_datadir}/pw3270/ui +%{_mingw64_bindir}/pw3270.exe +%{_mingw64_libdir}/pw3270.dll +%{_mingw64_libdir}/pw3270.dll.%{MAJOR_VERSION} +%{_mingw64_libdir}/pw3270.dll.%{MAJOR_VERSION}.%{MINOR_VERSION} + +%dir %{_mingw64_datadir}/applications +%{_mingw64_datadir}/applications/pw3270.desktop + +%{_mingw64_datadir}/pw3270/ui/00default.xml +%{_mingw64_datadir}/pw3270/ui/10functions.xml +%{_mingw64_datadir}/pw3270/ui/10keypad.xml +%{_mingw64_datadir}/pw3270/colors.conf +%{_mingw64_datadir}/pw3270/pw3270.png +%{_mingw64_datadir}/pw3270/pw3270-logo.png + +%dir %{_mingw64_datadir}/locale +%dir %{_mingw64_datadir}/locale/pt_BR +%dir %{_mingw64_datadir}/locale/pt_BR/LC_MESSAGES +%{_mingw64_datadir}/locale/pt_BR/LC_MESSAGES/pw3270.mo + +%dir %{_mingw64_libdir}/pw3270-plugins +%{_mingw64_libdir}/libhllapi.dll +%{_mingw64_libdir}/pw3270-plugins/hllapi.dll + +%files -n mingw64-lib3270-%{MAJOR_VERSION}_%{MINOR_VERSION} +%defattr(-,root,root) +%{_mingw64_libdir}/lib3270.dll.%{MAJOR_VERSION}.%{MINOR_VERSION} +%{_mingw64_libdir}/lib3270.dll.%{MAJOR_VERSION} +%{_mingw64_libdir}/lib3270.dll + +%files -n mingw64-lib3270-devel +%defattr(-,root,root) +%{_mingw64_includedir}/lib3270 +%{_mingw64_includedir}/lib3270.h +%{_mingw64_libdir}/pkgconfig/lib3270.pc + +%files -n %{name}-devel +%defattr(-,root,root) +%{_mingw64_includedir}/pw3270 +%{_mingw64_includedir}/pw3270.h +%{_mingw64_libdir}/pkgconfig/pw3270.pc +%{_mingw64_datadir}/pw3270/ui/98trace.xml +%{_mingw64_datadir}/pw3270/ui/99debug.xml + +%{_mingw64_includedir}/pw3270cpp.h +%{_mingw64_libdir}/libpw3270cpp.a + +%dir %{_mingw64_datadir}/pw3270/sample +%{_mingw64_datadir}/pw3270/sample/* + +%changelog + -- libgit2 0.21.2