packages jakarta-commons-fileupload.spec
      Pages: < 1 >  DOWNLOAD      
%define        javahome   %{_jvmdir}/jdk
Name:          jakarta-commons-fileupload
Version:       1.2.1
Release:       3mamba
Summary:       Jakarta Commons FileUpload Package
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      Silvan Calarco <silvan.calarco@...>
URL:           http://commons.apache.org/fileupload/
# svn export http://svn.apache.org/repos/asf/commons/proper/fileupload/tags/FILEUPLOAD_1_0/
Source:        http://apache.fastbull.org/commons/fileupload/source/commons-fileupload-%{version}-src.tar.gz
Patch0:        jakarta-commons-fileupload-1.2.1-build_xml.patch
License:       Apache Software License 2.0
BuildRequires: apache-ant
BuildRequires: apache-ant-junit
BuildRequires: apache-portlet-1.0-api
%if "%{stage1}" != "1"
BuildRequires: apache-tomcat5-servletapi5-javadoc
%endif
BuildRequires: jakarta-commons-io
BuildRequires: java-junit3
BuildRequires: java-openjdk
BuildRequires: jpackage-utils
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
Requires:      apache-tomcat5-servletapi5
Requires:      jpackage-utils
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
The Commons FileUpload package makes it easy to add robust, high-performance, file upload capability to your servlets and web applications.
FileUpload parses HTTP requests which conform to RFC 1867, "Form-based File Upload in HTML".
That is, if an HTTP request is submitted using the POST method, and with a content type of "multipart/form-data", then FileUpload can parse that request, and make the results available in a manner easily used by the calle

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

%description javadoc
Jakarta Commons FileUpload Package.
This package contains javadoc for %{name}

%prep
%setup -q -n commons-fileupload-%{version}-src
%patch0 -p1

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

%build
export JAVA_HOME=%javahome

export MAVEN_REPO_LOCAL=$PWD/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL

export CLASSPATH=$(build-classpath xercesImpl xml-commons-apis servletapi5 commons-io junit-3.8.2 \
  jakarta-commons-beanutils apache-portlet-1.0-api-1.0 ant/ant-junit):$PWD/target/classes:$PWD/target/test-classes
ant \
  -Dbuild.sysclasspath=only \
  dist

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

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

install -pm 644 target/commons-fileupload-%{version}.jar \
  %{buildroot}%{_javadir}/%{name}-%{version}.jar

install -pm 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-commons-fileupload.pom
%add_to_maven_depmap commons-fileupload commons-fileupload %{version} JPP commons-fileupload

(
  cd %{buildroot}%{_javadir}
  for jar in *-%{version}*; do
    ln -sf ${jar} `echo $jar| sed "s|jakarta-||g"`
  done
)

(
  cd %{buildroot}%{_javadir}
  for jar in *-%{version}*; do
    ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
  done
)

mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr  target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} 

#%{_bindir}/aot-compile-rpm

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

%post
%update_maven_depmap

%postun
%update_maven_depmap

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

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

%changelog
* Sat Mar 26 2011 gil <puntogil@...> 1.2.1-3mamba
- rebuilt with java-openjdk support

* Sun Nov 07 2010 gil <puntogil@...> 1.2.1-2mamba
- rebuilt devel

* Tue Jun 30 2009 gil <puntogil@...> 1.2.1-1mamba
- update to 1.2.1

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