Name: olfs Version: 1.7.1 Release: 1%{?dist} Summary: OPeNDAP Lightweight Frontend Servlet - client interface for Hyrax Group: System Environment/Daemons License: LGPLv2 URL: http://opendap.org/download/olfs.html Source0: http://www.opendap.org/pub/olfs/olfs-%{version}-src.tgz Source1: context.xml Patch0: olfs-1.7.1-libs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: jpackage-utils BuildRequires: java-devel BuildRequires: ant-junit BuildRequires: commons-codec BuildRequires: commons-httpclient BuildRequires: apache-commons-logging %if 0%{?fedora} >= 15 BuildRequires: apache-commons-cli %else BuildRequires: jakarta-commons-cli %endif BuildRequires: jdom BuildRequires: junit4 BuildRequires: log4j BuildRequires: logback BuildRequires: saxon BuildRequires: slf4j BuildRequires: tomcat6-lib BuildRequires: xalan-j2 #BuildRequires: xerces-j2 #BuildRequires: xsltc Requires: jpackage-utils Requires: java Requires: tomcat6 Requires: commons-codec Requires: commons-httpclient Requires: apache-commons-logging %if 0%{?fedora} >= 15 Requires: apache-commons-cli %else BuildRequires: jakarta-commons-cli %endif Requires: jdom Requires: junit4 Requires: log4j Requires: logback Requires: saxon Requires: slf4j Requires: xalan-j2 %description The OPeNDAP Lightweight Frontend Servlet (OLFS) provides the public- accessible client interface for Hyrax. The OLFS communicates with the Back End Server (BES) to provide data and catalog services to clients. The OLFS implements the DAP2 protocol and supports some of the new DAP4 features. We hope that other groups will develop new front end modules that will implement other protocols. %package javadoc Summary: Javadocs for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} Requires: jpackage-utils %description javadoc This package contains the API documentation for %{name}. %prep %setup -q -n %{name}-%{version}-src %patch0 -p1 -b .libs find -name '*.class' -exec rm -f '{}' \; find -name '*.jar' -exec rm -f '{}' \; build-jar-repository -s -p lib commons-cli commons-codec \ commons-httpclient commons-logging jdom junit4 log4j \ logback/core logback/classic saxon \ servlet slf4j/api tomcat6/catalina.jar xalan-j2 xalan-j2-serializer %build ant server %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_datadir}/tomcat6/webapps/opendap #Explode the war file into webapps unzip -d $RPM_BUILD_ROOT%{_datadir}/tomcat6/webapps/opendap build/dist/opendap.war #Allow symbolic links in the webapp cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/tomcat6/webapps/opendap/META-INF/context.xml #Clean up pakcaged jars for dir in $RPM_BUILD_ROOT%{_datadir}/tomcat6/webapps/opendap/{olfs-libraries,WEB-INF/lib} do pushd $dir jars='' for jar in *.jar do jars="$jars ${jar/.jar/}" rm $jar done build-jar-repository -s -p . ${jars//_//} popd done #Move config to %{_sysconfdir} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/olfs pushd $RPM_BUILD_ROOT%{_datadir}/tomcat6/webapps/opendap/initialContent for xml in *.xml do mv $xml $RPM_BUILD_ROOT%{_sysconfdir}/olfs/ ln -s ../../../../../../etc/olfs/$xml . done #Setup log directory mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/lib/tomcat6/content/opendap mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/log/tomcat6/opendap ln -s ../../../../log/tomcat6/opendap \ $RPM_BUILD_ROOT%{_sharedstatedir}/lib/tomcat6/content/opendap/logs #Move javadocs out of webapp and into javadocdir mkdir -p $RPM_BUILD_ROOT%{_javadocdir} mv $RPM_BUILD_ROOT%{_datadir}/tomcat6/webapps/opendap/javadocs \ $RPM_BUILD_ROOT%{_javadocdir}/%{name} %check ant check %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc COPYRIGHT README %dir %{_sysconfdir}/olfs %config(noreplace) %{_sysconfdir}/olfs/*.xml %{_datadir}/tomcat6/webapps/opendap/ %attr(-,tomcat,tomcat) %{_sharedstatedir}/lib/tomcat6/content/opendap %attr(-,tomcat,tomcat) %{_sharedstatedir}/log/tomcat6/opendap %files javadoc %defattr(-,root,root,-) %doc COPYRIGHT %{_javadocdir}/%{name} %changelog * Wed Dec 1 2010 Orion Poplawski 1.7.1-1 - Update to 1.7.1 - Rename jakarta-commons-cli to apache-commons-cli for f15+ * Fri Jul 16 2010 Orion Poplawski 1.6.2-2 - Move configuration to %%{_sysconfdir} - Add content and log directories - Allow symbolic links in webapp directory with context.xml file * Thu Jul 15 2010 Orion Poplawski 1.6.2-1 - Initial Fedora package