From 00a1f3ddf4c0672e0de88e1e7599d0614dbf04d2 Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Tue, 27 Jan 2015 14:22:29 +0000 Subject: [PATCH] Initial package --- .gitignore | 5 +++ osgi-annotation.spec | 72 ++++++++++++++++++++++++++++++++++++++++++++ sources | 2 ++ 3 files changed, 79 insertions(+) create mode 100644 osgi-annotation.spec diff --git a/.gitignore b/.gitignore index e69de29..127407e 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,5 @@ +/osgi.annotation-6.0.0.pom +/osgi.annotation-6.0.0-sources.jar +/noarch +/.build-*.log +/*.src.rpm diff --git a/osgi-annotation.spec b/osgi-annotation.spec new file mode 100644 index 0000000..e673810 --- /dev/null +++ b/osgi-annotation.spec @@ -0,0 +1,72 @@ +Name: osgi-annotation +Version: 6.0.0 +Release: 1%{?dist} +Summary: Annotations for use in compiling OSGi bundles + +License: ASL 2.0 +URL: http://www.osgi.org/ +# Upstream project is behind an account registration system with no anonymous +# read access, so we download the source from maven central instead +Source0: http://repo1.maven.org/maven2/org/osgi/osgi.annotation/%{version}/osgi.annotation-%{version}-sources.jar +Source1: http://repo1.maven.org/maven2/org/osgi/osgi.annotation/%{version}/osgi.annotation-%{version}.pom + +BuildArch: noarch + +BuildRequires: maven-local + +%description +Annotations for use in compiling OSGi bundles. This package is not normally +needed at run-time. + +%package javadoc +Summary: API documentation for %{name} + +%description javadoc +This package contains the API documentation for %{name}. + +%prep +%setup -c -q + +mkdir -p src/main/resources && mv about.html src/main/resources +mkdir -p src/main/java && mv org src/main/java +cp -p %{SOURCE1} pom.xml + +# Ensure OSGi metadata is generated +%pom_xpath_inject pom:project " + bundle + + + + org.apache.felix + maven-bundle-plugin + true + + + \${project.artifactId} + \${project.artifactId} + + + + + " + +# Known by two names in maven central, so add an alias for the older name +%mvn_alias org.osgi:osgi.annotation org.osgi:org.osgi.annotation + +%build +%mvn_build + +%install +%mvn_install + +%files -f .mfiles +%doc LICENSE +%dir %{_javadir}/osgi-annotation +%dir %{_mavenpomdir}/osgi-annotation + +%files javadoc -f .mfiles-javadoc +%doc LICENSE + +%changelog +* Mon Jan 26 2015 Mat Booth - 6.0.0-1 +- Initial package diff --git a/sources b/sources index e69de29..1d12e1c 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +22a0b460ecbe689f7482c9ec651a7169 osgi.annotation-6.0.0.pom +aacd0d2a65e9d181a28b3ae4bcd3b8bf osgi.annotation-6.0.0-sources.jar