2008-03-26 16:03:16 +01:00
|
|
|
#
|
2011-09-23 10:19:06 +02:00
|
|
|
# spec file for package apache-portlet-1_0-api
|
2008-03-26 16:03:16 +01:00
|
|
|
#
|
2013-08-27 13:58:24 +02:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2008-03-26 16:03:16 +01:00
|
|
|
#
|
2008-08-27 03:00:18 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2008-03-26 16:03:16 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define with_maven %{!?_without_maven:1}%{?_without_maven:0}
|
|
|
|
%define without_maven %{?_without_maven:1}%{!?_without_maven:0}
|
|
|
|
%define with_maven 0
|
2013-08-27 13:58:24 +02:00
|
|
|
%define short_name portlet
|
|
|
|
%define base_name %{short_name}-1.0-api
|
2008-03-26 16:03:16 +01:00
|
|
|
|
|
|
|
Name: apache-portlet-1_0-api
|
|
|
|
Version: 1.0
|
2013-08-27 13:58:24 +02:00
|
|
|
Release: 0
|
2008-03-26 16:03:16 +01:00
|
|
|
Summary: Portlet API 1.0 from Jetspeed2
|
2011-12-06 17:58:37 +01:00
|
|
|
License: Apache-2.0
|
2008-03-26 16:03:16 +01:00
|
|
|
Group: Development/Libraries/Java
|
2013-08-27 13:58:24 +02:00
|
|
|
Url: http://portals.apache.org/jetspeed-2/
|
2008-03-26 16:03:16 +01:00
|
|
|
Source0: apache-portlet-1.0-api.tar.gz
|
|
|
|
# svn export http://svn.apache.org/repos/asf/portals/jetspeed-2/tags/JETSPEED-RELEASE-2.0/portlet-api/
|
|
|
|
Source1: apache-portlet-1.0-api-pom.xml
|
|
|
|
Source2: apache-portlet-1.0-api-LICENSE.TXT
|
|
|
|
Source3: apache-portlet-1.0-api-build.xml
|
2013-08-27 13:58:24 +02:00
|
|
|
BuildRequires: ant >= 1.6
|
|
|
|
BuildRequires: ant-nodeps
|
2008-03-26 16:03:16 +01:00
|
|
|
BuildRequires: java-devel >= 1.4
|
2013-09-09 13:50:07 +02:00
|
|
|
BuildRequires: javapackages-tools
|
2008-03-26 16:03:16 +01:00
|
|
|
%if %{with_maven}
|
|
|
|
BuildRequires: maven2 >= 2.0.4-9
|
|
|
|
BuildRequires: maven2-plugin-compiler
|
|
|
|
BuildRequires: maven2-plugin-install
|
|
|
|
BuildRequires: maven2-plugin-jar
|
|
|
|
BuildRequires: maven2-plugin-javadoc
|
|
|
|
BuildRequires: maven2-plugin-release
|
|
|
|
BuildRequires: maven2-plugin-resources
|
|
|
|
BuildRequires: maven2-plugin-surefire
|
|
|
|
%endif
|
2013-09-09 13:50:07 +02:00
|
|
|
PreReq: javapackages-tools
|
2008-03-26 16:03:16 +01:00
|
|
|
Provides: portlet = %{version}
|
|
|
|
Provides: portlet-1.0-api = %{version}
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
Java Standard Portlet API accoring to JSR-168, from Jetspeed-2 .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Portlet API 1.0 from Jetspeed2
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
Requires(post): /bin/rm,/bin/ln
|
|
|
|
Requires(postun): /bin/rm
|
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
Java Standard Portlet API accoring to JSR-168, from Jetspeed-2 .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%{summary}.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n apache-portlet-1.0-api
|
|
|
|
# remove all binary libs
|
|
|
|
find . -name "*.jar" -exec rm -f {} \;
|
|
|
|
cp %{SOURCE1} pom.xml
|
|
|
|
cp %{SOURCE3} build.xml
|
|
|
|
|
|
|
|
%build
|
|
|
|
%if %{with_maven}
|
|
|
|
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
|
|
|
mvn-jpp -e \
|
|
|
|
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
|
|
|
install javadoc:javadoc
|
|
|
|
%else
|
|
|
|
ant jar javadoc
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%install
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
|
|
|
install -m 0644 target/portlet-api-1.0.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
|
|
|
(cd $RPM_BUILD_ROOT%{_javadir} && ln -sf %{name}-%{version}.jar %{base_name}-%{version}.jar)
|
2013-08-27 13:58:24 +02:00
|
|
|
(cd $RPM_BUILD_ROOT%{_javadir} && ln -sf %{name}-%{version}.jar portlet-api-%{version}.jar)
|
2008-03-26 16:03:16 +01:00
|
|
|
# create unversioned symlinks
|
|
|
|
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} $(echo $jar | sed -e 's+-%{version}\.jar+.jar+'); done)
|
2013-08-27 13:58:24 +02:00
|
|
|
|
2008-03-26 16:03:16 +01:00
|
|
|
#poms
|
2013-08-27 13:58:24 +02:00
|
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
|
|
|
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-portlet-api.pom
|
|
|
|
%add_maven_depmap JPP-portlet-api.pom portlet-api.jar
|
|
|
|
|
|
|
|
#javadoc
|
2008-03-26 16:03:16 +01:00
|
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
|
|
|
cp -pr target/site/apidocs/* \
|
|
|
|
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
2008-08-27 03:00:18 +02:00
|
|
|
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
2008-03-26 16:03:16 +01:00
|
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
|
|
|
|
cp %{SOURCE2} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/LICENSE.TXT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%doc %{_docdir}/%{name}-%{version}/LICENSE.TXT
|
|
|
|
%dir %{_docdir}/%{name}-%{version}
|
|
|
|
%{_javadir}/%{name}*.jar
|
|
|
|
%{_javadir}/%{base_name}*.jar
|
2013-08-27 13:58:24 +02:00
|
|
|
%{_javadir}/portlet-api*.jar
|
2008-03-26 16:03:16 +01:00
|
|
|
%{_mavendepmapfragdir}
|
2013-08-27 13:58:24 +02:00
|
|
|
%{_mavenpomdir}/*
|
2008-03-26 16:03:16 +01:00
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{_javadocdir}/%{name}-%{version}
|
2008-08-27 03:00:18 +02:00
|
|
|
%{_javadocdir}/%{name}
|
2008-03-26 16:03:16 +01:00
|
|
|
|
|
|
|
%changelog
|