From fe45eca2b7c8bd185829808eb1ffd8004b61b198b3c2e82f73f998750250e40c Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 24 Oct 2018 15:16:42 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/trilead-ssh2?expand=0&rev=1 --- .gitattributes | 23 +++++++ .gitignore | 1 + trilead-ssh2-build217-jenkins-8.tar.gz | 3 + trilead-ssh2.spec | 89 ++++++++++++++++++++++++++ 4 files changed, 116 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 trilead-ssh2-build217-jenkins-8.tar.gz create mode 100644 trilead-ssh2.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/trilead-ssh2-build217-jenkins-8.tar.gz b/trilead-ssh2-build217-jenkins-8.tar.gz new file mode 100644 index 0000000..a01d6e3 --- /dev/null +++ b/trilead-ssh2-build217-jenkins-8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ad363bbeba25f4e53c2d7a0c3755ba7e531ef074408a61369a01bf2170076bf +size 153463 diff --git a/trilead-ssh2.spec b/trilead-ssh2.spec new file mode 100644 index 0000000..bd64f84 --- /dev/null +++ b/trilead-ssh2.spec @@ -0,0 +1,89 @@ +# +# spec file for package trilead-ssh2 +# +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# +# 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 https://bugs.opensuse.org/ +# + + +%global buildver 217 +%global patchlvl 8 +Name: trilead-ssh2 +Version: %{buildver}.%{patchlvl} +Release: 0 +Summary: SSH-2 protocol implementation in pure Java +License: BSD AND MIT +URL: https://github.com/jenkinsci/trilead-ssh2 +Source0: https://github.com/jenkinsci/%{name}/archive/%{name}-build%{buildver}-jenkins-%{patchlvl}.tar.gz +BuildRequires: fdupes +BuildRequires: java-devel +BuildRequires: javapackages-local +BuildRequires: javapackages-tools +BuildArch: noarch + +%description +Trilead SSH-2 for Java is a library which implements the SSH-2 protocol in pure +Java (tested on J2SE 1.4.2 and 5.0). It allows one to connect to SSH servers +from within Java programs. It supports SSH sessions (remote command execution +and shell access), local and remote port forwarding, local stream forwarding, +X11 forwarding and SCP. There are no dependencies on any JCE provider, as all +crypto functionality is included. + +%package javadoc +Summary: Javadoc for %{name} + +%description javadoc +API documentation for %{name}. + +%prep +%setup -q -n %{name}-%{name}-build%{buildver}-jenkins-%{patchlvl} + +%build +mkdir -p build/classes +javac -d build/classes -source 6 -target 6 $(find src -name \*.java | xargs) +(cd build/classes && jar cf ../%{name}-%{version}.jar $(find . -name \*.class)) +mkdir -p build/docs +javadoc -d build/docs -source 6 $(find src -name \*.java | xargs) + +%install +# jars +install -d -m 0755 %{buildroot}%{_javadir} +install -m 644 build/%{name}-%{version}.jar %{buildroot}%{_javadir}/ +(cd %{buildroot}%{_javadir} && ln -s %{name}-%{version}.jar %{name}.jar) + +# pom +install -d -m 755 %{buildroot}%{_mavenpomdir} +install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}-%{version}.pom +%add_maven_depmap %{name}-%{version}.pom %{name}-%{version}.jar -a "org.tmatesoft.svnkit:trilead-ssh2","com.trilead:trilead-ssh2" + +# javadoc +install -d -m 755 %{buildroot}%{_javadocdir}/%{name} +cp -aL build/docs/* %{buildroot}%{_javadocdir}/%{name} +%fdupes -s %{buildroot}%{_javadocdir}/%{name} + +%files +%license LICENSE.txt +%doc HISTORY.txt README.txt +%{_javadir}/* +%{_mavenpomdir}/* +%if %{defined _maven_repository} +%{_mavendepmapfragdir}/%{name} +%else +%{_datadir}/maven-metadata/%{name}.xml* +%endif + +%files javadoc +%license LICENSE.txt +%{_javadocdir}/%{name} + +%changelog