]> git.pld-linux.org Git - packages/nailgun.git/blob - nailgun.spec
noarch javadoc, BR unzip
[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:        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 BuildRequires:  unzip
25 Requires:       jpackage-utils
26 Requires:       jre
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
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.
34
35 %package javadoc
36 Summary:        Javadocs for %{name}
37 Group:          Documentation
38 %if "%{_rpmversion}" >= "5"
39 BuildArch:      noarch
40 %endif
41
42 %description javadoc
43 This package contains the API documentation for %{name}.
44
45 %prep
46 %setup -q
47 %patch0 -p1
48 %patch1 -p1
49
50 find -name '*.jar' | xargs rm -v
51
52 %build
53 %ant compile-server jar %{?with_tests:test} %{?with_apidocs:javadoc}
54
55 # rebuild with our cflags
56 %{__cc} -Wall -pedantic %{rpmcppflags} %{rpmcflags} %{rpmldflags} -o ng src/c/ng.c
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT{%{_javadir},%{_bindir}}
61
62 cp -p dist/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/
63 ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
64
65 install -p ng $RPM_BUILD_ROOT%{_bindir}/ng
66
67 # javadoc
68 %if %{with javadoc}
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
72 %endif
73
74 %clean
75 rm -rf $RPM_BUILD_ROOT
76
77 %post javadoc
78 ln -nfs %{name}-%{version} %{_javadocdir}/%{name}
79
80 %files
81 %defattr(644,root,root,755)
82 %doc LICENSE.txt README.txt
83 %attr(755,root,root) %{_bindir}/ng
84 %{_javadir}/nailgun*.jar
85
86 %if %{with javadoc}
87 %files javadoc
88 %defattr(644,root,root,755)
89 %{_javadocdir}/%{name}-%{version}
90 %ghost %{_javadocdir}/%{name}
91 %endif
This page took 0.086761 seconds and 3 git commands to generate.