From dd1a604beda6c6f4673a07ee4e6e2e7734f13236 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Thu, 29 Mar 2012 14:53:46 +0200 Subject: [PATCH] Make package noarch again to simplify bootstrapping --- maven-bash-completion | 2 +- maven.spec | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/maven-bash-completion b/maven-bash-completion index 9ef9673..db365f2 100644 --- a/maven-bash-completion +++ b/maven-bash-completion @@ -79,6 +79,6 @@ _m2_complete() COMPREPLY=($(compgen -W "${goals}" -- ${cur} | sed 's/\\\\//g') ) } -complete -F _m2_complete -o filenames mvn3 +complete -F _m2_complete -o filenames mvn complete -F _m2_complete -o filenames mvn-local complete -F _m2_complete -o filenames mvn-rpmbuild diff --git a/maven.spec b/maven.spec index 883c391..549b906 100644 --- a/maven.spec +++ b/maven.spec @@ -2,7 +2,7 @@ Name: maven Version: 3.0.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Java project management and project comprehension tool Group: Development/Tools @@ -41,6 +41,7 @@ Patch151: 0003-Use-utf-8-source-encoding.patch Patch200: 0002-Use-custom-resolver.patch Patch201: 0004-Fix-text-scope-skipping-with-maven.test.skip.patch +BuildArch: noarch BuildRequires: aether >= 1.13.1 BuildRequires: animal-sniffer >= 1.6-5 @@ -99,7 +100,7 @@ Requires: xerces-j2 # for noarch->arch change -Obsoletes: %{name} < 0:3.0.3-11 +Obsoletes: %{name} < 0:%{version}-%{release} # maven now provides "mvn" script and new maven2 mvn2 Conflicts: maven2 < 2.2.1-28 @@ -259,7 +260,7 @@ ln -s %{_javajnidir} $RPM_BUILD_ROOT%{_datadir}/%{name}/repository-java-jni/JPP # _libdir/java repository # ############################## install -dm 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/repository-jni -ln -s %{_jnidir} $RPM_BUILD_ROOT%{_datadir}/%{name}/repository-jni/JPP +# create symlink in post, remove in preun so we can stay noarch ################## # javadir/maven # @@ -315,6 +316,17 @@ cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} # Install bash-completion install -Dm 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/bash_completion.d/%{name} +%preun +if [ $1 -eq 0 ] ; then + if [ -h %{_datadir}/%{name}/repository-jni/JPP ];then + rm %{_datadir}/%{name}/repository-jni/JPP + fi +fi + +%posttrans +# ugly as hell +ln -sf `rpm --eval '%%{_jnidir}'` %{_datadir}/%{name}/repository-jni/JPP + %files %doc LICENSE.txt NOTICE.txt README.txt %attr(0755,root,root) %{_bindir}/mvn @@ -345,6 +357,9 @@ install -Dm 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/bash_completion.d/%{name} %changelog +* Thu Mar 29 2012 Stanislav Ochotnicky - 3.0.4-3 +- Make package noarch again to simplify bootstrapping + * Thu Feb 9 2012 Stanislav Ochotnicky - 3.0.4-2 - Make javadoc noarch - Make compilation source level 1.5