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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30