packages apache-DdlUtils.spec
      Pages: < 1 >  DOWNLOAD      
%define javahome /usr/lib/jvm/jdk-gcj
Name:          apache-DdlUtils
Version:       1.0
Release:       3mamba
Summary:       DdlUtils is a small, easy-to-use component for working with Database Definition (DDL) files.
Group:         Applications/Databases
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://db.apache.org/ddlutils/
Source:        ftp://cis.uniroma2.it/unix/packages/APACHE/db/ddlutils/ddlutils-%{version}/source/DdlUtils-%{version}-src.zip
License:       Apache License, version 2.0
Patch0:        apache-DdlUtils-1.0-build_xml.patch
Patch1:        apache-DdlUtils-1.0-jdbc.properties.hsqldb.patch
BuildRequires: apache-ant
BuildRequires: apache-log4j
#BuildRequires: apache-forrest for site docs
BuildRequires: jakarta-commons-beanutils
BuildRequires: jakarta-commons-betwixt08
BuildRequires: jakarta-commons-codec
BuildRequires: jakarta-commons-collections
BuildRequires: jakarta-commons-dbcp121 = 1.2.1
BuildRequires: jakarta-commons-digester
BuildRequires: jakarta-commons-betwixt
BuildRequires: jakarta-commons-lang
BuildRequires: jakarta-commons-logging
BuildRequires: jakarta-commons-pool
BuildRequires: jakarta-oro
BuildRequires: java-bea-stax
BuildRequires: java-bea-stax-api
BuildRequires: java-dom4j
BuildRequires: java-gcj-compat
BuildRequires: java-hsqldb
BuildRequires: java-jaxen
BuildRequires: java-junit3
BuildRequires: java-wstx
Requires:      jakarta-commons-dbcp121
Requires:      apache-log4j
Requires:      jakarta-commons-betwixt08
Requires:      jakarta-commons-betwixt
Requires:      jakarta-commons-codec
Requires:      jakarta-commons-collections
Requires:      jakarta-commons-digester
Requires:      jakarta-commons-lang
Requires:      jakarta-commons-logging
Requires:      jakarta-commons-pool
Requires:      jakarta-oro
Requires:      java-bea-stax
Requires:      java-bea-stax-api
Requires:      java-dom4j
Requires:      java-jaxen
Requires:      java-wstx
Requires:      jpackage-utils
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
DdlUtils is a small, easy-to-use component for working with Database Definition (DDL) files.
These are XML files that contain the definition of a database schema, e.g. tables and columns.
These files can be fed into DdlUtils via its Ant task or programmatically in order to create the
corresponding database or alter it so that it corresponds to the DDL. Likewise,DdlUtils
can generate a DDL file for an existing database. 

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

%description    javadoc
DdlUtils is a small, easy-to-use component for working with Database Definition (DDL) files.

This package contains javadoc for %{name}

%package manual
Group:         Documentation
Summary:       Documents for %{name}

%description manual
DdlUtils is a small, easy-to-use component for working with Database Definition (DDL) files.

This package contains documents for %{name}

%prep

%setup -q -c %{name}-%{version}
%patch0 -p1
%patch1 -p1

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

pushd lib
  pushd build-only
    ln -sf $(build-classpath ant-1.7.1) ant-1.6.5.jar
    ln -sf $(build-classpath junit-3.8.2) junit-3.8.2.jar
  popd
  ln -sf $(build-classpath commons-beanutils) commons-beanutils-1.7.0.jar
  ln -sf $(build-classpath jakarta-commons-betwixt08) commons-betwixt-0.8.jar
  ln -sf $(build-classpath commons-codec) commons-codec-1.3.jar
  ln -sf $(build-classpath commons-collections) commons-collections-3.1.jar
  ln -sf $(build-classpath commons-dbcp) commons-dbcp-1.2.1.jar
  ln -sf $(build-classpath commons-digester) commons-digester-1.7.jar
  ln -sf $(build-classpath commons-lang) commons-lang-2.1.jar
  ln -sf $(build-classpath commons-logging) commons-logging-1.0.4.jar
  ln -sf $(build-classpath commons-pool) commons-pool-1.2.jar
  ln -sf $(build-classpath dom4j) dom4j-1.4.jar
  ln -sf $(build-classpath oro) jakarta-oro-2.0.8.jar
  ln -sf $(build-classpath log4j) log4j-1.2.8.jar
  ln -sf $(build-classpath bea-stax-api) stax-api-1.0.1.jar
  ln -sf $(build-classpath bea-stax-ri) .
  ln -sf $(build-classpath wstx/wstx-asl) wstx-asl-3.0.2.jar
  ln -sf $(build-classpath hsqldb) .
popd

%build

export JAVA_HOME=%javahome
export CLASSPATH=$(build-classpath jakarta-commons-betwixt08 junit-3.8.2 ant/ant-junit)
ant \
	-Dtest.profile.directory=src/test-profiles \
	-Dprofile=mvdb \
	jar javadoc junit-hsqldb

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

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

install -pm 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-ddlutils.pom
%add_to_maven_depmap org.apache.ddlutils ddlutils %{version} JPP ddlutils

install -m 644 dist/DdlUtils-%{version}.jar %{buildroot}%{_javadir}/ddlutils-%{version}.jar
ln -s ddlutils-%{version}.jar %{buildroot}%{_javadir}/ddlutils.jar

mkdir -p %{buildroot}%{_javadocdir}/apache-ddlutils-%{version}
cp -pr target/javadoc/* %{buildroot}%{_javadocdir}/apache-ddlutils-%{version}
ln -s apache-ddlutils-%{version} %{buildroot}%{_javadocdir}/apache-ddlutils

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

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root)
%{_javadir}/ddlutils-%{version}.jar
%{_javadir}/ddlutils.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc LICENSE.txt NOTICE.txt

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

%files manual
%defattr(-,root,root)
%doc doc

%changelog
* Fri Mar 25 2011 gil <puntogil@...> 1.0-3mamba
- rebuilt with java-gcj-compat support

* Wed Nov 24 2010 gil <puntogil@...> 1.0-2mamba
- rebuilt devel

* Thu Mar 12 2009 gil <puntogil@...> 1.0-1mamba
- package created by autospec