diff --git a/apache-commons-fileupload.spec b/apache-commons-fileupload.spec
index a153478..8d35475 100644
--- a/apache-commons-fileupload.spec
+++ b/apache-commons-fileupload.spec
@@ -1,6 +1,8 @@
+%bcond_without portlet
+
Name: apache-commons-fileupload
Version: 1.3.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: API to work with HTML file upload
License: ASL 2.0
URL: http://commons.apache.org/fileupload/
@@ -13,8 +15,7 @@ BuildRequires: mvn(commons-io:commons-io)
BuildRequires: mvn(javax.servlet:servlet-api)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.commons:commons-parent:pom:)
-BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin)
-%if 0%{?fedora}
+%if %{with portlet}
BuildRequires: mvn(javax.portlet:portlet-api)
%endif
@@ -38,16 +39,14 @@ This package contains the API documentation for %{name}.
sed -i 's/\r//' LICENSE.txt
sed -i 's/\r//' NOTICE.txt
-%if 0%{?fedora}
+%if %{with portlet}
# fix gId
sed -i "s|portlet-api|javax.portlet|" 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
# -----------------------------------------------------------------------------
@@ -72,6 +71,9 @@ rm src/test/java/org/apache/commons/fileupload/*Portlet*
# -----------------------------------------------------------------------------
%changelog
+* Wed Mar 15 2017 Michael Simacek - 1.3.2-3
+- Convert conditional
+
* Mon Feb 06 2017 Michael Simacek - 1.3.2-2
- Remove unused BR release-plugin