testng/testng.spec

149 lines
4.0 KiB
RPMSpec
Raw Normal View History

2011-06-22 20:11:42 +00:00
%global group_id org.testng
Name: testng
Version: 6.0.1
Release: 2%{?dist}
2011-06-22 20:11:42 +00:00
Summary: Java-based testing framework
License: ASL 2.0
Group: Development/Libraries
URL: http://testng.org/
# git clone git://github.com/cbeust/testng.git
# cd testng
# git archive --prefix="testng-6.0.1/" --format=tar testng-6.0.1 | xz > testng-6.0.1.tar.xz
Source0: %{name}-%{version}.tar.xz
Source1: %{name}.depmap
Patch0: %{name}-test-fails-workaround.patch
BuildArch: noarch
BuildRequires: java-devel
BuildRequires: jpackage-utils
BuildRequires: maven
BuildRequires: beust-jcommander
BuildRequires: snakeyaml
Requires: beust-jcommander
Requires: snakeyaml
Requires: java
Requires: jpackage-utils
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
2009-12-21 21:50:00 +00:00
%description
TestNG is a testing framework inspired from JUnit and NUnit but introducing
some new functionality, including flexible test configuration, and
distributed test running. It is designed to cover unit tests as well as
functional, end-to-end, integration, etc.
%package javadoc
2011-06-22 20:11:42 +00:00
Summary: API documentation for %{name}
Group: Documentation
Requires: jpackage-utils
2009-12-21 21:50:00 +00:00
%description javadoc
2011-06-22 20:11:42 +00:00
This package contains the API documentation for %{name}.
2009-12-21 21:50:00 +00:00
%prep
%setup -q
2011-06-22 20:11:42 +00:00
%patch0 -p1
2009-12-21 21:50:00 +00:00
2011-06-22 20:11:42 +00:00
# remove bundled stuff
rm -rf spring
rm -rf 3rdparty
rm -rf doc
rm -rf lib-supplied
rm -rf gigaspaces
rm -rf sandbox
rm -rf examples
rm -f *.jar
2009-12-21 21:50:00 +00:00
2011-06-22 20:11:42 +00:00
# fix the ant group_id ... ant -> org.apache.ant
sed -i 's/<groupId>ant/<groupId>org.apache.ant/g' pom.xml
2009-12-21 21:50:00 +00:00
2011-06-22 20:11:42 +00:00
# replace CR+LF with LF
sed -i 's/\r//g' README
2009-12-21 21:50:00 +00:00
2011-06-22 20:11:42 +00:00
# convert to UTF8
2009-12-21 21:50:00 +00:00
2011-06-22 20:11:42 +00:00
#$ enca CHANGES.txt
#Unrecognized encoding
#$ enca ANNOUNCEMENT.txt
#Unrecognized encoding
2009-12-21 21:50:00 +00:00
2011-06-22 20:11:42 +00:00
#$ chardet-file ANNOUNCEMENT.txt
#{'confidence': 0.8484260688832136, 'encoding': 'ISO-8859-2'}
#$ chardet-file CHANGES.txt
#{'confidence': 0.7833420201466339, 'encoding': 'ISO-8859-2'}
2009-12-21 21:50:00 +00:00
2011-06-22 20:11:42 +00:00
iconv --from-code=ISO-8859-2 --to-code=UTF-8 ANNOUNCEMENT.txt > ANNOUNCEMENT.txt.utf8
mv -f ANNOUNCEMENT.txt.utf8 ANNOUNCEMENT.txt
iconv --from-code=ISO-8859-2 --to-code=UTF-8 CHANGES.txt > CHANGES.txt.utf8
mv -f CHANGES.txt.utf8 CHANGES.txt
2009-12-21 21:50:00 +00:00
2011-06-22 20:11:42 +00:00
%build
# gdata-java has no maven support -> depmap file needed
# http://code.google.com/p/gdata-java-client/issues/detail?id=328
mvn-rpmbuild -Dmaven.local.depmap.file="%{SOURCE1}" -Dgpg.skip=true install javadoc:aggregate
2009-12-21 21:50:00 +00:00
2011-06-22 20:11:42 +00:00
%install
# jars
install -d -m 755 %{buildroot}%{_javadir}
install -p -m 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
2009-12-21 21:50:00 +00:00
2011-06-22 20:11:42 +00:00
# pom
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_to_maven_depmap %{group_id} %{name} %{version} JPP %{name}
2009-12-21 21:50:00 +00:00
2011-06-22 20:11:42 +00:00
# javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
2009-12-21 21:50:00 +00:00
%post
%update_maven_depmap
%postun
%update_maven_depmap
2011-06-22 20:11:42 +00:00
%files
%doc LICENSE.txt ANNOUNCEMENT.txt CHANGES.txt README
%{_javadir}/%{name}.jar
%{_mavenpomdir}/JPP-%{name}.pom
%{_mavendepmapfragdir}/%{name}
%files javadoc
%doc LICENSE.txt
%doc %{_javadocdir}/%{name}
2009-12-21 21:50:00 +00:00
%changelog
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
2011-06-22 20:11:42 +00:00
* Thu May 12 2011 Jaromir Capik <jcapik@redhat.com> - 6.0.1-1
- Update to 6.0.1
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.11-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Jul 19 2010 Lubomir Rintel <lkundrak@v3.sk> - 5.11-3
- Drop backport util concurrent dependency, we don't build jdk14 jar
2009-12-21 21:50:00 +00:00
* Mon Dec 21 2009 Lubomir Rintel <lkundrak@v3.sk> - 5.11-2
- Add POM
* Sun Dec 20 2009 Lubomir Rintel <lkundrak@v3.sk> - 5.11-1
- Bump to 5.11
- Add maven depmap fragments
- Fix line encoding of README
* Wed Dec 09 2009 Lubomir Rintel <lkundrak@v3.sk> - 5.10-2
- Add javadoc
- Don't ship jdk14 jar
* Fri Nov 27 2009 Lubomir Rintel <lkundrak@v3.sk> - 5.10-1
- Initial packaging