diff --git a/.gitignore b/.gitignore index b5e39b5..4c4432d 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,6 @@ stamp-h1 *.zip *.tar *.bz2 -rpm *.depend ChangeLog revision @@ -23,3 +22,10 @@ revision.m4 *.ini jni3270.h doc +rpm/BUILD +rpm/BUILDROOT +rpm/RPMS +rpm/SOURCES +rpm/SPECS +rpm/SRPMS + diff --git a/Makefile.in b/Makefile.in index 0af05c6..548988f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -174,10 +174,13 @@ $(SRCDIR): \ @cp *.in $(SRCDIR) @cp *.cbp $(SRCDIR) @cp *.sh $(SRCDIR) - @cp *.spec $(SRCDIR) @cp README.md $(SRCDIR) @cp LICENCA $(SRCDIR) @cp LICENSE $(SRCDIR) + @cp rpm/*.spec $(SRCDIR) + + @$(MKDIR) $(SRCDIR)/debian + @cp debian/* $(SRCDIR)/debian @$(MKDIR) $(SRCDIR)/testprograms @cp testprograms/* $(SRCDIR)/testprograms diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..f490d48 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +pw3270-plugin-java (5.1-0) unstable; urgency=low + + * Unstable release + + -- Perry Werneck Thu, 19 Apr 2016 17:38:00 -0300 + diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..b44d43e --- /dev/null +++ b/debian/control @@ -0,0 +1,24 @@ +Source: pw3270-plugin-java +Section: unknown +Priority: optional +Maintainer: Perry Werneck +Build-Depends: debhelper (>= 7), autotools-dev, autoconf, gettext, libgtk-3-dev, pw3270-dev, default-jdk + +Package: pw3270-plugin-java +Architecture: any +Depends: ${misc:Depends}, pw3270 (= ${binary:Version}), pw3270-java (= ${binary:Version}) +Description: Java support for pw3270. + This package provides a plugin allowing calling of java classes from pw3270 application. + +Package: pw3270-java +Architecture: any +Depends: ${misc:Depends}, lib3270 (= ${binary:Version}) +Description: Java class for acessing 3270 hosts. + This package provides a Java class for acessing 3270 hosts. + +Package: pw3270-javadoc +Architecture: any +Depends: ${misc:Depends}, pw3270-java (= ${binary:Version}) +Description: Javadoc for pw3270. + API Documentation for pw3270. + diff --git a/debian/pw3270-plugin-java.dsc b/debian/pw3270-plugin-java.dsc new file mode 100644 index 0000000..db97857 --- /dev/null +++ b/debian/pw3270-plugin-java.dsc @@ -0,0 +1,13 @@ +Format: 1.0 +Source: pw3270-plugin-java +Version: 5.1-1 +Binary: pw3270-plugin-java +Maintainer: Perry Werneck +Architecture: any +Build-Depends: debhelper (>= 7), autotools-dev, autoconf, automake, libgtk-3-dev, pw3270-dev, default-jdk +Standards-Version: 3.9.1.0 +DEBTRANSFORM-RELEASE: 1 +Files: + 00000000000000000000000000000000 000000 pw3270-plugin-java-5.1.tar.gz + + diff --git a/debian/rules b/debian/rules new file mode 100644 index 0000000..140a37d --- /dev/null +++ b/debian/rules @@ -0,0 +1,115 @@ +#!/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 + +CFLAGS = -g +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +CFLAGS += -O0 +else +CFLAGS += -O2 +endif + +build: build-stamp +build-stamp: + dh_testdir + + set + + echo "m4_define([SVN_REVISION], 0)" > 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 + + # Add here commands to compile the package. + aclocal + autoconf + + ./configure \ + JRE_HOME="`readlink -f /usr/bin/java | sed "s@bin/java@@"`" \ + JDK_HOME="`readlink -f /usr/bin/javac | sed "s@bin/javac@@"`" \ + + + rm -f debian/*.install + make clean + 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 Java plugin + make DESTDIR=$(PWD)/debian/pw3270-plugin-java BINDIR=../../.bin install-plugin + + # Install Java extension + make DESTDIR=$(PWD)/debian/pw3270-java BINDIR=../../.bin install-jni + + # Install Javadoc + make DESTDIR=$(PWD)/debian/pw3270-javadoc BINDIR=../../.bin install-doc + + # Create updated file lists + find $(PWD)/debian/pw3270-plugin-java -type f | sed -e "s@^$(PWD)/debian/pw3270-plugin-java/@/@g" > $(PWD)/debian/pw3270-plugin-java.install + + find $(PWD)/debian/pw3270-plugin-javadoc -type f | sed -e "s@^$(PWD)/debian/pw3270-plugin-java/@/@g" > $(PWD)/debian/pw3270-javadoc.install + + find $(PWD)/debian/pw3270-java -type f | sed -e "s@^$(PWD)/debian/pw3270-java/@/@g" > $(PWD)/debian/pw3270-java.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/pw3270-plugin-java.spec b/pw3270-plugin-java.spec deleted file mode 100644 index ad17ac9..0000000 --- a/pw3270-plugin-java.spec +++ /dev/null @@ -1,119 +0,0 @@ -# -# spec file for package pw3270-plugin-java -# -# 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/ -# -Summary: Plugin module for embedding java on pw3270. -Name: pw3270-plugin-java -Version: 5.1 -Release: 0 -License: GPL-2.0 -Source: %{name}-%{version}.tar.bz2 -URL: https://portal.softwarepublico.gov.br/social/pw3270/ -Group: Development/Languages/Java - -BuildRoot: /var/tmp/%{name}-%{version} - -BuildRequires: autoconf >= 2.61 -BuildRequires: automake -BuildRequires: binutils -BuildRequires: coreutils -BuildRequires: gcc-c++ -BuildRequires: m4 -BuildRequires: pkgconfig -BuildRequires: pw3270-devel >= 5.1 - -BuildRequires: java-devel -BuildRequires: javapackages-tools - -Requires: pw3270 >= 5.1 -Requires: java-extension-tn3270 = %{version} - -%description - -Plugin module for java plugins in pw3270. - -This package provides a pw3270 plugin allowing use o rexx scripts -directly from pw3270 main window. - -%package -n pw3270-java - -Summary: Java class to interact with pw3270 -Group: Development/Libraries/Java -Requires: lib3270 >= 5.1 -Requires: java >= 4.2 - -%description -n pw3270-java - -This package provides Java class for lib3270/pw3270 interaction. - -%package -n pw3270-java-doc -Summary: Javadoc for %{name} -Group: Documentation -Requires: jpackage-utils - -%description -n pw3270-java-doc -API documentation for %{name}. - -%prep - -%setup - -export CFLAGS="$RPM_OPT_FLAGS" -export CXXFLAGS="$RPM_OPT_FLAGS" -export FFLAGS="$RPM_OPT_FLAGS" -export JAVA_HOME=%{java_home} - -aclocal -autoconf - -%configure --with-jnidir="%{_jnidir}" \ - --with-jvmjardir="%{_jvmjardir}" \ - --with-javadocdir="%{_javadocdir}" - -%build -make clean -make Release - -%install -rm -rf $RPM_BUILD_ROOT - -%makeinstall - -%fdupes $RPM_BUILD_ROOT - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root) -%{_libdir}/pw3270-plugins/j3270.so - -%files -n pw3270-java -%defattr(-,root,root) -%dir %{_jnidir} -%dir %{_jvmjardir} - -%{_jnidir}/libjni3270.so -%{_jvmjardir}/pw3270.jar - -%files -n pw3270-java-doc -%defattr(-,root,root) -%dir %{_javadocdir}/pw3270 -%{_javadocdir}/pw3270/* - -%changelog - - diff --git a/rpm/pw3270-plugin-java.spec b/rpm/pw3270-plugin-java.spec new file mode 100644 index 0000000..8dde7aa --- /dev/null +++ b/rpm/pw3270-plugin-java.spec @@ -0,0 +1,119 @@ +# +# spec file for package pw3270-plugin-java +# +# 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/ +# +Summary: Plugin module for embedding java on pw3270. +Name: pw3270-plugin-java +Version: 5.1 +Release: 0 +License: GPL-2.0 +Source: %{name}-%{version}.tar.bz2 +URL: https://softwarepublico.gov.br/gitlab/pw3270/pw3270-java +Group: Development/Languages/Java + +BuildRoot: /var/tmp/%{name}-%{version} + +BuildRequires: autoconf >= 2.61 +BuildRequires: automake +BuildRequires: binutils +BuildRequires: coreutils +BuildRequires: gcc-c++ +BuildRequires: m4 +BuildRequires: pkgconfig +BuildRequires: pkgconfig(pw3270) >= 5.1 + +BuildRequires: java-devel +BuildRequires: javapackages-tools + +Requires: pw3270 >= 5.1 +Requires: java-extension-tn3270 = %{version} + +%description + +Plugin module for java plugins in pw3270. + +This package provides a pw3270 plugin allowing use o rexx scripts +directly from pw3270 main window. + +%package -n pw3270-java + +Summary: Java class to interact with pw3270 +Group: Development/Libraries/Java +Requires: lib3270 >= 5.1 +Requires: java >= 4.2 + +%description -n pw3270-java + +This package provides Java class for lib3270/pw3270 interaction. + +%package -n pw3270-java-doc +Summary: Javadoc for %{name} +Group: Documentation +Requires: jpackage-utils + +%description -n pw3270-java-doc +API documentation for %{name}. + +%prep + +%setup + +export CFLAGS="$RPM_OPT_FLAGS" +export CXXFLAGS="$RPM_OPT_FLAGS" +export FFLAGS="$RPM_OPT_FLAGS" +export JAVA_HOME=%{java_home} + +aclocal +autoconf + +%configure --with-jnidir="%{_jnidir}" \ + --with-jvmjardir="%{_jvmjardir}" \ + --with-javadocdir="%{_javadocdir}" + +%build +make clean +make Release + +%install +rm -rf $RPM_BUILD_ROOT + +%makeinstall + +%fdupes $RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%{_libdir}/pw3270-plugins/j3270.so + +%files -n pw3270-java +%defattr(-,root,root) +%dir %{_jnidir} +%dir %{_jvmjardir} + +%{_jnidir}/libjni3270.so +%{_jvmjardir}/pw3270.jar + +%files -n pw3270-java-doc +%defattr(-,root,root) +%dir %{_javadocdir}/pw3270 +%{_javadocdir}/pw3270/* + +%changelog + + -- libgit2 0.21.2