From f326c35d70f5428897623843c23ccc2141e3991b Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: May 13 2010 11:27:52 +0000 Subject: Initial import of apache-commons-io --- diff --git a/.cvsignore b/.cvsignore index e69de29..2bd265d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +commons-io-1.4-src.tar.gz diff --git a/apache-commons-io.spec b/apache-commons-io.spec new file mode 100644 index 0000000..920c6d7 --- /dev/null +++ b/apache-commons-io.spec @@ -0,0 +1,128 @@ + +%global base_name io +%global short_name commons-%{base_name} + +Name: apache-%{short_name} +Version: 1.4 +Release: 3%{?dist} +Epoch: 1 +Summary: Utilities to assist with developing IO functionality +License: ASL 2.0 +Group: Development/Libraries +URL: http://commons.apache.org/%{base_name} +Source0: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz +BuildArch: noarch +BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: jpackage-utils >= 0:1.7.2 +BuildRequires: maven-plugin-bundle +BuildRequires: maven-surefire-maven-plugin +BuildRequires: maven-surefire-provider-junit +BuildRequires: maven-doxia-sitetools +BuildRequires: maven2-plugin-assembly +BuildRequires: maven2-plugin-antrun +BuildRequires: maven2-plugin-compiler +BuildRequires: maven2-plugin-idea +BuildRequires: maven2-plugin-install +BuildRequires: maven2-plugin-jar +BuildRequires: maven2-plugin-javadoc +BuildRequires: maven2-plugin-resources + +Requires: java >= 1:1.6.0 +Requires: jpackage-utils >= 0:1.6 +Requires(post): jpackage-utils +Requires(postun): jpackage-utils + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +# This should go away with F-17 +Provides: jakarta-%{short_name} = %{epoch}:%{version}-%{release} +Obsoletes: jakarta-%{short_name} <= 0:1.4 + +%description +Commons-IO contains utility classes, stream implementations, +file filters, and endian classes. It is a library of utilities +to assist with developing IO functionality. + +%package javadoc +Summary: API documentation for %{name} +Group: Documentation +Requires: jpackage-utils + +Obsoletes: jakarta-%{short_name}-javadoc <= 0:1.4 + +%description javadoc +%{summary}. + +%prep +%setup -q -n %{short_name}-%{version}-src +sed -i 's/\r//' *.txt + +%build +export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository +mkdir -p $MAVEN_REPO_LOCAL + +mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ + install javadoc:javadoc + +%install +rm -rf $RPM_BUILD_ROOT + +# jars +install -d -m 755 $RPM_BUILD_ROOT%{_javadir} +install -p -m 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar + +pushd $RPM_BUILD_ROOT%{_javadir} +for jar in *-%{version}*; do + ln -sf ${jar} `echo $jar| sed "s|apache-||g"` + ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"` + ln -sf ${jar} `echo $jar| sed "s|apache-\(.*\)-%{version}|\1|g"` +done +popd # come back from javadir + +# pom +install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} +install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{short_name}.pom +%add_to_maven_depmap org.apache.commons %{short_name} %{version} JPP %{name} + +# following line is only for backwards compatibility. New packages +# should use proper groupid org.apache.commons +%add_to_maven_depmap %{short_name} %{short_name} %{version} JPP %{name} + +# javadoc +install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +%update_maven_depmap + +%postun +%update_maven_depmap + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt +%{_javadir}/*.jar +%{_mavenpomdir}/JPP-%{short_name}.pom +%{_mavendepmapfragdir}/* + +%files javadoc +%defattr(-,root,root,-) +%doc %{_javadocdir}/%{name}-%{version} +%doc %{_javadocdir}/%{name} + +%changelog +* Wed May 12 2010 Stanislav Ochotnicky - 1:1.4-3 +- Add obsoletes to javadoc sub-package + +* Wed May 12 2010 Stanislav Ochotnicky - 1:1.4-2 +- Add symlink to short_name.jar +- Fix mavendepmapfragdir wildcard + +* Tue May 11 2010 Stanislav Ochotnicky - 1:1.4-1 +- Rename and rebase of jakarta-commons-io +- Clean up whole spec + diff --git a/import.log b/import.log new file mode 100644 index 0000000..e7d00c9 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +apache-commons-io-1_4-3_fc12:HEAD:apache-commons-io-1.4-3.fc12.src.rpm:1273750018 diff --git a/sources b/sources index e69de29..2f441f5 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +24b228f2d0c40ffed9204cdab015bccf commons-io-1.4-src.tar.gz