File sac.spec of Package sac

# spec file for package sac
# Copyright (c) 2017 SUSE LINUX 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

Name:           sac
Version:        1.3
Release:        0
Summary:        Java standard interface for CSS parser
License:        W3C
Group:          Development/Libraries/Java
#Original source:{name}java-%{version}.zip
#unzip, find . -name "*.jar" -exec rm {} \;
#to simplify the licensing
Source0:        %{name}java-%{version}
Source1:        %{name}-build.xml
Source2:        %{name}-MANIFEST.MF
BuildRequires:  ant
BuildRequires:  java-devel >= 1.6.0
BuildRequires:  javapackages-local
BuildRequires:  javapackages-tools
BuildRequires:  unzip
BuildRequires:  zip
Requires:       java
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

SAC is a standard interface for CSS parsers, intended to work with CSS1, CSS2,
CSS3 and other CSS derived languages.

%package javadoc
Summary:        Javadoc for %{name}
Group:          Documentation/HTML

%description javadoc
Javadoc for %{name}.

%setup -q
install -m 644 %{SOURCE1} build.xml
find . -name "*.jar" -exec rm -f {} \;

ant \ \
    jar javadoc

# inject OSGi manifests
mkdir -p META-INF
zip -u build/lib/sac.jar META-INF/MANIFEST.MF

mkdir -p %{buildroot}%{_javadir}
cp -p ./build/lib/sac.jar %{buildroot}%{_javadir}/sac.jar

install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr build/api/* %{buildroot}%{_javadocdir}/%{name}

# poms
install -d -m 755 %{buildroot}%{_mavendepmapfragdir}
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 %{SOURCE3} \

%add_maven_depmap JPP-%{name}.pom %{name}.jar

%doc COPYRIGHT.html
%if 0%{?suse_version} > 1320

%files javadoc
%doc COPYRIGHT.html

openSUSE Build Service is sponsored by