%global project clojure %global artifactId spec.alpha %global archivename %{artifactId}-%{artifactId} %global full_version %{version} Name: clojure-spec-alpha Epoch: 1 Version: 0.2.187 Release: %mkrel 1 Summary: Spec is a Clojure library to describe the structure of data and functions Group: Development/Java License: EPL-1.0 URL: https://github.com/%{project}/%{artifactId}/ Source0: https://github.com/%{project}/%{artifactId}/archive/%{artifactId}-%{full_version}.zip BuildArch: noarch BuildRequires: maven-local BuildRequires: mvn(org.codehaus.mojo:exec-maven-plugin) BuildRequires: mvn(com.theoryinpractise:clojure-maven-plugin) BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: mvn(org.clojure:clojure) %description Spec is a Clojure library to describe the structure of data and functions. Specs can be used to validate data, conform (destructure) data, explain invalid data, generate examples that conform to the specs, and automatically use generative testing to test functions. %prep %setup -q -n %{archivename}-%{full_version} # Remove unpackaged parent pom and add the required groupId %pom_remove_parent pom.xml %pom_xpath_inject pom:project "<groupId>org.clojure</groupId>" %pom_xpath_inject pom:project/pom:properties "<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>" %pom_xpath_inject pom:project/pom:properties "<clojure.source.dir>src/main/clojure</clojure.source.dir>" %pom_xpath_inject pom:project/pom:properties "<clojure.testSource.dir>src/test/clojure</clojure.testSource.dir>" # Hook clojure-maven-plugin to maven phases %pom_xpath_inject "pom:execution[pom:id='clojure-compile']" "<goals><goal>compile</goal></goals>" %pom_xpath_inject "pom:execution[pom:id='clojure-test']" "<goals><goal>test</goal></goals>" # Add builder helper to copy clojure source files so that # compiler finds them. %pom_add_plugin org.codehaus.mojo:build-helper-maven-plugin:1.12 . " <executions> <execution> <id>add-clojure-source-dirs</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> <goal>add-resource</goal> </goals> <configuration> <sources> <source>src/main/clojure</source> </sources> <resources> <resource> <directory>src/main/clojure</directory> </resource> </resources> </configuration> </execution> <execution> <id>add-clojure-test-source-dirs</id> <phase>generate-sources</phase> <goals> <goal>add-test-source</goal> <goal>add-test-resource</goal> </goals> <configuration> <sources> <source>src/test/clojure</source> </sources> <resources> <resource> <directory>src/test/clojure</directory> </resource> </resources> </configuration> </execution> </executions>" %build %mvn_build -f %install %mvn_install %files -f .mfiles %license epl-v10.html %doc CHANGES.md README.md CONTRIBUTING.md %changelog * Tue Nov 17 2020 tv <tv> 1:0.2.187-1.mga8 + Revision: 1646872 - imported package clojure-spec-alpha