[packages/nailgun: 1/3] new, version 0.7.1
glen
glen at pld-linux.org
Tue Mar 18 19:41:00 CET 2014
commit bef4f9e68c3c106803ae62267c3c07e80bbbf841
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Mar 18 17:51:54 2014 +0200
new, version 0.7.1
based on fedora package
e46b0a94c31b31766679dd3e388532b451a3cf7c
nailgun.spec | 85 +++++++++++++++++++++++++
remove-tools-jar-dependencies.patch | 121 ++++++++++++++++++++++++++++++++++++
2 files changed, 206 insertions(+)
---
diff --git a/nailgun.spec b/nailgun.spec
new file mode 100644
index 0000000..6f7ef60
--- /dev/null
+++ b/nailgun.spec
@@ -0,0 +1,85 @@
+# TODO
+# - fix testing
+
+# Conditional build:
+%bcond_without javadoc # don't build javadoc
+%bcond_with tests # build without tests
+
+%include /usr/lib/rpm/macros.java
+Summary: Framework for running Java from the cli without the JVM startup overhead
+Name: nailgun
+Version: 0.7.1
+Release: 0.1
+License: Apache v2.0
+Group: Applications/System
+Source0: http://downloads.sourceforge.net/nailgun/%{name}-src-%{version}.zip
+# Source0-md5: 79365e339275d774b7c5c8b17b7ece40
+URL: http://martiansoftware.com/nailgun/
+Patch0: remove-tools-jar-dependencies.patch
+BuildRequires: ant
+%{?with_tests:BuildRequires: ant-junit}
+BuildRequires: jdk
+BuildRequires: jpackage-utils
+Requires: jpackage-utils
+Requires: jre
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Nailgun is a client, protocol, and server for running Java programs
+from the command line without incurring the JVM startup overhead.
+Programs run in the server (which is implemented in Java), and are
+triggered by the client (written in C), which handles all I/O.
+
+%package javadoc
+Summary: Javadocs for %{name}
+Group: Documentation
+
+%description javadoc
+This package contains the API documentation for %{name}.
+
+%prep
+%setup -q
+%patch0 -p1
+
+find -name '*.jar' | xargs rm -v
+
+%build
+%ant jar %{?with_tests:test} %{?with_apidocs:javadoc}
+
+# rebuild with our cflags
+%{__cc} -Wall -pedantic %{rpmcppflags} %{rpmcflags} %{rpmldflags} -o ng src/c/ng.c
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_javadir},%{_bindir}}
+
+cp -p dist/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/
+ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
+
+install -p ng $RPM_BUILD_ROOT%{_bindir}/ng
+
+# javadoc
+%if %{with javadoc}
+install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+cp -a docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post javadoc
+ln -nfs %{name}-%{version} %{_javadocdir}/%{name}
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE.txt README.txt
+%{_javadir}/nailgun.jar
+%attr(755,root,root) %{_bindir}/ng
+
+%if %{with javadoc}
+%files javadoc
+%defattr(644,root,root,755)
+%{_javadocdir}/%{name}-%{version}
+%ghost %{_javadocdir}/%{name}
+%endif
diff --git a/remove-tools-jar-dependencies.patch b/remove-tools-jar-dependencies.patch
new file mode 100644
index 0000000..50930d7
--- /dev/null
+++ b/remove-tools-jar-dependencies.patch
@@ -0,0 +1,121 @@
+--- nailgun-0.7.1/build.xml 2005-02-03 22:08:40.000000000 -0500
++++ ../nailgun-0.7.1/build.xml 2010-01-26 16:14:42.645034236 -0500
+@@ -32,35 +32,22 @@
+
+ <property name="build" value="build/ant"/>
+ <property name="build.prod" value="${build}/prod"/>
+ <property name="build.test" value="${build}/test"/>
+ <property name="build.debug" value="${build}/prod-debug"/>
+- <property name="build.instrumented" value="${build}/prod-instrumented"/>
+
+ <property name="docs" value="docs"/>
+ <property name="docs.junit" value="${docs}/junit"/>
+- <property name="docs.jcoverage" value="${docs}/jcoverage"/>
+ <property name="docs.javadoc" value="${docs}/api"/>
+
+ <property name="dist" value="dist"/>
+
+- <!-- declare the jcoverage tasks -->
+- <path id="tools.classpath">
+- <fileset dir="tools/lib">
+- <include name="**/*.jar"/>
+- </fileset>
+- </path>
+- <taskdef resource="tasks.properties">
+- <classpath refid="tools.classpath"/>
+- </taskdef>
+-
+ <target name="clean">
+ <delete dir="${build}"/>
+ <delete dir="docs"/>
+ <delete dir="dist"/>
+ <delete file="ng"/>
+- <delete file="jcoverage.ser"/>
+ </target>
+
+ <!-- updates version numbers in client and server code
+ based upon ${version} property. If the version has
+ not changed since the last build, sources remain untouched. -->
+@@ -112,11 +99,10 @@
+ </copy>
+
+ <javac destdir="${build.test}" srcdir="${src.java.test}">
+ <classpath >
+ <pathelement path="${build.prod}"/>
+- <path refid="tools.classpath"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <target name="compile-client" depends="init">
+@@ -128,39 +114,20 @@
+ to installer script. -->
+ <arg line="ng.exe"/>
+ </exec>
+ </target>
+
+- <target name="instrument" depends="compile-server">
+- <mkdir dir="${build.instrumented}"/>
+- <instrument todir="${build.instrumented}">
+- <fileset dir="${build.debug}">
+- <include name="**/*.class"/>
+- <exclude name="com/martiansoftware/nailgun/examples/**"/>
+- <exclude name="com/martiansoftware/nailgun/builtins/**"/>
+- </fileset>
+- </instrument>
+- <copy todir="${build.instrumented}">
+- <fileset dir="${src.java.prod}" excludes="**/*.class"/>
+- </copy>
+-
+- </target>
+-
+-
+ <target name="compile" depends="compile-server,compile-client">
+ </target>
+
+- <target name="test" depends="compile, instrument">
++ <target name="test" depends="compile">
+ <mkdir dir="${docs.junit}"/>
+- <mkdir dir="${docs.jcoverage}"/>
+
+ <junit printsummary="yes" fork="true">
+ <classpath>
+ <pathelement location="${build.test}"/>
+- <pathelement location="${build.instrumented}"/>
+ <pathelement location="${build.prod}"/>
+- <path refid="tools.classpath"/>
+ </classpath>
+
+
+ <formatter type="plain"/>
+ <formatter type="xml"/>
+@@ -176,12 +143,10 @@
+ <fileset dir="${docs.junit}">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ <report format="frames" todir="${docs.junit}"/>
+ </junitreport>
+-
+- <report srcdir="${src.java.prod}" destdir="${docs.jcoverage}"/>
+ </target>
+
+ <target name="jar" depends="test">
+ <mkdir dir="${dist}"/>
+ <jar basedir="${build.prod}" destfile="${dist}/${jar}" excludes="com/martiansoftware/nailgun/examples/**,**/*.java">
+@@ -216,14 +181,13 @@
+
+ <target name="dist" depends="jar, docs">
+ <delete file="${dist}/${zip.src}"/>
+ <delete file="${dist}/${zip}"/>
+ <zip destfile="${dist}/${zip.src}">
+- <zipfileset dir="." prefix="nailgun-${version}" excludes="ng,jcoverage.ser,build/**,dist/**"/>
+ <zipfileset dir="dist" prefix="nailgun-${version}" includes="${jar},${jar.examples}"/>
+ </zip>
+ <zip destfile="${dist}/${zip}">
+ <zipfileset dir="." prefix="nailgun-${version}" includes="README.txt,Makefile,ng.exe,src/c/**"/>
+ <zipfileset dir="dist" prefix="nailgun-${version}" includes="${jar},${jar.examples}"/>
+ </zip>
+ </target>
+-</project>
+\ No newline at end of file
++</project>
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nailgun.git/commitdiff/9a3ab212043988c0d63d2cdb7cc9541f1ab34356
More information about the pld-cvs-commit
mailing list