diff --git a/junit.spec b/junit.spec new file mode 100644 index 0000000..bf667b7 --- /dev/null +++ b/junit.spec @@ -0,0 +1,76 @@ +Name: junit +Epoch: 1 +Version: 4.12 +Release: 12 +Summary: A Java package for unit testing frameworks +License: EPL-1.0 +URL: http://www.junit.org/ +Source0: https://github.com/%{name}-team/%{name}/archive/r%{version}.tar.gz + +BuildArch: noarch +BuildRequires: maven-local mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin) +BuildRequires: mvn(org.hamcrest:hamcrest-core) + +Obsoletes: %{name}-demo < 4.12 + +%description +JUnit is a simple framework to write repeatable tests. It is an +instance of the xUnit architecture for unit testing frameworks. + +%package help +Summary: Documents for junit + +Provides: %{name}-manual = %{epoch}:%{version}-%{release} +Obsoletes: %{name}-manual < %{epoch}:%{version}-%{release} +Provides: %{name}-javadoc = %{epoch}:%{version}-%{release} +Obsoletes: %{name}-javadoc < %{epoch}:%{version}-%{release} + +%description help +The junit-help package contains related documents. + +%prep +%autosetup -n %{name}4-r%{version} -p1 + +find . -name "*.jar" -delete +find . -name "*.class" -delete + +%pom_remove_plugin :replacer +sed s/@version@/%{version}/ src/main/java/junit/runner/Version.java.template >src/main/java/junit/runner/Version.java + +%pom_remove_plugin :animal-sniffer-maven-plugin + +%pom_remove_plugin :maven-javadoc-plugin + +%pom_xpath_inject pom:project "bundle" +%pom_xpath_inject pom:build/pom:plugins " + + org.apache.felix + maven-bundle-plugin + true + + + org.junit + {local-packages},!org.hamcrest*,*;x-internal:=true + <_nouses>true + + + " + +%mvn_file : junit + +%build +%mvn_build + +%install +%mvn_install + +%files -f .mfiles +%doc LICENSE-junit.txt README.md + +%files help -f .mfiles-javadoc +%doc doc/* + +%changelog +* Sun Jan 19 2020 Jiangping Hu - 1:4.12-12 +- Package init diff --git a/r4.12.tar.gz b/r4.12.tar.gz new file mode 100644 index 0000000..eb70a2a Binary files /dev/null and b/r4.12.tar.gz differ