diff --git a/.gitignore b/.gitignore index e69de29..ba83e37 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/apache-sshd-0.6.0-src.tar.gz diff --git a/apache-sshd-build-the-core-only.patch b/apache-sshd-build-the-core-only.patch new file mode 100644 index 0000000..9cc7903 --- /dev/null +++ b/apache-sshd-build-the-core-only.patch @@ -0,0 +1,11 @@ +--- a/src/pom.xml ++++ b/src/pom.xml +@@ -223,8 +223,6 @@ + + + sshd-core +- sshd-pam +- assembly + + + diff --git a/apache-sshd-dont-download-license.patch b/apache-sshd-dont-download-license.patch new file mode 100644 index 0000000..febe5c4 --- /dev/null +++ b/apache-sshd-dont-download-license.patch @@ -0,0 +1,32 @@ +--- a/src/pom.xml ++++ b/src/pom.xml +@@ -183,29 +183,6 @@ + maven-assembly-plugin + 2.2-beta-4 + +- +- maven-remote-resources-plugin +- +- +- +- process +- +- +- +- org.apache:apache-jar-resource-bundle:1.4 +- +- +- ${projectRoot}/src/legal/notices.xml +- +- +- Apache MINA SSHD +- true +- true +- +- +- +- +- + + + diff --git a/apache-sshd-use-bouncycastle-for-jdk6.patch b/apache-sshd-use-bouncycastle-for-jdk6.patch new file mode 100644 index 0000000..0fae926 --- /dev/null +++ b/apache-sshd-use-bouncycastle-for-jdk6.patch @@ -0,0 +1,28 @@ +--- a/src/pom.xml ++++ b/src/pom.xml +@@ -97,9 +97,9 @@ + ${_javadir}/jzlib.jar + + +- bouncycastle +- bcprov-jdk15 +- 140 ++ org.bouncycastle ++ bcprov-jdk16 ++ 1.46 + + + org.slf4j +--- a/src/sshd-core/pom.xml ++++ b/src/sshd-core/pom.xml +@@ -49,8 +49,8 @@ + true + + +- bouncycastle +- bcprov-jdk15 ++ org.bouncycastle ++ bcprov-jdk16 + true + + diff --git a/apache-sshd-use-jzlib-as-system-dependency.patch b/apache-sshd-use-jzlib-as-system-dependency.patch new file mode 100644 index 0000000..7a0b981 --- /dev/null +++ b/apache-sshd-use-jzlib-as-system-dependency.patch @@ -0,0 +1,11 @@ +--- a/src/pom.xml ++++ b/src/pom.xml +@@ -93,6 +93,8 @@ + com.jcraft + jzlib + 1.0.7 ++ system ++ ${_javadir}/jzlib.jar + + + bouncycastle diff --git a/apache-sshd-use-slf4j-api.patch b/apache-sshd-use-slf4j-api.patch new file mode 100644 index 0000000..6f3c29d --- /dev/null +++ b/apache-sshd-use-slf4j-api.patch @@ -0,0 +1,36 @@ +--- a/src/pom.xml ++++ b/src/pom.xml +@@ -103,13 +103,18 @@ + + + org.slf4j ++ slf4j-api ++ 1.6.1 ++ ++ ++ org.slf4j + slf4j-log4j12 +- 1.4.3 ++ 1.6.1 + + + org.slf4j + slf4j-simple +- 1.4.3 ++ 1.6.1 + + + com.jcraft +--- a/src/sshd-core/pom.xml ++++ b/src/sshd-core/pom.xml +@@ -55,6 +55,10 @@ + + + org.slf4j ++ slf4j-api ++ ++ ++ org.slf4j + slf4j-log4j12 + test + diff --git a/apache-sshd-use-tomcat-apr-as-system-dependency.patch b/apache-sshd-use-tomcat-apr-as-system-dependency.patch new file mode 100644 index 0000000..9fa5720 --- /dev/null +++ b/apache-sshd-use-tomcat-apr-as-system-dependency.patch @@ -0,0 +1,11 @@ +--- a/src/pom.xml ++++ b/src/pom.xml +@@ -93,6 +93,8 @@ + tomcat + tomcat-apr + 5.5.23 ++ system ++ ${_javadir}/tomcat/tomcat-coyote.jar + + + com.jcraft diff --git a/apache-sshd.spec b/apache-sshd.spec new file mode 100644 index 0000000..5054c82 --- /dev/null +++ b/apache-sshd.spec @@ -0,0 +1,136 @@ +Name: apache-sshd +Version: 0.6.0 +Release: 2%{?dist} +Summary: Apache SSHD + +Group: Development/Libraries +License: ASL 2.0 +URL: http://mina.apache.org/sshd + +Source0: http://www.apache.org/dyn/closer.cgi/mina/sshd/%{version}/%{name}-%{version}-src.tar.gz + +# Build the core only: +Patch0: %{name}-build-the-core-only.patch + +# Dont try to download the license file: +Patch1: %{name}-dont-download-license.patch + +# Use jzlib and tomcat-apr as a system dependencies: +Patch2: %{name}-use-jzlib-as-system-dependency.patch +Patch3: %{name}-use-tomcat-apr-as-system-dependency.patch + +# User version of bouncycastle for JDK6: +Patch4: %{name}-use-bouncycastle-for-jdk6.patch + +# Use slf4j-api: +Patch5: %{name}-use-slf4j-api.patch + +BuildArch: noarch + +Requires: java +Requires: jpackage-utils + +Requires: apache-mina >= 2.0.4 +Requires: jzlib >= 1.1.0 +Requires: tomcat-lib >= 7.0.25 + +BuildRequires: jpackage-utils +BuildRequires: java-devel +BuildRequires: maven + +BuildRequires: apache-mina >= 2.0.4 +BuildRequires: jzlib >= 1.1.0 +BuildRequires: bouncycastle >= 1.46 +BuildRequires: tomcat-lib >= 7.0.25 + +BuildRequires: maven-compiler-plugin +BuildRequires: maven-install-plugin +BuildRequires: maven-jar-plugin +BuildRequires: maven-javadoc-plugin +BuildRequires: maven-release-plugin +BuildRequires: maven-resources-plugin +BuildRequires: maven-surefire-plugin + + +%package javadoc +Summary: Javadocs for %{name} +Group: Documentation +Requires: jpackage-utils + + +%description +Apache SSHD is a 100% pure java library to support the SSH protocols on both +the client and server side. + + +%description javadoc +This package contains javadoc for %{name}. + + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 + +%build + +# In the tarball distributed by Apache the source code is inside the srv +# directory: +cd src + +# Skip the tests as they don't run correctly with the current +# version of the jzlib compression library that we have in the +# distribution at the moment: +mvn-rpmbuild \ + -Dmaven.test.skip=true \ + -Dproject.build.sourceEncoding=UTF-8 \ + -D_javadir=%{_javadir} \ + install \ + javadoc:aggregate + + +%install + +# Jar files: +mkdir -p %{buildroot}%{_javadir}/%{name} +cp -p src/sshd-core/target/sshd-core-%{version}.jar %{buildroot}%{_javadir}/%{name}/sshd-core.jar + +# POM files: +install -d -m 755 %{buildroot}%{_mavenpomdir} +install -pm 644 src/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-sshd-parent.pom +install -pm 644 src/sshd-core/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-sshd-core.pom + +# Dependency map: +%add_maven_depmap JPP.%{name}-sshd-parent.pom +%add_maven_depmap JPP.%{name}-sshd-core.pom %{name}/sshd-core.jar + +# Javadoc files: +install -d -m 755 %{buildroot}%{_javadocdir}/%{name} +cp -rp src/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/. + + +%files +%{_mavenpomdir}/* +%{_mavendepmapfragdir}/* +%{_javadir}/* +%doc LICENSE.txt +%doc NOTICE.txt + + +%files javadoc +%{_javadocdir}/%{name} +%doc LICENSE.txt +%doc NOTICE.txt + + +%changelog +* Tue Feb 14 2012 Juan Hernandez 0.6.0-2 +- Corrected the source URL + +* Sun Feb 12 2012 Juan Hernandez 0.6.0-1 +- Initial packaging + diff --git a/sources b/sources index e69de29..f567bad 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +6b7a2dace1e2305c2072fc28f10257d0 apache-sshd-0.6.0-src.tar.gz