Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 94f59eb54c63268caf077570449a44ab > files > 4

nekodtd-0.1.11-2.mga3.src.rpm

Name:          nekodtd
Version:       0.1.11
Release:       %mkrel 2
Summary:       CyberNeko DTD Converter
Group:         Development/Java
# This license is based on the Apache Software License, version 1.1.
License:       CyberNeko Software License
Url:           http://people.apache.org/~andyc/neko/doc/dtd/index.html
Source0:       http://www.apache.org/~andyc/neko/nekodtd-latest.tar.gz
Source1:       http://repo1.maven.org/maven2/nekohtml/nekodtd/%{version}/nekodtd-%{version}.pom
Patch0:        nekodtd-0.1.11-build-dtd_xml.patch
BuildRequires: ant
BuildRequires: java-devel
BuildRequires: jpackage-utils
BuildRequires: xerces-j2
BuildRequires: xerces-j2-demo
BuildRequires: xml-commons-apis
Requires:      jpackage-utils
Requires:      xerces-j2
Requires:      xerces-j2-demo
BuildArch:     noarch

%description
NekoDTD is a configuration that parses Document Type Definition (DTD) files and converts the information into an XML
document. This representation can then be processed using standard XML processors and applications to perform
grammar analysis, convert the DTD into other grammar formats, etc. For example, using an XSLT stylesheet, the XML
representation of the DTD can be converted to an equivalent XML Schema or Relax NG grammar. The NekoDTD parser
configuration is written using the Xerces Native Interface (XNI) that is the foundation of the Xerces2 implementation. This
enables you to use NekoDTD with existing XNI tools without modification or rewriting code.

%package javadoc
Group:         Development/Java
Summary:       Javadoc for %{name}
Requires:      %{name} = %{version}-%{release} 
Requires:      jpackage-utils

%description javadoc
NekoDTD - CyberNeko DTD Converter.

This package contains javadoc for %{name}.

%prep
%setup -q -n nekodtd-%{version}
%patch0 -p0

for j in $(find . -name "*.jar"); do
   mv $j $j.no
done
for j in $(find . -name "*.class"); do
   rm -f $j
done
mkdir -p lib
ln -sf $(build-classpath ant) lib
ln -sf $(build-classpath xerces-j2) lib
ln -sf /usr/share/xerces-j2/xerces-j2-samples.jar lib/xercesSamples.jar

%build

ant -f build-dtd.xml jar doc

%install
[ %{buildroot} != / ] && rm -rf %{buildroot}

mkdir -p %{buildroot}%{_javadir}
install -m 644 nekodtd.jar \
  %{buildroot}%{_javadir}/nekodtd-%{version}.jar


mkdir -p %{buildroot}%{_mavenpomdir}
install -m 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-nekodtd.pom
%add_to_maven_depmap nekohtml nekodtd %{version} JPP nekodtd

(
  cd %{buildroot}%{_javadir}
  for jar in *-%{version}*; do
    ln -sf ${jar} ${jar/-%{version}/}
  done
)

mkdir -p %{buildroot}%{_javadocdir}/nekodtd-%{version}
cp -pr doc/dtd/javadoc/* %{buildroot}%{_javadocdir}/nekodtd-%{version}
ln -s nekodtd-%{version} %{buildroot}%{_javadocdir}/nekodtd

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%{_javadir}/nekodtd-%{version}.jar
%{_javadir}/nekodtd.jar
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%doc LICENSE README_dtd TODO_dtd

%files javadoc
%{_javadocdir}/nekodtd-%{version}
%{_javadocdir}/nekodtd



%changelog

* Sat Jan 12 2013 umeabot <umeabot> 0.1.11-2.mga3
+ Revision: 360893
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Tue Sep 06 2011 dmorgan <dmorgan> 0.1.11-1.mga2
+ Revision: 138964
- Adapt to mageia guidelines

  + gil <gil>
    - imported package nekodtd