Blob Blame Raw
%global artifactId javax.inject

Name:           atinject
Version:        1
Release:        9.20100611svn86%{?dist}
Summary:        Dependency injection specification for Java (JSR-330)

Group:          Development/Libraries
License:        ASL 2.0
# latest release doesn't generate javadocs and there is no source
# tarball with pom.xml or ant build file
# svn export -r86 atinject-1
# tar caf atinject-1.tar.xz atinject-1
Source0:        %{name}-%{version}.tar.xz
Source1:        MANIFEST.MF
BuildArch:      noarch

BuildRequires:       maven-local
BuildRequires:       maven-install-plugin
BuildRequires:       maven-jar-plugin
BuildRequires:       maven-surefire-provider-junit4
BuildRequires:       maven-surefire-plugin
BuildRequires:       maven-javadoc-plugin
BuildRequires:       maven-resources-plugin
BuildRequires:       maven-release-plugin
BuildRequires:       maven-compiler-plugin
BuildRequires:       zip

Requires:       jpackage-utils

This package specifies a means for obtaining objects in such a way as
to maximize reusability, testability and maintainability compared to
traditional approaches such as constructors, factories, and service
locators (e.g., JNDI). This process, known as dependency injection, is
beneficial to most nontrivial applications.

%package        javadoc
Summary:        API documentation for %{name}
Group:          Documentation
Requires:       jpackage-utils

%description    javadoc

%package        tck
Summary:        TCK for testing %{name} compatibility with JSR-330
Group:          Development/Libraries
Requires:       jpackage-utils
Requires:       %{name} = %{version}-%{release}
Requires:       junit

%description    tck

%setup -q

rm -rf lib/* javadoc/

ln -sf `build-classpath junit` lib/junit.jar

pushd build
for i in *.zip; do
    unzip $i

#Add OSGi manifest for Eclipse
mkdir -p META-INF/
zip -u javax.inject.jar META-INF/MANIFEST.MF


install -d -m 755 %{buildroot}%{_javadir}
install -d -m 755 %{buildroot}%{_mavenpomdir}

# poms
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
install -pm 644 tck-pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}-tck.pom

# jar files
install -pm 644 build/%{artifactId}.jar %{buildroot}%{_javadir}/%{name}.jar
install -pm 644 build/%{artifactId}-tck.jar %{buildroot}%{_javadir}/%{name}-tck.jar

%add_maven_depmap JPP-%{name}.pom %{name}.jar
%add_maven_depmap JPP-%{name}-tck.pom %{name}-tck.jar -f tck

# javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr build/javadoc/* %{buildroot}%{_javadocdir}/%{name}

install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-tck
cp -pr build/tck/javadoc/* %{buildroot}%{_javadocdir}/%{name}-tck


%files tck

%files javadoc
%doc %{_javadocdir}/%{name}
%doc %{_javadocdir}/%{name}-tck

* Wed Feb 06 2013 Java SIG <> - 1-9.20100611svn86
- Update for
- Replace maven BuildRequires with maven-local

* Mon Jul 23 2012 Stanislav Ochotnicky <> - 1-8.20100611svn86
- Add zip BR

* Wed Jul 18 2012 Fedora Release Engineering <> - 1-7.20100611svn86
- Rebuilt for

* Fri Feb 24 2012 Krzysztof Daniel <> - 1-6.20100611svn86
- Added OSGi manifest.

* Mon Feb 13 2012 Stanislav Ochotnicky <> - 1-5.20100611svn86
- Add tck subpackage
- Use upstream build method

* Thu Jan 12 2012 Fedora Release Engineering <> - 1-4.20100611svn86
- Rebuilt for

* Fri Jun 10 2011 Stanislav Ochotnicky <> - 1-3.20100611svn86
- Use maven3 to build
- Versionless jars & javadocs

* Mon Feb 07 2011 Fedora Release Engineering <> - 1-2.20100611svn86
- Rebuilt for

* Tue Sep 21 2010 Stanislav Ochotnicky <> - 1-1.20100611svn86
- Initial version of the package