diff --git a/.gitignore b/.gitignore index e69de29..396efa6 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/atinject-1.tar.xz diff --git a/atinject.spec b/atinject.spec new file mode 100644 index 0000000..26060ab --- /dev/null +++ b/atinject.spec @@ -0,0 +1,112 @@ +%global artifactId javax.inject + +Name: atinject +Version: 1 +Release: 1.20100611svn86%{?dist} +Summary: Dependency injection specification for Java (JSR-330) + +Group: Development/Libraries +License: ASL 2.0 +URL: http://code.google.com/p/atinject/ +# latest release doesn't generate javadocs and there is no source +# tarball with pom.xml or ant build file +# +# svn export -r86 http://atinject.googlecode.com/svn/trunk atinject-1 +# tar caf atinject-1.tar.xz atinject-1 +Source0: %{name}-%{version}.tar.xz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +BuildRequires: maven2 +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 + + +Requires: jpackage-utils +Requires(post): jpackage-utils +Requires(postun): jpackage-utils + +%description +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 +%{summary}. + + +%prep +%setup -q + +rm -rf lib/ + +%build +export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository +mkdir -p $MAVEN_REPO_LOCAL +mvn-jpp \ + -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ + install javadoc:javadoc + +%install +rm -rf %{buildroot} + +install -d -m 755 %{buildroot}%{_javadir} +install -d -m 755 %{buildroot}%{_mavenpomdir} + +%add_to_maven_depmap %{artifactId} %{artifactId} %{version} JPP %{name} + +# poms +install -d -m 755 %{buildroot}%{_mavenpomdir} +install -pm 644 pom.xml \ + %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom + +# jar files +install -pm 644 target/%{artifactId}-*.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar + +# symlinks +(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) + + +# javadoc +install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version} +cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version} +ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} # ghost symlink + + +%clean +rm -rf %{buildroot} + +%post +%update_maven_depmap + +%postun +%update_maven_depmap + + +%files +%defattr(-,root,root,-) +%{_mavenpomdir}/* +%{_mavendepmapfragdir}/* +%{_javadir}/*.jar + +%files javadoc +%defattr(-,root,root,-) +%doc %{_javadocdir}/%{name}* + +%changelog +* Tue Sep 21 2010 Stanislav Ochotnicky - 1-1.20100611svn86 +- Initial version of the package + diff --git a/sources b/sources index e69de29..2981daa 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +42682fced66d3724390a29416d4b149f atinject-1.tar.xz