Refactor .spec

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

View File

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