Initial package

This commit is contained in:
Mat Booth 2015-01-27 14:22:29 +00:00
parent 27b3d938a7
commit 00a1f3ddf4
3 changed files with 79 additions and 0 deletions

5
.gitignore vendored
View File

@ -0,0 +1,5 @@
/osgi.annotation-6.0.0.pom
/osgi.annotation-6.0.0-sources.jar
/noarch
/.build-*.log
/*.src.rpm

72
osgi-annotation.spec Normal file
View File

@ -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 "
<packaging>bundle</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Name>\${project.artifactId}</Bundle-Name>
<Bundle-SymbolicName>\${project.artifactId}</Bundle-SymbolicName>
</instructions>
</configuration>
</plugin>
</plugins>
</build>"
# 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 <mat.booth@redhat.com> - 6.0.0-1
- Initial package

View File

@ -0,0 +1,2 @@
22a0b460ecbe689f7482c9ec651a7169 osgi.annotation-6.0.0.pom
aacd0d2a65e9d181a28b3ae4bcd3b8bf osgi.annotation-6.0.0-sources.jar