6c09b73
6c09b73
%global base_name       beanutils
6c09b73
%global short_name      commons-%{base_name}
6c09b73
6c09b73
Name:           apache-%{short_name}
6c09b73
Version:        1.8.3
6c09b73
Release:        2%{?dist}
6c09b73
Summary:        Java utility methods for accessing and modifying the properties of arbitrary JavaBeans
6c09b73
License:        ASL 2.0
6c09b73
Group:          Development/Libraries
6c09b73
URL:            http://commons.apache.org/%{base_name}
6c09b73
BuildArch:      noarch
6c09b73
Source0:        http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
6c09b73
# this will not be needed after commons-collections have proper pom
6c09b73
Source1:        %{short_name}.depmap
6c09b73
6c09b73
BuildRequires:  apache-commons-logging >= 0:1.0
6c09b73
BuildRequires:  java >= 1:1.6.0
6c09b73
BuildRequires:  jpackage-utils > 0:1.7.2
6c09b73
BuildRequires:  maven-plugin-bundle
6c09b73
BuildRequires:  maven-surefire-maven-plugin
6c09b73
BuildRequires:  maven-surefire-provider-junit
6c09b73
BuildRequires:  maven2-plugin-antrun
6c09b73
BuildRequires:  maven2-plugin-assembly
6c09b73
BuildRequires:  maven2-plugin-compiler
6c09b73
BuildRequires:  maven2-plugin-idea
6c09b73
BuildRequires:  maven2-plugin-install
6c09b73
BuildRequires:  maven2-plugin-jar
6c09b73
BuildRequires:  maven2-plugin-javadoc
6c09b73
BuildRequires:  maven2-plugin-resources
6c09b73
BuildRequires:  maven2-plugin-site
6c09b73
#change to apache-commons-collections once transition is done
6c09b73
BuildRequires:  jakarta-commons-collections-testframework >= 0:2.0
6c09b73
BuildRequires:  jakarta-commons-collections >= 0:2.0
6c09b73
Requires:       jakarta-commons-collections >= 0:2.0
6c09b73
Requires:       apache-commons-logging >= 0:1.0
6c09b73
Requires(post):    jpackage-utils
6c09b73
Requires(postun):  jpackage-utils
6c09b73
Requires:       java >= 1:1.6.0
6c09b73
6c09b73
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
6c09b73
6c09b73
# This should go away with F-17
6c09b73
Provides:       jakarta-%{short_name} = 0:%{version}-%{release}
6c09b73
Obsoletes:      jakarta-%{short_name} <= 0:1.7.0
6c09b73
6c09b73
%description
6c09b73
The scope of this package is to create a package of Java utility methods
6c09b73
for accessing and modifying the properties of arbitrary JavaBeans.  No
6c09b73
dependencies outside of the JDK are required, so the use of this package
6c09b73
is very lightweight.
6c09b73
6c09b73
%package javadoc
6c09b73
Summary:        Javadoc for %{name}
6c09b73
Group:          Documentation
6c09b73
Requires:       jpackage-utils
6c09b73
6c09b73
Provides:       jakarta-%{short_name}-javadoc = 0:%{version}-%{release}
6c09b73
Obsoletes:      jakarta-%{short_name}-javadoc <= 0:1.7.0
6c09b73
6c09b73
%description javadoc
6c09b73
%{summary}.
6c09b73
6c09b73
%prep
6c09b73
%setup -q -n %{short_name}-%{version}-src
6c09b73
sed -i 's/\r//' *.txt
6c09b73
6c09b73
6c09b73
%build
6c09b73
6c09b73
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
6c09b73
mkdir -p $MAVEN_REPO_LOCAL
6c09b73
# test failures ignored because they are caused by mock
6c09b73
mvn-jpp -Dmaven2.jpp.depmap.file="%{SOURCE1}" \
6c09b73
        -Dmaven.test.failure.ignore=true \
6c09b73
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
6c09b73
        install javadoc:javadoc
6c09b73
6c09b73
6c09b73
%install
6c09b73
rm -rf $RPM_BUILD_ROOT
6c09b73
6c09b73
# jars
6c09b73
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
6c09b73
install -m 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
6c09b73
install -m 644 target/%{short_name}-bean-collections-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-bean-collections-%{version}.jar
6c09b73
install -m 644 target/%{short_name}-core-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-core-%{version}.jar
6c09b73
6c09b73
pushd $RPM_BUILD_ROOT%{_javadir}
6c09b73
for jar in *-%{version}*; do
6c09b73
    ln -sf ${jar} `echo $jar| sed "s|apache-||g"`
6c09b73
    ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
6c09b73
    ln -sf ${jar} `echo $jar| sed "s|apache-\(.*\)-%{version}|\1|g"`
6c09b73
done
6c09b73
popd # come back from javadir
6c09b73
6c09b73
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
6c09b73
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{short_name}.pom
6c09b73
6c09b73
%add_to_maven_depmap org.apache.commons %{short_name} %{version} JPP %{short_name}
6c09b73
%add_to_maven_depmap org.apache.commons %{short_name}-core %{version} JPP %{short_name}
6c09b73
%add_to_maven_depmap org.apache.commons %{short_name}-bean-collections %{version} JPP %{short_name}
6c09b73
6c09b73
# following lines are only for backwards compatibility. New packages
6c09b73
# should use proper groupid org.apache.commons and also artifactid
6c09b73
%add_to_maven_depmap %{short_name} %{short_name} %{version} JPP %{short_name}
6c09b73
%add_to_maven_depmap %{short_name} %{short_name}-core %{version} JPP %{short_name}
6c09b73
%add_to_maven_depmap %{short_name} %{short_name}-bean-collections %{version} JPP %{short_name}
6c09b73
6c09b73
# javadoc
6c09b73
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
6c09b73
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
6c09b73
%{__ln_s} %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
6c09b73
6c09b73
6c09b73
6c09b73
%clean
6c09b73
rm -rf $RPM_BUILD_ROOT
6c09b73
6c09b73
%post
6c09b73
%update_maven_depmap
6c09b73
6c09b73
%postun
6c09b73
%update_maven_depmap
6c09b73
6c09b73
%files
6c09b73
%defattr(-,root,root,-)
6c09b73
%doc *.txt
6c09b73
%{_javadir}/*.jar
6c09b73
%{_mavenpomdir}/*.pom
6c09b73
%{_mavendepmapfragdir}/*
6c09b73
6c09b73
%files javadoc
6c09b73
%defattr(-,root,root,-)
6c09b73
%{_javadocdir}/%{name}-%{version}
6c09b73
%{_javadocdir}/%{name}
6c09b73
6c09b73
6c09b73
%changelog
6c09b73
* Mon May 24 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.8.3-2
6c09b73
- Added provides to javadoc subpackage
6c09b73
6c09b73
* Fri May 21 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.8.3-1
6c09b73
- Re-did whole spec file, dropped gcj support
6c09b73
- Rename package (jakarta-commons-beanutils->apache-commons-beanutils)
6c09b73
6c09b73
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7.0-12.3
6c09b73
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
6c09b73
6c09b73
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7.0-11.3
6c09b73
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
6c09b73
6c09b73
* Thu Oct 23 2008 David Walluck <dwalluck@redhat.com> 0:1.7.0-10.3
6c09b73
- Fedora-specific: enable GCJ support
6c09b73
6c09b73
* Thu Oct 23 2008 David Walluck <dwalluck@redhat.com> 0:1.7.0-10.2
6c09b73
- Fedora-specific: BuildRequires: java-1.6.0-devel
6c09b73
6c09b73
* Thu Oct 23 2008 David Walluck <dwalluck@redhat.com> 0:1.7.0-10.1
6c09b73
- Fedora-specific: remove repolib
6c09b73
- Fedora-specific: enable JDK6 support
6c09b73
6c09b73
* Mon Oct 20 2008 David Walluck <dwalluck@redhat.com> 0:1.7.0-10
6c09b73
- add flag to build with maven
6c09b73
6c09b73
* Fri Sep 19 2008 David Walluck <dwalluck@redhat.com> 0:1.7.0-9
6c09b73
- add jdk6 patch
6c09b73
- fix repolib
6c09b73
6c09b73
* Sun Jun 15 2008 David Walluck <dwalluck@redhat.com> 0:1.7.0-8.jpp5
6c09b73
- fix duplicate files
6c09b73
- correctly unpack sources
6c09b73
- remove spurious gnu-crypto requirement
6c09b73
- remove spurious javadoc package requirements
6c09b73
- fix javadoc directory
6c09b73
- fix build-classpath call
6c09b73
- use macros
6c09b73
6c09b73
* Fri May 30 2008 Permaine Cheung <pcheung@redhat.com> - 0:1.7.0-7
6c09b73
- First JPP5 build
6c09b73
6c09b73
* Tue Jul 24 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.7.0-6jpp
6c09b73
- Make Vendor, Distribution based on macro
6c09b73
- Fix aot build
6c09b73
- Add poms and depmap frags
6c09b73
- Build with maven1 by default
6c09b73
- Add manual subpackage when built with maven
6c09b73
6c09b73
* Tue Mar 13 2007 Vivek Lakshmanan <vivekl@redhat.com> - 0:1.7.0-2jpp.ep1.2
6c09b73
- Fix repolib location
6c09b73
6c09b73
* Tue Mar 13 2007 Fernando Nasser <fnasser@redhat.com> - 0:1.7.0-2jpp.ep1.1
6c09b73
- New repolib location
6c09b73
6c09b73
* Mon Mar 05 2007 Fernando Nasser <fnasser@redhat.com> - 0:1.7.0-2jpp.el4ep1.3
6c09b73
- Remove pre section used for RHUG cleanup
6c09b73
6c09b73
* Tue Feb 20 2007 Vivek Lakshmanan <vivekl@redhat.com> - 0:1.7.0-2jpp.el4ep1.2
6c09b73
- Add -brew suffix
6c09b73
6c09b73
* Fri Feb 17 2007 Vivek Lakshmanan <vivekl@redhat.com> - 0:1.7.0-2jpp.el4ep1.1
6c09b73
- Add repolib support
6c09b73
6c09b73
* Thu Aug 17 2006 Fernando Nasser <fnasser@redhat.com> - 0:1.7.0-5jpp
6c09b73
- Require what is used in post/postun for javadoc
6c09b73
6c09b73
* Fri Jul 14 2006 Fernando Nasser <fnasser@redhat.com> - 0:1.7.0-4jpp
6c09b73
- Add AOT bits
6c09b73
6c09b73
* Thu May 11 2006 Fernando Nasser <fnasser@redhat.com> - 0:1.7.0-3jpp
6c09b73
- Add header
6c09b73
- Remove unecessary macro definitions
6c09b73
6c09b73
* Wed Feb 22 2006 Fernando Nasser <fnasser@redhat.com> - 0:1.7.0-2jpp_1rh
6c09b73
- Merge with upstream
6c09b73
6c09b73
* Wed Apr 27 2005 Fernando Nasser <fnasser@redhat.com> - 0:1.7.0-1jpp_3rh
6c09b73
- Fix build so that collections jar is created
6c09b73
6c09b73
* Sat Jan 29 2005 Ralph Apel <r.apel@r-apel.de> - 0:1.7.0-2jpp
6c09b73
- Use the "dist" target to get a full build, including bean-collections
6c09b73
6c09b73
* Thu Oct 21 2004 Fernando Nasser <fnasser@redhat.com> - 0:1.7.0-1jpp_1rh
6c09b73
- Import from upstream
6c09b73
6c09b73
* Thu Oct 21 2004 Fernando Nasser <fnasser@redhat.com> - 0:1.7.0-1jpp
6c09b73
- Upgrade to 1.7.0
6c09b73
6c09b73
* Fri Oct 1 2004 Andrew Overholt <overholt@redhat.com> 0:1.6.1-4jpp_6rh
6c09b73
- add coreutils BuildRequires
6c09b73
6c09b73
* Sun Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:1.6.1-5jpp
6c09b73
- Rebuild with ant-1.6.2
6c09b73
6c09b73
* Fri Jul 2 2004 Aizaz Ahmed <aahmed@redhat.com> 0:1.6.1-4jpp_5rh
6c09b73
- Added trigger to restore symlinks that are removed if ugrading
6c09b73
  from a commons-beanutils rhug package
6c09b73
6c09b73
* Fri Apr  2 2004 Frank Ch. Eigler <fche@redhat.com> 0:1.6.1-4jpp_4rh
6c09b73
- more of the same, for version-suffixed .jar files
6c09b73
6c09b73
* Fri Mar 26 2004 Frank Ch. Eigler <fche@redhat.com> 0:1.6.1-4jpp_3rh
6c09b73
- add RHUG upgrade cleanup
6c09b73
6c09b73
* Fri Mar  5 2004 Frank Ch. Eigler <fche@redhat.com> 0:1.6.1-4jpp_2rh
6c09b73
- RH vacuuming part II
6c09b73
6c09b73
* Thu Mar  4 2004 Frank Ch. Eigler <fche@redhat.com> 0:1.6.1-4jpp_1rh
6c09b73
- RH vacuuming
6c09b73
6c09b73
* Fri May 09 2003 David Walluck <david@anti-microsoft.org> 0:1.6.1-4jpp
6c09b73
- update for JPackage 1.5
6c09b73
6c09b73
* Thu Feb 27 2003 Henri Gomez <hgomez@users.sourceforge.net> 1.6.1-2jpp
6c09b73
- fix ASF license and add packager name
6c09b73
6c09b73
* Wed Feb 19 2003 Henri Gomez <hgomez@users.sourceforge.net> 1.6.1-1jpp
6c09b73
- 1.6.1
6c09b73
6c09b73
* Thu Feb 13 2003 Henri Gomez <hgomez@users.sourceforge.net> 1.6-1jpp
6c09b73
- 1.6
6c09b73
6c09b73
* Thu Oct 24 2002 Henri Gomez <hgomez@users.sourceforge.net> 1.5-1jpp
6c09b73
- 1.5
6c09b73
6c09b73
* Fri Aug 23 2002 Henri Gomez <hgomez@users.sourceforge.net> 1.4.1-1jpp
6c09b73
- 1.4.1
6c09b73
6c09b73
* Tue Aug 20 2002 Henri Gomez <hgomez@users.sourceforge.net> 1.4-1jpp
6c09b73
- 1.4
6c09b73
6c09b73
* Fri Jul 12 2002 Henri Gomez <hgomez@users.sourceforge.net> 1.3-3jpp
6c09b73
- change to commons-xxx.jar instead of commons-xxx.home in ant parameters
6c09b73
6c09b73
* Mon Jun 10 2002 Henri Gomez <hgomez@users.sourceforge.net> 1.3-2jpp
6c09b73
- use sed instead of bash 2.x extension in link area to make spec compatible
6c09b73
  with distro using bash 1.1x
6c09b73
6c09b73
* Fri Jun 07 2002 Henri Gomez <hgomez@users.sourceforge.net> 1.3-1jpp 
6c09b73
- 1.3
6c09b73
- added short names in %%{_javadir}, as does jakarta developpers
6c09b73
- first jPackage release