5 %bcond_without javadoc # don't build javadoc
6 %bcond_with tests # build without tests
8 %include /usr/lib/rpm/macros.java
9 Summary: Framework for running Java from the cli without the JVM startup overhead
14 Group: Applications/System
15 Source0: http://downloads.sourceforge.net/nailgun/%{name}-src-%{version}.zip
16 # Source0-md5: 79365e339275d774b7c5c8b17b7ece40
17 URL: http://martiansoftware.com/nailgun/
18 Patch0: remove-tools-jar-dependencies.patch
19 Patch1: notestdep.patch
21 %{?with_tests:BuildRequires: ant-junit}
23 BuildRequires: jpackage-utils
24 Requires: jpackage-utils
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Nailgun is a client, protocol, and server for running Java programs
30 from the command line without incurring the JVM startup overhead.
31 Programs run in the server (which is implemented in Java), and are
32 triggered by the client (written in C), which handles all I/O.
35 Summary: Javadocs for %{name}
39 This package contains the API documentation for %{name}.
46 find -name '*.jar' | xargs rm -v
49 %ant compile-server jar %{?with_tests:test} %{?with_apidocs:javadoc}
51 # rebuild with our cflags
52 %{__cc} -Wall -pedantic %{rpmcppflags} %{rpmcflags} %{rpmldflags} -o ng src/c/ng.c
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT{%{_javadir},%{_bindir}}
58 cp -p dist/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/
59 ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
61 install -p ng $RPM_BUILD_ROOT%{_bindir}/ng
65 install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
66 cp -a docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
67 ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
71 rm -rf $RPM_BUILD_ROOT
74 ln -nfs %{name}-%{version} %{_javadocdir}/%{name}
77 %defattr(644,root,root,755)
78 %doc LICENSE.txt README.txt
79 %{_javadir}/nailgun.jar
80 %attr(755,root,root) %{_bindir}/ng
84 %defattr(644,root,root,755)
85 %{_javadocdir}/%{name}-%{version}
86 %ghost %{_javadocdir}/%{name}