From 4c6981f98317bb656823397ad5f30d7580420c0d Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Wed, 28 Nov 2012 14:06:25 +0100 Subject: [PATCH] Initial commit --- .gitignore | 1 + sources | 1 + xmvn.spec | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 xmvn.spec diff --git a/.gitignore b/.gitignore index e69de29..90dbb4f 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/xmvn-0.tar.xz diff --git a/sources b/sources index e69de29..a1fd941 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +4ea377aa07b1d26deb08d1092b6b3b81 xmvn-0.tar.xz diff --git a/xmvn.spec b/xmvn.spec new file mode 100644 index 0000000..3212625 --- /dev/null +++ b/xmvn.spec @@ -0,0 +1,75 @@ +Name: xmvn +Version: 0 +Release: 1%{?dist} +Summary: Local Extensions for Apache Maven +Group: Development/Libraries +License: ASL 2.0 +URL: http://mizdebsk.fedorapeople.org/xmvn +BuildArch: noarch +Source0: http://mizdebsk.fedorapeople.org/xmvn/%{name}-%{version}.tar.xz + +BuildRequires: jpackage-utils +BuildRequires: maven +BuildRequires: plexus-classworlds + +Requires: jpackage-utils +Requires: maven +Requires: plexus-classworlds + +%description +This package provides extensions for Apache Maven that can be used to +manage system artifact repository and use it to resolve Maven +artifacts in offline mode, as well as Maven plugins to help with +creating RPM packages containing Maven artifacts. + +%package javadoc +Summary: API documentation for %{name} +Group: Documentation +Requires: jpackage-utils + +%description javadoc +This package provides %{summary}. + +%prep +%setup -q + +%build +mvn-rpmbuild verify javadoc:aggregate + +%install +install -d -m 755 %{buildroot}%{_mavenpomdir} +install -d -m 755 %{buildroot}%{_javadir}/%{name} +install -d -m 755 %{buildroot}%{_javadocdir}/%{name} + +# POMs, JARs, depmaps +for dir in $(find -name pom.xml -exec dirname {} \;); do + pushd $dir + aid=$(sed -n '/^ ]*>//;s/<.*//;p}' pom.xml) + install -p -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-${aid}.pom + if [ -f target/*.jar ]; then + install -p -m 644 target/*.jar %{buildroot}%{_javadir}/%{name}/${aid}.jar + %add_maven_depmap JPP.%{name}-${aid}.pom %{name}/${aid}.jar + else + %add_maven_depmap JPP.%{name}-${aid}.pom + fi + popd +done + +# API documentation +cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} + + +%files +%doc LICENSE NOTICE +%doc AUTHORS README +%{_mavenpomdir}/* +%{_javadir}/%{name} +%{_mavendepmapfragdir}/%{name} + +%files javadoc +%doc LICENSE NOTICE +%{_javadocdir}/%{name} + +%changelog +* Mon Nov 5 2012 Mikolaj Izdebski - 0-1 +- Initial packaging