packages java-jhighlight.spec
      Pages: < 1 >  DOWNLOAD      
Name:          java-jhighlight
Version:       1.0
Release:       2mamba
Summary:       Small embeddable pure Java library for syntax highlighting
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      Silvan Calarco <silvan.calarco@...>
URL:           https://jhighlight.dev.java.net/
Source0:       https://jhighlight.dev.java.net/files/documents/3366/30845/jhighlight-%{version}-src.zip
Source1:       http://repo1.maven.org/maven2/com/uwyn/jhighlight/%{version}/jhighlight-%{version}.pom
License:       Common Development and Distribution License
BuildRequires: apache-ant
%if "%{stage1}" != "1"
BuildRequires: apache-tomcat5-servletapi5
%else
BuildRequires: java-servletapi4
%endif
BuildRequires: java-jflex
BuildRequires: jpackage-utils
%if "%{stage1}" != "1"
Requires:      apache-tomcat5-servletapi5
%else
Requires:      java-servletapi4
%endif
Requires:      jpackage-utils
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
JHighlight is an embeddable pure Java syntax highlighting library that supports Java,
Groovy, C++, HTML, XHTML, XML and LZX languages and outputs to XHTML.

It also supports RIFE templates tags and highlights them clearly so that you can easily identify the
difference between your RIFE markup and the actual marked up source.

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

%description javadoc
Small embeddable pure Java library for syntax highlighting.

This package contains javadoc for %{name}.

%prep
%setup -q -n jhighlight-%{version}-src

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

pushd lib
	ln -sf $(build-classpath jflex-1.4.1) jflex-1.4.1.jar
%if "%{stage1}" != "1"
	ln -sf $(build-classpath servletapi5) servlet-2.3.jar
%else
	ln -sf $(build-classpath servletapi4) servlet-2.3.jar
%endif
popd

%build
ant

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

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

install -m 644 build/dist/jhighlight-%{version}.jar \
 	%{buildroot}%{_javadir}/jhighlight-%{version}.jar

(
	cd %{buildroot}%{_javadir}
	for jar in *-%{version}*; do
		ln -sf ${jar} ${jar/-%{version}/}
	done
)
install -m 644 %{SOURCE1} \
 	%{buildroot}%{_datadir}/maven2/poms/JPP-jhighlight.pom
%add_to_maven_depmap com.uwyn jhighlight %{version} JPP jhighlight

mkdir -p %{buildroot}%{_javadocdir}/jhighlight-%{version}
cp -pr build/javadocs/jhighlight-javadocs-%{version}/docs/api/* \
	%{buildroot}%{_javadocdir}/jhighlight-%{version}
ln -s jhighlight-%{version} %{buildroot}%{_javadocdir}/jhighlight

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

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root)
%{_javadir}/jhighlight-%{version}.jar
%{_javadir}/jhighlight.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc COPYING README

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

%changelog
* Thu Nov 25 2010 gil <puntogil@...> 1.0-2mamba
- rebuilt devel

* Mon Jul 06 2009 gil <puntogil@...> 1.0-1mamba
- package created by autospec