# # spec file for package sitemesh # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Summary: A web layout and application integration framework Name: sitemesh Source9999: version Version: 2.1 Release: 0.12.50.uyuni3 License: Apache-2.0 Group: Development/Libraries/Java Url: http://www.opensymphony.com/sitemesh/ Source0: %{name}-%{version}-sources.zip Patch0: sitemesh-2.1-sources-fix-author.patch Patch1: sitemesh-2.1-jdk11.patch Patch2: no-velocity.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: apache-commons-collections BuildRequires: xerces-j2 junit servletapi4 BuildRequires: ant-junit BuildRequires: fdupes BuildRequires: java-devel %if 0%{?rhel} BuildRequires: java-11-openjdk-devel %endif BuildRequires: unzip BuildArch: noarch %description SiteMesh is a web-page layout and decoration framework and web- application integration framework to aid in creating large sites consisting of many pages for which a consistent look/feel, navigation and layout scheme is required. %package javadoc License: Apache-2.0 Summary: Javadoc for sitemesh Group: Development/Documentation %description javadoc Javadoc for sitemesh. %prep mkdir sitemesh cd sitemesh unzip %{SOURCE0} %patch0 -p1 %patch1 -p0 %patch2 -p1 # Remove the jars that shipped with it to replace with jpackage jars rm -Rfv lib/*.jar build-jar-repository -p lib/ commons-collections xerces-j2 junit servletapi4 # Remove freemarker dirs, which contain the code that depends on freemarker. find . -name freemarker -type d | xargs rm -Rfv %build cd sitemesh ls -l lib %if 0%{?rhel} export JAVA_HOME=/usr/lib/jvm/java-11-openjdk/ %endif %if 0%{?suse_version} ant -Dant.build.javac.source=1.7 -Dant.build.javac.target=1.7 %else ant %endif %install rm -rf $RPM_BUILD_ROOT # jar install -d -m 755 $RPM_BUILD_ROOT%{_javadir} install -m 644 sitemesh/dist/sitemesh-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) # javadoc install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -pr sitemesh/dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} %fdupes -s $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} %clean rm -rf $RPM_BUILD_ROOT %post javadoc rm -f %{_javadocdir}/%{name} ln -s %{name}-%{version} %{_javadocdir}/%{name} %postun javadoc if [ "$1" = "0" ]; then rm -f %{_javadocdir}/%{name} fi %files %defattr(0644,root,root,0755) %{_javadir}/* %files javadoc %defattr(0644,root,root,0755) %{_javadocdir}/%{name}-%{version} %changelog * Wed Apr 13 2022 Stefan Bluhm - Removed velocity from BuildRequires. * Wed Mar 30 2022 Cédric Bosdonnat - Remove the need of velocity - Add: * no-velocity.patch * Mon Dec 14 2020 Stefan Bluhm - Updated for RHEL build. * Tue Dec 11 2018 moio@suse.com - Fix building against JDK 11 - Add: * sitemesh-2.1-jdk11.patch * Mon Nov 6 2017 jgonzalez@suse.com - Patch build to for JDK9 - Fix incorrect character at author's name - Add: * sitemesh-2.1-sources-fix-author.patch * Sat Jun 28 2014 smoioli@suse.com - updated licenses and dependencies to build on SLE12 * Thu Dec 9 2010 mc@suse.de - initial release