LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File sitemesh.spec of Package sitemesh (Project Java:base)

# spec file for package sitemesh (Version 2.1)
# Copyright (c) 2010 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/

%define third_party_jars jakarta-commons-collections xerces-j2 junit servletapi4 velocity velocity-tools
%define jpackage_jars %third_party_jars
%define jpackage_reqs %third_party_jars

Summary:        A web-page layout and decoration framework and web application integration framework

Name:           sitemesh
Source9999:     version
Version:        2.1
Release:        0.<RELEASE2>
License:        Other uncritical OpenSource License
Group:          Development/Libraries/Java
Url:            http://www.opensymphony.com/sitemesh/
Source0:        %{name}-%{version}-sources.zip
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  %jpackage_reqs
BuildRequires:  ant-junit
BuildRequires:  java-1.6.0-devel
%if 0%{?suse_version}
BuildRequires:  unzip

BuildArch:      noarch

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:        Other uncritical OpenSource License
Summary:        Javadoc for sitemesh
Group:          Development/Documentation

%description javadoc
Javadoc for sitemesh.

mkdir sitemesh
cd sitemesh
unzip %{SOURCE0}

# Remove the jars that shipped with it to replace with jpackage jars
rm -Rfv lib/*.jar
build-jar-repository -p lib/ %jpackage_jars

# Remove freemarker dirs, which contain the code that depends on freemarker.
find . -name freemarker -type d | xargs rm -Rfv

cd sitemesh
ls -l lib
%if 0%{?suse_version}
ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5


# 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}


%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}

%postun javadoc
if [ "$1" = "0" ]; then
    rm -f %{_javadocdir}/%{name}


%files javadoc