%define with_maven 1 Name: vafer-dependency Version: 0.4 Release: %mkrel 2 Summary: Analyse and modify class dependencies Group: Development/Java License: ASL 2.0 Url: https://github.com/tcurdt # git clone git://github.com/tcurdt/jdependency.git # cd jdependency && git archive --format=tar --prefix=vafer-dependency-0.4/ dependency-0.4 | xz > ../vafer-dependency-0.4.tar.xz Source0: vafer-dependency-0.4.tar.xz Source1: vafer-dependency-0.4-depmap #Source2: vafer-dependency-0.4-autogeneratedfiles.tar.gz Patch0: vafer-dependency-0.4-pom_xml.patch BuildRequires: jpackage-utils BuildRequires: java-devel BuildRequires: apache-commons-io BuildRequires: asm2 BuildRequires: junit %if !%with_maven BuildRequires: ant %else BuildRequires: maven BuildRequires: maven-ant-plugin BuildRequires: maven-compiler-plugin BuildRequires: maven-install-plugin BuildRequires: maven-jar-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-plugin-jxr BuildRequires: maven-pmd-plugin BuildRequires: maven-project-info-reports-plugin BuildRequires: maven-surefire-report-plugin BuildRequires: maven-wagon BuildRequires: taglist-maven-plugin %endif Requires: apache-commons-io Requires: asm2 Requires: jpackage-utils Requires(post): jpackage-utils Requires(postun): jpackage-utils Requires: java BuildArch: noarch %description This library provides an API to analyse and modify class dependencies. It provides the core to the maven2 minijar plugin and provides something in the middle between jarjar and proguard. %package javadoc Summary: Javadocs for %{name} Group: Development/Java Requires: jpackage-utils %description javadoc This package contains the API documentation for %{name} %prep %setup -q -n vafer-dependency-%{version} chmod -R go=u-w * %patch0 -p0 for d in LICENSE TODO ; do iconv -f iso8859-1 -t utf-8 $d.txt > $d.txt.conv && mv -f $d.txt.conv $d.txt sed -i 's/\r//' $d.txt done %if !%with_maven tar -xf %SOURCE2 %endif for f in $(find . -name "*.jar"); do mv $f $f.no done %build %if !%with_maven # TODO %else mvn-rpmbuild -e \ -Dmaven.local.depmap.file=%{SOURCE1} \ ant:ant install javadoc:aggregate %endif %install [ %{buildroot} != / ] && rm -rf %{buildroot} mkdir -p %{buildroot}%{_javadir} install -m 0644 target/dependency-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar ( cd %{buildroot}%{_javadir} for jar in *-%{version}*; do ln -s ${jar} ${jar/-%{version}/}; done ) mkdir -p %{buildroot}%{_mavenpomdir} install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom %add_to_maven_depmap org.vafer dependency %{version} JPP %{name} mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} %clean [ %{buildroot} != / ] && rm -rf %{buildroot} %post %update_maven_depmap %postun %update_maven_depmap %files %{_javadir}/%{name}-%{version}.jar %{_javadir}/%{name}.jar %{_mavenpomdir}/* %{_mavendepmapfragdir}/* %doc LICENSE.txt TODO.txt %files javadoc %{_javadocdir}/%{name} %changelog * Mon Jan 14 2013 umeabot <umeabot> 0.4-2.mga3 + Revision: 385222 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Wed Oct 19 2011 gil <gil> 0.4-1.mga2 + Revision: 156674 - imported package vafer-dependency