Blame SPECS/apache-commons-fileupload.spec

7b5c18
%global pkg_name apache-commons-fileupload
7b5c18
%{?scl:%scl_package %{pkg_name}}
7b5c18
%{?java_common_find_provides_and_requires}
7b5c18
7b5c18
Name:             %{?scl_prefix}%{pkg_name}
7b5c18
Version:          1.3.2
7b5c18
Release:          1%{?dist}
7b5c18
Summary:          This package provides an api to work with html file upload
7b5c18
License:          ASL 2.0
7b5c18
Group:            Development/Libraries
7b5c18
URL:              http://commons.apache.org/fileupload
7b5c18
Source0:          http://www.apache.org/dist/commons/fileupload/source/commons-fileupload-%{version}-src.tar.gz
7b5c18
BuildArch:        noarch
7b5c18
7b5c18
BuildRequires:    %{?scl_prefix}mvn(commons-io:commons-io)
7b5c18
BuildRequires:    %{?scl_prefix}mvn(javax.servlet:servlet-api)
7b5c18
BuildRequires:    %{?scl_prefix}mvn(junit:junit)
7b5c18
BuildRequires:    %{?scl_prefix_maven}mvn(org.apache.commons:commons-parent:pom:)
7b5c18
BuildRequires:    %{?scl_prefix_maven}mvn(org.apache.maven.plugins:maven-assembly-plugin)
7b5c18
BuildRequires:    %{?scl_prefix_maven}mvn(org.apache.maven.plugins:maven-release-plugin)
7b5c18
7b5c18
7b5c18
%description
7b5c18
The javax.servlet package lacks support for rfc 1867, html file
7b5c18
upload.  This package provides a simple to use api for working with
7b5c18
such data.  The scope of this package is to create a package of Java
7b5c18
utility classes to read multipart/form-data within a
7b5c18
javax.servlet.http.HttpServletRequest
7b5c18
7b5c18
%package javadoc
7b5c18
Summary:          API documentation for %{name}
7b5c18
Group:            Documentation
7b5c18
7b5c18
%description javadoc
7b5c18
This package contains the API documentation for %{name}.
7b5c18
7b5c18
7b5c18
%prep
7b5c18
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
7b5c18
%setup -q -n commons-fileupload-%{version}-src
7b5c18
sed -i 's/\r//' LICENSE.txt
7b5c18
sed -i 's/\r//' NOTICE.txt
7b5c18
7b5c18
# remove portlet stuff
7b5c18
%pom_remove_dep portlet-api:portlet-api
7b5c18
%pom_xpath_remove pom:properties/pom:commons.osgi.import
7b5c18
%pom_xpath_remove pom:properties/pom:commons.osgi.dynamicImport
7b5c18
rm -r src/main/java/org/apache/commons/fileupload/portlet
7b5c18
7b5c18
%{?scl:EOF}
7b5c18
7b5c18
%build
7b5c18
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
7b5c18
# fix build with generics support
7b5c18
# tests fail to compile because they use an obsolete version of servlet API (2.4)
7b5c18
%mvn_build -f
7b5c18
%{?scl:EOF}
7b5c18
7b5c18
%install
7b5c18
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
7b5c18
%mvn_install
7b5c18
%{?scl:EOF}
7b5c18
7b5c18
%files -f .mfiles
7b5c18
%dir %{_javadir}/%{pkg_name}
7b5c18
%doc LICENSE.txt NOTICE.txt
7b5c18
7b5c18
%files javadoc -f .mfiles-javadoc
7b5c18
%doc LICENSE.txt NOTICE.txt
7b5c18
7b5c18
%changelog
7b5c18
* Tue Jul 26 2016 Michael Simacek <msimacek@redhat.com> - 1.3.2-1
7b5c18
- Prepare for rh-java-common inclusion
7b5c18
- Update to version 1.3.2
7b5c18
7b5c18
* Fri Jun 24 2016 Severin Gehwolf <sgehwolf@redhat.com> 1.3-1
7b5c18
- Initial package.