]> git.pld-linux.org Git - packages/nailgun.git/blob - nailgun.spec
5bf57dce6b89f444c759012f58b5577af4515a31
[packages/nailgun.git] / nailgun.spec
1 # TODO
2 # - fix testing
3
4 # Conditional build:
5 %bcond_without  javadoc         # don't build javadoc
6 %bcond_with     tests           # build without tests
7
8 %include        /usr/lib/rpm/macros.java
9 Summary:        Framework for running Java from the cli without the JVM startup overhead
10 Name:           nailgun
11 Version:        0.7.1
12 Release:        0.1
13 License:        Apache v2.0
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
20 BuildRequires:  ant
21 %{?with_tests:BuildRequires:    ant-junit}
22 BuildRequires:  jdk
23 BuildRequires:  jpackage-utils
24 Requires:       jpackage-utils
25 Requires:       jre
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
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.
33
34 %package javadoc
35 Summary:        Javadocs for %{name}
36 Group:          Documentation
37
38 %description javadoc
39 This package contains the API documentation for %{name}.
40
41 %prep
42 %setup -q
43 %patch0 -p1
44 %patch1 -p1
45
46 find -name '*.jar' | xargs rm -v
47
48 %build
49 %ant compile-server jar %{?with_tests:test} %{?with_apidocs:javadoc}
50
51 # rebuild with our cflags
52 %{__cc} -Wall -pedantic %{rpmcppflags} %{rpmcflags} %{rpmldflags} -o ng src/c/ng.c
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT{%{_javadir},%{_bindir}}
57
58 cp -p dist/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/
59 ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
60
61 install -p ng $RPM_BUILD_ROOT%{_bindir}/ng
62
63 # javadoc
64 %if %{with javadoc}
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
68 %endif
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %post javadoc
74 ln -nfs %{name}-%{version} %{_javadocdir}/%{name}
75
76 %files
77 %defattr(644,root,root,755)
78 %doc LICENSE.txt README.txt
79 %{_javadir}/nailgun.jar
80 %attr(755,root,root) %{_bindir}/ng
81
82 %if %{with javadoc}
83 %files javadoc
84 %defattr(644,root,root,755)
85 %{_javadocdir}/%{name}-%{version}
86 %ghost %{_javadocdir}/%{name}
87 %endif
This page took 0.07374 seconds and 2 git commands to generate.