/[packages]/cauldron/apache-portlet-1.0-api/current/SPECS/apache-portlet-1.0-api.spec
ViewVC logotype

Contents of /cauldron/apache-portlet-1.0-api/current/SPECS/apache-portlet-1.0-api.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 478424 - (show annotations) (download)
Fri Sep 13 09:29:39 2013 UTC (5 years, 11 months ago) by dmorgan
File size: 5689 byte(s)
Remove deprecated ant-nodeps
1 # Copyright (c) 2000-2007, JPackage Project
2 # All rights reserved.
3 #
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions
6 # are met:
7 #
8 # 1. Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 # 2. Redistributions in binary form must reproduce the above copyright
11 # notice, this list of conditions and the following disclaimer in the
12 # documentation and/or other materials provided with the
13 # distribution.
14 # 3. Neither the name of the JPackage Project nor the names of its
15 # contributors may be used to endorse or promote products derived
16 # from this software without specific prior written permission.
17 #
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #
30
31 %define _with_gcj_support 1
32 %define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
33
34 # If you don't want to build with maven, and use straight ant instead,
35 # give rpmbuild option '--without maven'
36
37 %define _without_maven 1
38 %define with_maven %{!?_without_maven:1}%{?_without_maven:0}
39 %define without_maven %{?_without_maven:1}%{!?_without_maven:0}
40
41 %define base_name portlet-1.0-api
42
43 %define section free
44
45 Name: apache-portlet-1.0-api
46 Version: 1.0
47 Release: %mkrel 6
48 Epoch: 0
49 Summary: Portlet API 1.0 from Jetspeed2
50 License: Apache License
51 Url: http://portals.apache.org/jetspeed-2/
52 Group: Development/Java
53 Source0: apache-portlet-1.0-api.tar.gz
54 # svn export http://svn.apache.org/repos/asf/portals/jetspeed-2/tags/JETSPEED-RELEASE-2.0/portlet-api/
55 Source1: apache-portlet-1.0-api-pom.xml
56 Source2: apache-portlet-1.0-api-LICENSE.TXT
57 Source3: apache-portlet-1.0-api-build.xml
58 BuildRequires: java-rpmbuild >= 0:1.7.2
59 BuildRequires: java-devel >= 0:1.4
60 BuildRequires: ant >= 0:1.6
61 %if %{with_maven}
62 BuildRequires: maven2 >= 2.0.4-9
63 BuildRequires: maven2-plugin-compiler
64 BuildRequires: maven2-plugin-install
65 BuildRequires: maven2-plugin-jar
66 BuildRequires: maven2-plugin-javadoc
67 BuildRequires: maven2-plugin-release
68 BuildRequires: maven2-plugin-resources
69 BuildRequires: maven2-plugin-surefire
70 %endif
71 Requires(post): jpackage-utils >= 0:1.7.2
72 Requires(postun): jpackage-utils >= 0:1.7.2
73
74 Provides: portlet = %{epoch}:%{version}
75 Provides: portlet-1.0-api = %{epoch}:%{version}
76
77 %if ! %{gcj_support}
78 BuildArch: noarch
79 %endif
80 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
81 %if %{gcj_support}
82 BuildRequires: java-gcj-compat-devel
83 %endif
84
85 %description
86 Java Standard Portlet API accoring to JSR-168, from Jetspeed-2
87
88 %package javadoc
89 Summary: Javadoc %{name}
90 BuildArch: noarch
91 Group: Development/Java
92
93 %description javadoc
94 %{summary}.
95
96
97 %prep
98 %setup -q -n %{name}
99 # remove all binary libs
100 find . -name "*.jar" -exec rm -f {} \;
101 cp %{SOURCE1} pom.xml
102 cp %{SOURCE3} build.xml
103
104
105 %build
106 %if %{with_maven}
107 export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
108 mvn-jpp -e \
109 -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
110 install javadoc:javadoc
111 %else
112 export CLASSPATH=
113 %{ant} jar javadoc
114 %endif
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118 install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
119
120 install -m 0644 target/portlet-api-1.0.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
121 (cd $RPM_BUILD_ROOT%{_javadir} && ln -sf %{name}-%{version}.jar %{base_name}-%{version}.jar)
122
123 %add_to_maven_depmap javax.portlet portlet-api 1.0 JPP %{base_name}
124 # create unversioned symlinks
125 (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} $(echo $jar | sed -e 's+-%{version}\.jar+.jar+'); done)
126
127 #poms
128 install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
129 install -pm 644 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.portlet-api.pom
130
131 install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
132 cp -pr target/site/apidocs/* \
133 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
134 ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
135
136 install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
137 cp %{SOURCE2} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/LICENSE.TXT
138
139 %if %{gcj_support}
140 %{_bindir}/aot-compile-rpm
141 %endif
142
143 %clean
144 rm -rf $RPM_BUILD_ROOT
145
146 %post
147 %update_maven_depmap
148 %if %{gcj_support}
149 %{update_gcjdb}
150 %endif
151
152 %postun
153 %update_maven_depmap
154 %if %{gcj_support}
155 %{clean_gcjdb}
156 %endif
157
158 %files
159 %defattr(0644,root,root,0755)
160 %doc %{_docdir}/%{name}-%{version}/LICENSE.TXT
161 %{_javadir}/%{name}*.jar
162 %{_javadir}/%{base_name}*.jar
163 %{_datadir}/maven2
164 %config(noreplace) %{_mavendepmapfragdir}/*
165 %if %{gcj_support}
166 %dir %{_libdir}/gcj/%{name}
167 %attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
168 %endif
169
170 %files javadoc
171 %defattr(0644,root,root,0755)
172 %{_javadocdir}/%{name}-%{version}
173 %dir %{_javadocdir}/%{name}
174
175

  ViewVC Help
Powered by ViewVC 1.1.26