From 2f0d0e5fcc695be989702180a22d54d0a5c3c752 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Thu, 23 Feb 2023 09:45:34 +0100 Subject: [PATCH] Refactor .spec --- hamcrest.spec | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/hamcrest.spec b/hamcrest.spec index 60a39c9..fec3419 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -39,50 +39,45 @@ 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 ' - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - 1.8 - 1.8 - - - + + + org.apache.maven.plugins + maven-compiler-plugin + any + + 1.8 + 1.8 + + + ' %mvn_alias org.hamcrest:hamcrest org.hamcrest:hamcrest-all %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