From 934de8d3665227c426d610160907902ba575d97b Mon Sep 17 00:00:00 2001 From: pingou Date: Wed, 20 Oct 2010 19:03:27 +0200 Subject: [PATCH] Original import after review --- .gitignore | 1 + jdependency.spec | 121 +++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 123 insertions(+) create mode 100644 jdependency.spec diff --git a/.gitignore b/.gitignore index e69de29..d653857 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/tcurdt-jdependency-jdependency-0.6-0-g165c94a.tar.gz diff --git a/jdependency.spec b/jdependency.spec new file mode 100644 index 0000000..0f670b7 --- /dev/null +++ b/jdependency.spec @@ -0,0 +1,121 @@ +Name: jdependency +Version: 0.6 +Release: 3%{?dist} +Summary: This project provides an API to analyse class dependencies + +Group: Development/Libraries +License: ASL 2.0 +URL: http://github.com/tcurdt/jdependency +# wget http://github.com/tcurdt/jdependency/tarball/jdependency-0.6 +Source0: tcurdt-jdependency-jdependency-0.6-0-g165c94a.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildArch: noarch + +BuildRequires: maven2 +BuildRequires: maven2-common-poms +BuildRequires: maven2-plugin-compiler +BuildRequires: maven2-plugin-install +BuildRequires: maven2-plugin-jar +BuildRequires: maven2-plugin-javadoc +BuildRequires: maven2-plugin-resources +BuildRequires: maven2-plugin-surefire +BuildRequires: maven2-plugin-idea + +BuildRequires: jpackage-utils +BuildRequires: java-devel +BuildRequires: objectweb-asm +BuildRequires: apache-commons-io +Requires: objectweb-asm >= 3.2 +Requires: apache-commons-io +Requires: java + +Requires(post): jpackage-utils +Requires(postun): jpackage-utils + + +%description +jdependency is small library that helps you analyze class level +dependencies, clashes and missing classes. + +%package javadoc +Group: Documentation +Summary: API documentation for %{name} +Requires: jpackage-utils + +%description javadoc +%{summary}. + + +%prep +%setup -q -n tcurdt-jdependency-ae4617e + +%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 %{buildroot} + +# Jar +mkdir -p %{buildroot}%{_javadir} +install -Dpm 644 target/%{name}-%{version}.jar \ + %{buildroot}%{_javadir}/%{name}-%{version}.jar + +pushd %{buildroot}%{_javadir}/ +ln -s %{name}-%{version}.jar %{name}.jar +popd + +# create a symbolic link without the version +(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; \ + do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) + +# Javadoc +mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{version} +cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}-%{version}/ +ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} +rm -rf target/site/api* + + +# poms +install -Dpm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-jdependency.pom + +%add_to_maven_depmap org.vafer %{name} %{version} JPP %{name} + +%post +%update_maven_depmap + +%postun +%update_maven_depmap + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%{_javadir}/* +%{_mavenpomdir}/* +%{_mavendepmapfragdir}/* +%doc LICENSE.txt README.md + +%files javadoc +%defattr(-,root,root,-) +%{_javadocdir}/%{name}-%{version} +%{_javadocdir}/%{name} +%doc LICENSE.txt + +%changelog +* Thu Oct 14 2010 Pierre-Yves Chibon - 0.6-3 +- Add license to javadoc subpackage +- Change jakarta-commons-io for apache-commons-io +- Add BR to maven + +* Thu Oct 14 2010 Pierre-Yves Chibon - 0.6-2 +- Rename from vafer-jdependency to jdependency alone + +* Thu Oct 14 2010 Pierre-Yves Chibon - 0.6-1 +- Initial package diff --git a/sources b/sources index e69de29..6e8ea6c 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +fa0118540c84c251ba51c3ddb8297746 tcurdt-jdependency-jdependency-0.6-0-g165c94a.tar.gz