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
25 Requires: jpackage-utils
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Nailgun is a client, protocol, and server for running Java programs
31 from the command line without incurring the JVM startup overhead.
32 Programs run in the server (which is implemented in Java), and are
33 triggered by the client (written in C), which handles all I/O.
36 Summary: Javadocs for %{name}
38 %if "%{_rpmversion}" >= "5"
43 This package contains the API documentation for %{name}.
50 find -name '*.jar' | xargs rm -v
53 %ant compile-server jar %{?with_tests:test} %{?with_apidocs:javadoc}
55 # rebuild with our cflags
56 %{__cc} -Wall -pedantic %{rpmcppflags} %{rpmcflags} %{rpmldflags} -o ng src/c/ng.c
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT{%{_javadir},%{_bindir}}
62 cp -p dist/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/
63 ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
65 install -p ng $RPM_BUILD_ROOT%{_bindir}/ng
69 install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
70 cp -a docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
71 ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
75 rm -rf $RPM_BUILD_ROOT
78 ln -nfs %{name}-%{version} %{_javadocdir}/%{name}
81 %defattr(644,root,root,755)
82 %doc LICENSE.txt README.txt
83 %attr(755,root,root) %{_bindir}/ng
84 %{_javadir}/nailgun*.jar
88 %defattr(644,root,root,755)
89 %{_javadocdir}/%{name}-%{version}
90 %ghost %{_javadocdir}/%{name}