diff --git a/portlet-2.0-api.spec b/portlet-2.0-api.spec new file mode 100644 index 0000000..35da449 --- /dev/null +++ b/portlet-2.0-api.spec @@ -0,0 +1,50 @@ +%global api_version 2.0 +%global pkg_name portlet-api_%{api_version}_spec +Name: portlet-2.0-api +Version: 1.0 +Release: 1 +Summary: Java Portlet Specification V2.0 +License: ASL 2.0 +Url: http://portals.apache.org/ +Source0: https://repo1.maven.org/maven2/org/apache/portals/portlet-api_2.0_spec/1.0/portlet-api_2.0_spec-1.0-project.tar.gz +BuildRequires: mvn(org.apache.portals:portals-pom:pom:) +BuildRequires: mvn(org.apache.tomcat:tomcat-servlet-api) maven-local maven-plugin-bundle +BuildArch: noarch +%description +The Java Portlet API version 2.0 developed by the +Java Community Process JSR-286 Expert Group. + +%package javadoc +Summary: Javadoc for %{name} +%description javadoc +This package contains javadoc for %{name}. + +%prep +%setup -q -n portlet-api_2.0_spec-%{version} +find . -name '*.class' -delete +find . -name '*.jar' -delete +for p in LICENSE NOTICE;do + iconv -f iso8859-1 -t utf-8 ${p} > ${p}.conv && mv -f ${p}.conv ${p} + sed -i 's/\r//' ${p} +done +sed -i "s|javax.servlet.http;version=2.4,*|javax.servlet.http;version=3.0,*|" pom.xml +%pom_remove_dep javax.servlet:servlet-api +%pom_add_dep org.apache.tomcat:tomcat-servlet-api::provided +%mvn_file :%{pkg_name} %{name} +%mvn_alias :%{pkg_name} javax.portlet:portlet-api + +%build +%mvn_build -- -Dproject.build.sourceEncoding=UTF-8 + +%install +%mvn_install + +%files -f .mfiles +%license LICENSE NOTICE + +%files javadoc -f .mfiles-javadoc +%license LICENSE NOTICE + +%changelog +* Mon Aug 3 2020 yanan li - 1.0-1 +- Package init diff --git a/portlet-2.0-api.yaml b/portlet-2.0-api.yaml new file mode 100644 index 0000000..4cbf431 --- /dev/null +++ b/portlet-2.0-api.yaml @@ -0,0 +1,4 @@ +version_control: NA +src_repo: NA +tag_prefix: NA +seperator: NA diff --git a/portlet-api_2.0_spec-1.0-project.tar.gz b/portlet-api_2.0_spec-1.0-project.tar.gz new file mode 100644 index 0000000..d9f5a87 Binary files /dev/null and b/portlet-api_2.0_spec-1.0-project.tar.gz differ