2be5587
%global base_name       jxpath
2be5587
%global short_name      commons-%{base_name}
2be5587
4626078
Name:             apache-%{short_name}
4626078
Version:          1.3
1a43429
Release:          11%{?dist}
4626078
Summary:          Simple XPath interpreter
4626078
4626078
Group:            Development/Libraries
4626078
License:          ASL 2.0
4626078
URL:              http://commons.apache.org/%{base_name}/
4626078
Source0:          http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
4626078
# Depmap needed to bend servlet-api and jsp-api to tomcat6
4626078
Source1:          %{short_name}.depmap
4626078
Patch0:           %{short_name}-mockrunner.patch
4626078
BuildArch:        noarch
4626078
4626078
BuildRequires:    java-devel >= 1:1.6.0
4626078
BuildRequires:    jpackage-utils
c6b3438
BuildRequires:    maven
4626078
BuildRequires:    maven-antrun-plugin
4626078
BuildRequires:    maven-assembly-plugin
4626078
BuildRequires:    maven-compiler-plugin
4626078
BuildRequires:    maven-idea-plugin
4626078
BuildRequires:    maven-install-plugin
4626078
BuildRequires:    maven-jar-plugin
4626078
BuildRequires:    maven-javadoc-plugin
4626078
BuildRequires:    maven-plugin-bundle
4626078
BuildRequires:    maven-resources-plugin
4626078
BuildRequires:    maven-surefire-plugin
4626078
BuildRequires:    servlet25
4626078
BuildRequires:    jsp
4626078
BuildRequires:    el_api
4626078
4626078
Requires:         java >= 1:1.6.0
4626078
Requires:         jpackage-utils
4626078
Requires:         jdom >= 0:1.0
4626078
Requires:         apache-commons-beanutils
4626078
Requires:         apache-commons-logging
4626078
2be5587
# This should go away with F-17
4626078
Provides:         jakarta-%{short_name} = 0:%{version}-%{release}
4626078
Obsoletes:        jakarta-%{short_name} < 0:%{version}-%{release}
2be5587
2be5587
%description
2be5587
Defines a simple interpreter of an expression language called XPath.
2be5587
JXPath applies XPath expressions to graphs of objects of all kinds:
2be5587
JavaBeans, Maps, Servlet contexts, DOM etc, including mixtures thereof.
2be5587
4626078
%package javadoc
4626078
Summary:          API documentation for %{name}
4626078
Group:            Documentation
4626078
Requires:         jpackage-utils
2be5587
2be5587
# This should go away with F-17
4626078
Provides:         jakarta-%{short_name}-javadoc = 0:%{version}-%{release}
4626078
Obsoletes:        jakarta-%{short_name}-javadoc < 0:%{version}-%{release}
2be5587
4626078
%description javadoc
4626078
This package contains the API documentation for %{name}.
2be5587
2be5587
%prep
2be5587
%setup -q -n %{short_name}-%{version}-src
2be5587
%patch0 -p1
2be5587
2be5587
%build
2be5587
# we are skipping tests because we don't have com.mockrunner in repos yet
Stanislav Ochotnicky f9c4d10
mvn-rpmbuild \
Stanislav Ochotnicky f9c4d10
        -Dmaven.local.depmap.file="%{SOURCE1}" \
2be5587
        -Dmaven.test.skip=true \
2be5587
        install javadoc:javadoc
2be5587
2be5587
2be5587
%install
Stanislav Ochotnicky f9c4d10
install -Dpm 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
2be5587
pushd $RPM_BUILD_ROOT%{_javadir}
Stanislav Ochotnicky f9c4d10
    ln -sf %{name}.jar %{short_name}.jar
2be5587
popd # come back from javadir
2be5587
2be5587
# javadoc
Stanislav Ochotnicky f9c4d10
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
Stanislav Ochotnicky f9c4d10
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
2be5587
2be5587
# Install pom
2be5587
# pom
2be5587
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
2be5587
install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{short_name}.pom
Stanislav Ochotnicky f9c4d10
%add_maven_depmap JPP-%{short_name}.pom %{short_name}.jar -a "org.apache.commons:%{short_name}"
2be5587
Stanislav Ochotnicky f9c4d10
%pre javadoc
Stanislav Ochotnicky f9c4d10
# workaround for rpm bug, can be removed in F-20
Stanislav Ochotnicky f9c4d10
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
Stanislav Ochotnicky f9c4d10
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
2be5587
2be5587
2be5587
%files
1a43429
%doc LICENSE.txt NOTICE.txt
Stanislav Ochotnicky f9c4d10
%{_javadir}/%{name}.jar
Stanislav Ochotnicky f9c4d10
%{_javadir}/%{short_name}.jar
2be5587
%{_mavenpomdir}/JPP-%{short_name}.pom
Stanislav Ochotnicky f9c4d10
%{_mavendepmapfragdir}/%{name}
2be5587
2be5587
%files javadoc
1a43429
%doc LICENSE.txt NOTICE.txt
2be5587
%{_javadocdir}/%{name}
2be5587
2be5587
%changelog
1a43429
* Thu Nov 22 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3-11
1a43429
- Install NOTICE file
1a43429
- Resolves: rhbz#879556
1a43429
c6b3438
* Fri Nov  9 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3-10
c6b3438
- Don't build-require maven2
c6b3438
ba6baae
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-9
ba6baae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
ba6baae
Stanislav Ochotnicky f9c4d10
* Fri Mar  2 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> 1.3-8
Stanislav Ochotnicky f9c4d10
- Fix build and update to latest guidelines
Stanislav Ochotnicky f9c4d10
ea8fe06
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-7
ea8fe06
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ea8fe06
8bb1520
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-6
8bb1520
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
8bb1520
4626078
* Thu Oct 21 2010 Chris Spike <chris.spike@arcor.de> 1.3-5
4626078
- tomcat5 -> tomcat6 BRs/Rs
4626078
0f3a015
* Thu Jul  8 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.3-4
0f3a015
- Add license to javadoc subpackage
0f3a015
f6869e7
* Thu May 27 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.3-3
f6869e7
- Add tomcat5 to BR
f6869e7
2be5587
* Tue May 25 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.3-2
2be5587
- Fix ownership of some directories
2be5587
2be5587
* Tue May 25 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.3-1
2be5587
- Rename package (jakarta-commons-jxpath->apache-commons-jxpath)
2be5587
- Cleanup spec file
2be5587
- Build using maven, drop old pom file from sources
2be5587
- Update to upstream version
2be5587
2be5587
* Thu Aug 20 2009 Alexander Kurtakov <akurtako@redhat.com> 0:1.2-9
2be5587
- Fix random spaces.
2be5587
2be5587
* Wed Aug 19 2009 Alexander Kurtakov <akurtako@redhat.com> 0:1.2-8
2be5587
- BuildRequires java-devel >= 1.6.0.
2be5587
2be5587
* Wed Aug 19 2009 Alexander Kurtakov <akurtako@redhat.com> 0:1.2-7
2be5587
- Initial package for Fedora.
2be5587
2be5587
* Sun May 17 2009 Fernando Nasser <fnasser@redhat.com> - 0:1.2-6
2be5587
- Fix License
2be5587
- Provide intructions for obtaining source and refresh source tar ball
2be5587
2be5587
* Wed Mar 18 2009 Yong Yang <yyang@redhat.com> - 0:1.2-5
2be5587
- rebuild with new maven2 2.0.8 built in bootstrap mode
2be5587
2be5587
* Thu Feb 05 2009 Yong Yang <yyang@redhat.com> - 0:1.2-4
2be5587
- Fix release tag
2be5587
2be5587
* Thu Jan 08 2009 Yong Yang <yyang@redhat.com> - 0:1.2-3jpp.1
2be5587
- Import from dbhole's maven 2.0.8 packages, initial building
2be5587
2be5587
* Wed Apr 09 2008 Deepak Bhole <dbhole@redhat.com> - 0:1.2-2jpp.1
2be5587
- Import from JPackage
2be5587
- Added pom file
2be5587
2be5587
* Wed Jun 07 2006 Fernando Nasser <fnasser@redhat.com> - 0:1.2-2jpp
2be5587
- First JPP 1.7 build
2be5587
2be5587
* Sat Sep 18 2004 Ralph Apel <r.apel at r-apel.de> - 0:1.2-1jpp
2be5587
- Upgrade to 1.2
2be5587
- Use jdom-1.0-0.rc1.1jpp
2be5587
- Relax some versioned dependencies
2be5587
2be5587
* Sun Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:1.1-3jpp
2be5587
- Rebuild with ant-1.6.2
2be5587
2be5587
* Tue Jun 01 2004 Randy Watler <rwatler at finali.com> - 0:1.1-2jpp
2be5587
- Upgrade to Ant 1.6.X
2be5587
2be5587
* Mon Jan 19 2004 Ralph Apel <r.apel at r-apel.de> - 0:1.1-1jpp
2be5587
- First JPackage release