This commit is contained in:
gil 2013-08-04 11:33:03 +02:00
parent 3816cedd42
commit 2f0452e598

View File

@ -7,24 +7,24 @@ Release: 2%{?dist}
Summary: Java-based testing framework
# org/testng/remote/strprotocol/AbstractRemoteTestRunnerClient.java is CPL
License: ASL 2.0 and CPL
Group: Development/Libraries
URL: http://testng.org/
Source0: https://github.com/cbeust/testng/archive/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: java-devel
BuildRequires: jpackage-utils
BuildRequires: maven-local
BuildRequires: beust-jcommander >= 1.27
BuildRequires: snakeyaml
BuildRequires: google-guice
Requires: java
Requires: jpackage-utils
Requires: beust-jcommander >= 1.27
Requires: snakeyaml
Requires: google-guice
BuildRequires: mvn(com.beust:jcommander) >= 1.27
BuildRequires: mvn(com.google.guava:guava)
BuildRequires: mvn(com.google.inject:guice)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.ant:ant)
BuildRequires: mvn(org.beanshell:bsh)
BuildRequires: mvn(org.sonatype.oss:oss-parent)
BuildRequires: mvn(org.yaml:snakeyaml)
BuildRequires: maven-local
BuildRequires: maven-plugin-bundle
%description
TestNG is a testing framework inspired from JUnit and NUnit but introducing
@ -34,8 +34,6 @@ functional, end-to-end, integration, etc.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation
Requires: jpackage-utils
%description javadoc
This package contains the API documentation for %{name}.
@ -44,6 +42,7 @@ This package contains the API documentation for %{name}.
%setup -q -n %{name}-%{name}-%{version}
# build fix for new guice
%pom_add_dep com.google.guava:guava::provided
sed -i "s|com.google.inject.internal|com.google.common.collect|" \
src/main/java/org/testng/xml/XmlDependencies.java \
src/main/java/org/testng/xml/XmlGroups.java \
@ -52,6 +51,9 @@ sed -i "s|com.google.inject.internal|com.google.common.collect|" \
src/test/java/test/mustache/MustacheTest.java \
src/test/java/test/thread/B.java
%pom_remove_plugin :maven-gpg-plugin
%pom_remove_plugin :maven-source-plugin
# remove bundled stuff
rm -rf spring
rm -rf 3rdparty
@ -67,31 +69,18 @@ iconv --from-code=ISO-8859-2 --to-code=UTF-8 ANNOUNCEMENT.txt > ANNOUNCEMENT.txt
mv -f ANNOUNCEMENT.txt.utf8 ANNOUNCEMENT.txt
%build
mvn-rpmbuild -Dmaven.local.debug=true -Dgpg.skip=true install javadoc:aggregate
%mvn_file : %{name}
%mvn_build -- -Dmaven.local.debug=true
%install
# jars
install -d -m 755 %{buildroot}%{_javadir}
install -p -m 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
%mvn_install
# pom
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap JPP-%{name}.pom %{name}.jar
# javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
%files
%files -f .mfiles
%doc LICENSE.txt ANNOUNCEMENT.txt CHANGES.txt README
%{_javadir}/%{name}.jar
%{_mavenpomdir}/JPP-%{name}.pom
%{_mavendepmapfragdir}/%{name}
%files javadoc
%files javadoc -f .mfiles-javadoc
%doc LICENSE.txt
%{_javadocdir}/%{name}
%changelog
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.8.5-2