[trilead-ssh2] Adapt to current packaging guidelines
Michal Srb
msrb at fedoraproject.org
Mon Jan 6 14:36:15 UTC 2014
commit 38cc67148441d74a4c3b15a5fb08dd9fc624c202
Author: Michal Srb <msrb at redhat.com>
Date: Mon Jan 6 15:20:05 2014 +0100
Adapt to current packaging guidelines
- Build with XMvn
- Update to upstream version 217
- Add alias (Resolves: rhbz#1048829)
.gitignore | 1 +
generate_tarball.sh | 11 +++++
sources | 2 +-
trilead-ssh2-1.0.0-build217.pom | 31 +++++++++++++
trilead-ssh2.spec | 94 ++++++++++++++------------------------
5 files changed, 79 insertions(+), 60 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a1fac55..b4d4514 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
trilead-ssh2-build213.zip
/trilead-ssh2-build215.zip
+/trilead-ssh2-build217.tar.xz
diff --git a/generate_tarball.sh b/generate_tarball.sh
new file mode 100755
index 0000000..5d3820a
--- /dev/null
+++ b/generate_tarball.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+baseurl="http://svn.svnkit.com/repos/3rdparty/com.trilead.ssh2/tags/"
+pkgname="trilead-ssh2-build"
+
+version=`grep Version: *spec | sed -e 's/Version:\s*\(.*\)/\1/'`
+echo $version
+
+svn export "${baseurl}/1.0.0-build${version}" "${pkgname}${version}"
+tar cvJf ${pkgname}${version}.tar.xz ${pkgname}${version}/
+
diff --git a/sources b/sources
index 2fd173c..c4f6acb 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b4835a2fb3080e0719f1e198298bbd04 trilead-ssh2-build215.zip
+f634ddd9a45e88b35002cdf597209832 trilead-ssh2-build217.tar.xz
diff --git a/trilead-ssh2-1.0.0-build217.pom b/trilead-ssh2-1.0.0-build217.pom
new file mode 100644
index 0000000..c3e5630
--- /dev/null
+++ b/trilead-ssh2-1.0.0-build217.pom
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.trilead</groupId>
+ <artifactId>trilead-ssh2</artifactId>
+ <version>1.0.0-build217</version>
+ <name>Trilead SSH2 Library</name>
+ <description>Java SSH2 Library</description>
+ <url>http://svn.svnkit.com/repos/3rdparty/com.trilead.ssh2</url>
+ <licenses>
+ <license>
+ <name>Trilead Library License</name>
+ <url>http://www.svnkit.com/TRILEAD-LICENSE.txt</url>
+ </license>
+ </licenses>
+ <developers>
+ <developer>
+ <id>trilead</id>
+ <name>Trilead AG</name>
+ </developer>
+ <developer>
+ <id>tmate</id>
+ <name>TMate Software</name>
+ </developer>
+ </developers>
+ <scm>
+ <connection>scm:svn:http://svn.svnkit.com/repos/3rdparty/com.trilead.ssh2</connection>
+ <url>http://svn.svnkit.com/repos/3rdparty/com.trilead.ssh2</url>
+ </scm>
+</project>
diff --git a/trilead-ssh2.spec b/trilead-ssh2.spec
index 5377316..01482ad 100644
--- a/trilead-ssh2.spec
+++ b/trilead-ssh2.spec
@@ -1,33 +1,19 @@
Name: trilead-ssh2
-Version: 215
-Release: 2%{?dist}
+Version: 217
+Release: 1%{?dist}
Summary: SSH-2 protocol implementation in pure Java
-Group: Development/Tools
-License: BSD
-URL: http://www.trilead.com/Products/Trilead_SSH_for_Java/
-# Not working anymore...
-#http://www.trilead.com/DesktopModules/Releases/download_file.aspx?ReleaseId=4102
-Source0: trilead-ssh2-build%{version}.zip
-Source1: build.xml
-Source2: http://repo1.maven.org/maven2/com/trilead/trilead-ssh2/1.0.0-build%{version}/trilead-ssh2-1.0.0-build%{version}.pom
-
-BuildRequires: jpackage-utils
-BuildRequires: java-devel
-BuildRequires: ant
-Requires: jpackage-utils
-Requires: java
-Requires(post): jpackage-utils
-Requires(postun): jpackage-utils
-
-# javadoc is gone in 215
-Provides: %{name}-javadoc = %{version}-%{release}
-Obsoletes: %{name}-javadoc <= 213-11
+# project is under BSD, but some parts are MIT licensed
+# see LICENSE.txt for more information
+License: BSD and MIT
+URL: http://svn.svnkit.com/repos/3rdparty/com.trilead.ssh2
+# ./generate_tarball.sh
+Source0: trilead-ssh2-build%{version}.tar.xz
+Source1: http://repo1.maven.org/maven2/com/trilead/%{name}/1.0.0-build%{version}/%{name}-1.0.0-build%{version}.pom
-BuildArch: noarch
-
-#Obsoletes: ganymed-ssh2 <= 210
+BuildRequires: maven-local
+BuildArch: noarch
%description
Trilead SSH-2 for Java is a library which implements the SSH-2 protocol in pure
@@ -39,56 +25,46 @@ crypto functionality is included.
%package javadoc
Summary: Javadoc for %{name}
-Group: Documentation
-Requires: %{name} = %{version}-%{release}
-Requires: jpackage-utils
%description javadoc
-API documentation for trilead-ssh2.
+API documentation for %{name}.
%prep
%setup -q -n %{name}-build%{version}
-cp %{SOURCE1} .
-# change file encoding
-iconv -f ISO-8859-1 -t UTF-8 -o HISTORY.txt HISTORY.txt
+cp %{SOURCE1} ./%{name}/pom.xml
-# delete the jars that are in the archive
-find . -name '*.jar' -delete
-
-# fixing wrong-file-end-of-line-encoding warnings
-sed -i 's/\r//' LICENSE.txt README.txt HISTORY.txt
+# compat symlink/alias
+pushd %{name}
+%mvn_file : %{name}/%{name} %{name}
+%mvn_alias : "org.tmatesoft.svnkit:trilead-ssh2"
+popd
%build
-ant
-
+pushd %{name}
+%mvn_build
+popd
%install
-# jar
-install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
-install -m 644 %{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
-
-# pom
-mkdir -p %{buildroot}%{_mavenpomdir}
-cp %{SOURCE2} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
-%add_to_maven_depmap org.tmatesoft.svnkit %{name} %{version} JPP %{name}
+pushd %{name}
+%mvn_install
+popd
-%post
-%update_maven_depmap
-
-%postun
-%update_maven_depmap
-
-
-%files
-%defattr(-,root,root,-)
-%{_mavenpomdir}/JPP-%{name}.pom
-%{_mavendepmapfragdir}/%{name}
-%{_javadir}/*
+%files -f %{name}/.mfiles
+%dir %{_javadir}/%{name}
%doc LICENSE.txt HISTORY.txt README.txt
+%files javadoc -f %{name}/.mfiles-javadoc
+%doc LICENSE.txt
+
%changelog
+* Mon Jan 06 2014 Michal Srb <msrb at redhat.com> - 217-1
+- Adapt to current packaging guidelines
+- Build with XMvn
+- Update to upstream version 217
+- Add alias (Resolves: rhbz#1048829)
+
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 215-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
More information about the scm-commits
mailing list