Name: jericho-html Version: 3.1 Release: 3%{?dist} Summary: Java library allowing analysis and manipulation of parts of an HTML document Group: Development/Libraries License: EPL or LGPLv2+ URL: http://jericho.htmlparser.net/ Source0: http://downloads.sf.net/jerichohtml/%{name}-%{version}.zip BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils BuildRequires: jakarta-commons-logging BuildRequires: log4j BuildRequires: slf4j #For tests BuildRequires: junit4 Requires: java >= 1:1.6.0 Requires: jpackage-utils %description Jericho HTML Parser is a java library allowing analysis and manipulation of parts of an HTML document, including server-side tags, while reproducing verbatim any unrecognized or invalid HTML. It also provides high-level HTML form manipulation functions. It is an open source library released under both the Eclipse Public License (EPL) and GNU Lesser General Public License (LGPL). You are therefore free to use it in commercial applications subject to the terms detailed in either one of these license documents. %package javadoc Summary: Javadocs for %{name} Group: Documentation Requires: jpackage-utils %description javadoc This package contains the API documentation for %{name}. %prep %setup -q find \( -name '*.class' -o -name '*.[jw]ar' \) -exec rm -f '{}' + find \( -name '*.java' -o -name '*.bat' -o -name '*.txt' -o -name '*.jsp' -o -name '*.css' -o -name '*.xml' \) -exec sed -i 's/\r//' '{}' + %build export CLASSPATH=$(build-classpath slf4j/api commons-logging log4j) javac -Xlint -g:none -d classes src/java/net/htmlparser/jericho/*.java src/java/net/htmlparser/jericho/nodoc/*.java jar -cf dist/%{name}-%{version}.jar -C classes . javadoc -quiet -windowtitle "Jericho HTML Parser %version" -use -d docs/javadoc -subpackages net.htmlparser.jericho -exclude net.htmlparser.jericho.nodoc -noqualifier net.htmlparser.jericho -group "Core Package" src/java/net/htmlparser/jericho/*.java cat docs/src/append/stylesheet.css >> docs/javadoc/stylesheet.css cp docs/src/replace/*.* docs/javadoc javac -Xlint -g -deprecation -classpath dist/%{name}-%{version}.jar -d samples/console/classes samples/console/src/*.java %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_javadir} cp -p dist/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir} ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar mkdir -p $RPM_BUILD_ROOT%{_javadocdir} cp -rp docs/javadoc $RPM_BUILD_ROOT%{_javadocdir}/%{name} # Install link for web app ln -s %{_javadir}/%{name}-%{version}.jar samples/webapps/JerichoHTML/WEB-INF/lib %check rm -rf test/classes mkdir -p test/classes export CLASSPATH=classes:samples/console/classes:$(build-classpath junit4.jar) javac -Xlint -g -d test/classes test/src/*.java test/src/samples/*.java test/src/net/htmlparser/jericho/*.java java -classpath $CLASSPATH:test/classes -Djava.util.logging.config.file=test/logging.properties org.junit.runner.JUnitCore TestSuite %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc licence-epl-1.0.html licence-lgpl-2.1.txt licence.txt %doc project-description.txt release.txt %doc samples %{_javadir}/%{name}.jar %{_javadir}/%{name}-%{version}.jar %files javadoc %defattr(-,root,root,-) %{_javadocdir}/%{name} %changelog * Mon Jun 28 2010 Orion Poplawski <orion@cora.nwra.com> - 3.1-3 - Fix Groups again - Link to jar in sample webapp * Fri Jun 25 2010 Orion Poplawski <orion@cora.nwra.com> - 3.1-2 - Fix spelling errors - Change package groups - Fix Requires and BuildRequires - Fix Summary - Don't need to copy library for tests * Mon Oct 5 2009 Orion Poplawski <orion@cora.nwra.com> - 3.1-1 - Initial Fedora Package