[guacamole-client/f20] Rework spec file for recent Fedora 20 changes

Simone Caronni slaanesh at fedoraproject.org
Mon Aug 26 08:12:52 UTC 2013


commit f20304a6851e1f2a5414f227097bcd16f5ffbb0f
Author: Simone Caronni <negativo17 at gmail.com>
Date:   Mon Aug 26 10:12:25 2013 +0200

    Rework spec file for recent Fedora 20 changes

 guacamole-client.spec |   50 +++++++++++++++++++++++++++---------------------
 1 files changed, 28 insertions(+), 22 deletions(-)
---
diff --git a/guacamole-client.spec b/guacamole-client.spec
index e328860..31b7c7d 100644
--- a/guacamole-client.spec
+++ b/guacamole-client.spec
@@ -1,6 +1,6 @@
 Name:           guacamole-client
 Version:        0.8.2
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Server-side Java components that form the Guacamole application
 
 License:        MPLv1.1 or GPL+ or AGPLv3+
@@ -11,13 +11,12 @@ Patch0:         %{name}-0.8.2-allow-linking.patch
 Patch1:         %{name}-0.8.2-js-assembly.patch
 BuildArch:      noarch
 
-BuildRequires:  java-devel
-BuildRequires:  maven-clean-plugin
-BuildRequires:  maven-dependency-plugin
+BuildRequires:  mvn(org.apache.maven.plugins:maven-clean-plugin)
+BuildRequires:  mvn(org.apache.maven.plugins:maven-dependency-plugin)
 BuildRequires:  maven-local
 BuildRequires:  maven-release-plugin
-BuildRequires:  maven-war-plugin
-BuildRequires:  servlet3
+BuildRequires:  mvn(org.apache.maven.plugins:maven-war-plugin)
+BuildRequires:  servlet = 3.0
 
 %description
 Guacamole is an HTML5 remote desktop gateway.
@@ -33,10 +32,11 @@ The centralized server is provided by the "guacamole-server" package.
 
 %package -n guacamole
 Summary:        The main Guacamole web application
-Requires:       apache-commons-logging
+Requires:       mvn(org.apache.commons:commons-logging)
 Requires:       java
-Requires:       jpackage-utils
-Requires:       slf4j >= 1.6.1
+Requires:       javapackages-tools
+Requires:       mvn(org.slf4j:slf4j-api) >= 1.6.1
+Requires:       mvn(org.slf4j:slf4j-jcl) >= 1.6.1
 Requires:       tomcat
 Requires:       tomcat-native
 Obsoletes:      guacamole-common < 0.8.2
@@ -59,7 +59,11 @@ The centralized server is provided by the "guacd" package and its associated
 "libguac-client-*" packages.
 
 %package -n guacamole-javadoc
-Summary:          API documentation for %{name}
+Summary:        API documentation for %{name}
+Obsoletes:      guacamole-common-javadoc < 0.8.2
+Obsoletes:      guacamole-ext-javadoc < 0.8.2
+Provides:       guacamole-common-javadoc = %{version}-%{release}
+Provides:       guacamole-ext-javadoc = %{version}-%{release}
 
 %description -n guacamole-javadoc
 This package contains the API documentation for %{name}.
@@ -70,16 +74,20 @@ This package contains the API documentation for %{name}.
 %patch1 -p1
 
 %build
-mvn-rpmbuild package javadoc:aggregate
+# Skip automatic installation of the war module; XMvn doesn't support war installation yet (rhbz#963838)
+%mvn_package :guacamole __noinstall
+%mvn_build
 
 %install
+%mvn_install
 # Put data files into tomcat's webapps directory
 mkdir -p %{buildroot}%{_datadir}/tomcat/webapps/guacamole/
-cp -frp guacamole/target/guacamole-%{version}/* %{buildroot}%{_datadir}/tomcat/webapps/guacamole/
+cp -frvp guacamole/target/guacamole-%{version}/* %{buildroot}%{_datadir}/tomcat/webapps/guacamole/
 
 # Use Fedora packaged jar files
-find %{buildroot}%{_datadir}/tomcat/webapps/guacamole/WEB-INF/lib/*jar ! -name "*guacamole*jar" -delete
-for jar in commons-logging.jar slf4j/slf4j-api.jar slf4j/slf4j-jcl.jar; do
+find %{buildroot}%{_datadir}/tomcat/webapps/guacamole/WEB-INF/lib/*jar -delete
+for jar in commons-logging.jar slf4j/slf4j-api.jar slf4j/slf4j-jcl.jar \
+    guacamole-client/guacamole-common.jar guacamole-client/guacamole-ext.jar; do
     ln -sf %{_javadir}/$jar %{buildroot}%{_datadir}/tomcat/webapps/guacamole/WEB-INF/lib/
 done
 
@@ -89,10 +97,6 @@ cp -p guacamole/doc/example/* %{buildroot}%{_sysconfdir}/guacamole
 sed -i -e 's@/path/to@%{_sysconfdir}/guacamole at g' %{buildroot}%{_sysconfdir}/guacamole/guacamole.properties
 ln -sf %{_sysconfdir}/guacamole/guacamole.properties %{buildroot}%{_datadir}/tomcat/webapps/guacamole/WEB-INF/classes/
 
-# Docs
-mkdir -p %{buildroot}%{_javadocdir}/%{name}
-cp -rp target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
-
 %pretrans -n guacamole
 # Workaround for rpm bug; replacing directory with symlink fails.
 # Open since 2008!
@@ -104,18 +108,20 @@ if [ $1 = 0 ]; then
     exit 0
 fi
 
-%files -n guacamole
+%files -n guacamole -f .mfiles
 %doc guacamole/COPYING guacamole-ext/LICENSE guacamole/README
 %{_datadir}/tomcat/webapps/guacamole
 %dir %{_sysconfdir}/guacamole
 %config(noreplace) %{_sysconfdir}/guacamole/user-mapping.xml
 %config(noreplace) %{_sysconfdir}/guacamole/guacamole.properties
 
-%files -n guacamole-javadoc
-%doc guacamole/COPYING guacamole-ext/LICENSE
-%{_javadocdir}/%{name}
+%files -n guacamole-javadoc -f .mfiles-javadoc
 
 %changelog
+* Mon Aug 26 2013 Simone Caronni <negativo17 at gmail.com> - 0.8.2-4
+- Rework spec file for recent Fedora 20 changes.
+- Add proper Obsolete / Provides for javadoc packages.
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.2-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list