openmamba logo
GNU/Linux distribution
general information distribution forum community wiki bugs events
info   software   forum community wiki bugs events
packages java-doctypechanger.spec
      Pages: < 1 >  DOWNLOAD      
Name:          java-doctypechanger
Version:       1.1
Release:       1mamba
Summary:       Modify or remove a DOCTYPE declaration from a byte stream as it is fed into an XML parser
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://doctypechanger.sourceforge.net/
Source0:       http://downloads.sourceforge.net/project/doctypechanger/doctypechanger/%{version}/DoctypeChanger-%{version}-src.tar.gz
Source1:       http://repository.jboss.org/maven2/net/socialchange/doctype/doctype-changer/%{version}/doctype-changer-%{version}.pom
License:       Apache Software License 1.1
BuildRequires: apache-ant
#BuildRequires: ctags
#BuildRequires: java-junit3
BuildRequires: jpackage-utils
Requires:      jpackage-utils
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
DoctypeChanger is a small Java utility that lets you add, modify or remove a DOCTYPE declaration from a
byte stream as it is fed into an XML parser. This gives you complete control over which DTD, if any, your
XML is validated against.

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

%description javadoc
Delegating InputStream to dynamically change an XML document's DOCTYPE declaration.

This package contains javadoc for %{name}.

%prep

%setup -q -n DoctypeChanger-%{version}-src

for j in $(find . -name "*.jar"); do
   	mv $j $j.no
done

%{__perl} -pi -e 's/^Class-Path:.*\n$//g' src/etc/Manifest.mf

%build

export CLASSPATH=""
#CLASSPATH=$CLASSPATH:$(build-classpath junit-3.8.2):build/classes:build/test/classes
ant \
	-Dbuild.sysclasspath=only \
	-Dno.ctags=true \
	jar javadocs docs

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

mkdir -p %{buildroot}%{_javadir}
mkdir -p %{buildroot}%{_datadir}/maven2/poms

install -pm 644 build/DoctypeChanger.jar \
	%{buildroot}%{_javadir}/doctypechanger-%{version}.jar

ln -sf doctypechanger-%{version}.jar %{buildroot}/%{_javadir}/DoctypeChanger-%{version}.jar

install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/maven2/poms/JPP-doctypechanger.pom
%add_to_maven_depmap net.socialchange.doctype doctype-changer %{version} JPP doctypechanger

(
	cd %{buildroot}%{_javadir}
	for jar in *-%{version}*; do
		ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`
	done

)

mkdir -p %{buildroot}%{_javadocdir}/doctypechanger-%{version}
cp -pr build/apidocs/* %{buildroot}%{_javadocdir}/doctypechanger-%{version}
ln -s doctypechanger-%{version} %{buildroot}%{_javadocdir}/doctypechanger

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

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root)
%{_javadir}/DoctypeChanger-%{version}.jar
%{_javadir}/DoctypeChanger.jar
%{_javadir}/doctypechanger-%{version}.jar
%{_javadir}/doctypechanger.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc PROJECT.txt src/etc/licenses/LICENSE.txt
%doc build/etc/overview.html

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

%changelog
* Tue Mar 23 2010 gil <puntogil@...> 1.1-1mamba
- package created by autospec