/[packages]/cauldron/aalto-xml/current/SPECS/aalto-xml.spec
ViewVC logotype

Contents of /cauldron/aalto-xml/current/SPECS/aalto-xml.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 162999 - (show annotations) (download)
Fri Nov 4 23:46:47 2011 UTC (12 years, 10 months ago) by dmorgan
File size: 2898 byte(s)
SILENT: Bump release
1 %define with_maven 1
2
3 Name: aalto-xml
4 Version: 0.9.7
5 Release: %mkrel 1
6 Summary: Ultra-high performance non-blocking XML processor (Stax API + extensions)
7 Group: Development/Java
8 License: ASL 2.0
9 Url: https://github.com/FasterXML/aalto-xml
10 # mkdir -p aalto-xml-0.9.7
11 # git clone git://github.com/FasterXML/aalto-xml.git
12 # cd aalto-xml
13 # git archive aalto-xml-0.9.7 | tar -x -C ../aalto-xml-0.9.7
14 # cd ..
15 # tar czf aalto-xml-0.9.7-src-git.tar.gz aalto-xml-0.9.7
16 Source0: aalto-xml-0.9.7-src-git.tar.gz
17 Source1: aalto-xml-0.9.7-OSGi-MANIFEST.MF
18
19 BuildRequires: java-devel
20 BuildRequires: jpackage-utils
21 BuildRequires: sonatype-oss-parent
22
23 %if !%with_maven
24 BuildRequires: ant
25 BuildRequires: junit
26 BuildRequires: bea-stax-api
27 %else
28 BuildRequires: junit4
29 BuildRequires: maven-compiler-plugin
30 BuildRequires: maven-gpg-plugin
31 BuildRequires: maven-javadoc-plugin
32 BuildRequires: maven-plugin-bundle
33 BuildRequires: maven-release-plugin
34 BuildRequires: maven-source-plugin
35 BuildRequires: maven-surefire-plugin
36 %endif
37 BuildRequires: woodstox
38
39 Requires: woodstox
40
41 Requires: jpackage-utils
42 Requires(post): jpackage-utils
43 Requires(postun): jpackage-utils
44 Requires: java
45 BuildArch: noarch
46
47 %description
48 Ultra-high performance non-blocking XML processor (Stax/Stax2,
49 SAX/SAX2).
50
51 %package javadoc
52 Summary: Javadocs for %{name}
53 Group: Development/Java
54 Requires: jpackage-utils
55
56 %description javadoc
57 This package contains the API documentation for %{name}.
58
59 %prep
60 %setup -q
61
62 find . -iname '*.jar' -delete
63 find . -iname '*.class' -delete
64 %if !%with_maven
65 ln -sf $(build-classpath junit) lib/test/junit-3.8.1.jar
66 # lib/test/stax2test-3.1.1.jar
67 ln -sf $(build-classpath woodstox-stax2-api) lib/stax2-api-3.1.1.jar
68 ln -sf $(build-classpath bea-stax-api) lib/stax-api-1.0.1.jar
69 sed -i "s|0.9.5|%{version}|" build.xml
70 # FIXME mkdir -p build/classes/META-INF
71 # cp -pr src/main/resources/* build/classes/META-INF
72 %endif
73
74 %build
75
76 %if !%with_maven
77 # ant jars javadoc test
78 # mkdir -p META-INF
79 # cp -p %{SOURCE1} META-INF/MANIFEST.MF
80 # touch META-INF/MANIFEST.MF
81 # zip -u build/aalto-gpl-%{version}.jar META-INF/MANIFEST.MF
82 %else
83 mvn-rpmbuild -e \
84 install javadoc:javadoc
85 %endif
86
87 %install
88 [ %{buildroot} != / ] && rm -rf %{buildroot}
89
90 mkdir -p %{buildroot}%{_javadir}
91 install -pm 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
92
93 mkdir -p %{buildroot}%{_mavenpomdir}
94 install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
95 %add_maven_depmap JPP-%{name}.pom %{name}.jar
96
97 mkdir -p %{buildroot}%{_javadocdir}/%{name}
98 cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
99
100 %post
101 %update_maven_depmap
102
103 %preun
104 %update_maven_depmap
105
106 %files
107 %{_javadir}/%{name}.jar
108 %{_mavenpomdir}/*
109 %{_mavendepmapfragdir}/*
110 %doc README release-notes/*
111
112 %files javadoc
113 %{_javadocdir}/%{name}

  ViewVC Help
Powered by ViewVC 1.1.30