File relaxngDatatype.spec of Package relaxngDatatype

#
# spec file for package relaxngDatatype (Version 1.0)
#
# Copyright (c) 2008 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/
#

# norootforbuild

%define section   free

Name:           relaxngDatatype
Version:        1.0
Release:        2
Summary:        RELAX NG Datatype API
Group:          Development/Languages/Java
License:        BSD 3-Clause
# Note, this project is currently unmaintaned
Url:            https://sourceforge.net/projects/relaxng
Source0:        relaxngDatatype-1.0.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  jpackage-utils
BuildRequires:  ant
BuildRequires:  java-devel
#Obsoletes:      msv

%description
RELAX NG is a public space for test cases and other ancillary software
related to the construction of the RELAX NG language and its
implementations.



%package        javadoc
License:        BSD 3-Clause
Summary:        RELAX NG Datatype API
Group:          Development/Languages/Java

%description    javadoc
RELAX NG is a public space for test cases and other ancillary software
related to the construction of the RELAX NG language and its
implementations.



%prep
%setup -q -n %{name}-%{version}
# wrong end of line necoding
sed -i -e 's/.$//' copying.txt

%build
ant -Dbuild.sysclasspath=only -Dant.build.javac.source=1.4 -Dant.build.javac.target=1.5

%install
install -Dpm 644 %{name}.jar \
  $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
#
install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr doc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -sf %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
#

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc copying.txt
%{_javadir}/*.jar

%files javadoc
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}

%changelog
* Thu Aug 07 2008 mvyskocil@suse.cz
- First release of version 1.0 in Suse (based on spec from jpackage.org 1.7)