Refactor .spec

This commit is contained in:
Marian Koncek 2023-02-23 09:45:34 +01:00
parent 15cda89ed4
commit 2f0d0e5fcc

View File

@ -39,16 +39,9 @@ Javadoc for %{name}.
%setup -q -n JavaHamcrest-%{upstream_version}
%patch0 -p1
rm -rf docs
rm -rf *gradle*
rm -rf */*.gradle
mv hamcrest/src .
rm -rf hamcrest
rm -rf hamcrest-core
rm -rf hamcrest-integration
rm -rf hamcrest-library
sed -i 's/\r//' LICENSE.txt
pushd hamcrest
cp -p %{SOURCE1} pom.xml
%pom_add_dep junit:junit::test
%pom_xpath_inject pom:project '
@ -57,7 +50,7 @@ cp -p %{SOURCE1} pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>any</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@ -70,19 +63,21 @@ cp -p %{SOURCE1} pom.xml
%mvn_alias org.hamcrest:hamcrest org.hamcrest:hamcrest-core
%mvn_alias org.hamcrest:hamcrest org.hamcrest:hamcrest-library
sed -i 's/\r//' LICENSE.txt
%build
pushd hamcrest
%mvn_build
popd
%install
pushd hamcrest
%mvn_install
popd
%files -f .mfiles
%files -f hamcrest/.mfiles
%doc README.md
%license LICENSE.txt
%files javadoc -f .mfiles-javadoc
%files javadoc -f hamcrest/.mfiles-javadoc
%license LICENSE.txt
%changelog