updated to current upstream/rawhide version

This commit is contained in:
Michael Mraka 2017-03-15 23:31:30 +01:00
commit 81a72c92e5
3 changed files with 54 additions and 74 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@ commons-fileupload-1.2.1-src.tar.gz
/commons-fileupload-1.2.2-src.tar.gz
/commons-fileupload-1.3-src.tar.gz
/commons-fileupload-1.3.1-src.tar.gz
/commons-fileupload-1.3.2-src.tar.gz

View file

@ -1,58 +1,33 @@
%global base_name fileupload
%global short_name commons-%{base_name}
%bcond_without portlet
Name: apache-%{short_name}
Version: 1.3.1
Release: 4%{?dist}
Summary: This package provides an api to work with html file upload
License: ASL 2.0
Group: Development/Libraries
URL: http://commons.apache.org/%{base_name}/
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
BuildArch: noarch
Name: apache-commons-fileupload
Version: 1.3.2
Release: 3%{?dist}
Summary: API to work with HTML file upload
License: ASL 2.0
URL: http://commons.apache.org/fileupload/
BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: maven-local
BuildRequires: junit >= 0:3.8.1
BuildRequires: servlet
BuildRequires: apache-commons-io
BuildRequires: maven-antrun-plugin
BuildRequires: maven-assembly-plugin
BuildRequires: maven-compiler-plugin
BuildRequires: maven-doxia-sitetools
BuildRequires: maven-install-plugin
BuildRequires: maven-jar-plugin
BuildRequires: maven-javadoc-plugin
BuildRequires: maven-plugin-bundle
BuildRequires: maven-release-plugin
BuildRequires: maven-resources-plugin
%if 0%{?fedora} || 0%{?rhel} >= 7
BuildRequires: portlet-2.0-api
Source0: http://www.apache.org/dist/commons/fileupload/source/commons-fileupload-%{version}-src.tar.gz
BuildRequires: maven-local
BuildRequires: mvn(commons-io:commons-io)
BuildRequires: mvn(javax.servlet:servlet-api)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.commons:commons-parent:pom:)
%if %{with portlet}
BuildRequires: mvn(javax.portlet:portlet-api)
%endif
Requires: java-headless >= 1:1.6.0
Requires: jpackage-utils
Requires: apache-commons-io
%if 0%{?fedora} || 0%{?rhel} >= 7
Requires: portlet-2.0-api
%endif
Provides: jakarta-%{short_name} = 1:%{version}-%{release}
Obsoletes: jakarta-%{short_name} < 1:1.2.1-2
%description
The javax.servlet package lacks support for rfc 1867, html file
upload. This package provides a simple to use api for working with
The javax.servlet package lacks support for RFC-1867, HTML file
upload. This package provides a simple to use API for working with
such data. The scope of this package is to create a package of Java
utility classes to read multipart/form-data within a
javax.servlet.http.HttpServletRequest
javax.servlet.http.HttpServletRequest.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation
Requires: jpackage-utils
Obsoletes: jakarta-%{short_name}-javadoc < 1:1.2.1-2
Summary: API documentation for %{name}
%description javadoc
This package contains the API documentation for %{name}.
@ -60,59 +35,63 @@ This package contains the API documentation for %{name}.
# -----------------------------------------------------------------------------
%prep
%setup -q -n %{short_name}-%{version}-src
%setup -q -n commons-fileupload-%{version}-src
sed -i 's/\r//' LICENSE.txt
sed -i 's/\r//' NOTICE.txt
%if 0%{?fedora} || 0%{?rhel} >= 7
%if %{with portlet}
# fix gId
sed -i "s|<groupId>portlet-api</groupId>|<groupId>javax.portlet</groupId>|" pom.xml
%else
# Non-Fedora: remove portlet stuff
%pom_remove_dep portlet-api:portlet-api
%pom_xpath_remove pom:properties/pom:commons.osgi.import
%pom_xpath_remove pom:properties/pom:commons.osgi.dynamicImport
rm -r src/main/java/org/apache/commons/fileupload/portlet
rm src/test/java/org/apache/commons/fileupload/*Portlet*
%endif
# -----------------------------------------------------------------------------
%mvn_file ":{*}" %{name} @1
%mvn_alias : org.apache.commons:
%build
# fix build with generics support
# tests fail to compile because they use an obsolete version of servlet API (2.4)
mvn-rpmbuild -Dmaven.test.skip=true -Dmaven.compile.source=1.5 -Dmaven.compile.target=1.5 install javadoc:javadoc
# -----------------------------------------------------------------------------
%mvn_build -f
%install
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -p -m 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf %{name}.jar %{short_name}.jar
popd # come back from javadir
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
# pom
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{short_name}.pom
%add_maven_depmap JPP-%{short_name}.pom %{short_name}.jar -a "org.apache.commons:%{short_name}"
%mvn_install
%files -f .mfiles
%doc LICENSE.txt NOTICE.txt
%{_javadir}/%{name}.jar
%{_javadir}/%{short_name}.jar
%license LICENSE.txt NOTICE.txt
%files javadoc
%doc LICENSE.txt NOTICE.txt
%doc %{_javadocdir}/%{name}
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt NOTICE.txt
# -----------------------------------------------------------------------------
%changelog
* Wed Mar 15 2017 Michael Simacek <msimacek@redhat.com> - 1.3.2-3
- Convert conditional
* Mon Feb 06 2017 Michael Simacek <msimacek@redhat.com> - 1.3.2-2
- Remove unused BR release-plugin
* Wed Jun 01 2016 Michael Simacek <msimacek@redhat.com> - 1.3.2-1
- Update to upstream version 1.3.2
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Apr 8 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3.1-6
- Update to current packaging guidelines
* Tue Oct 14 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3.1-5
- Remove legacy Obsoletes/Provides for jakarta-commons
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

View file

@ -1 +1 @@
0903f9606096d11a8ff57525fd9ee83c commons-fileupload-1.3.1-src.tar.gz
28bf2d5c025fd076e1a3e30ac9668784 commons-fileupload-1.3.2-src.tar.gz