summaryrefslogtreecommitdiffstats
path: root/clojure
diff options
context:
space:
mode:
authorMichel Alexandre Salim <salimma@fedoraproject.org>2012-06-11 19:18:10 +0700
committerMichel Alexandre Salim <salimma@fedoraproject.org>2012-06-11 19:18:10 +0700
commitc7cdc70f90231cfea8bb0a830e1f98b5e40e74f0 (patch)
treebf3fc5797958fe7924b798ee1bc3cf8145e566d9 /clojure
parent5599b369a37b89ad2ac15b8f4a778ad9a255a5eb (diff)
downloadspecs-c7cdc70f90231cfea8bb0a830e1f98b5e40e74f0.tar.gz
specs-c7cdc70f90231cfea8bb0a830e1f98b5e40e74f0.tar.xz
specs-c7cdc70f90231cfea8bb0a830e1f98b5e40e74f0.zip
add leiningen
Diffstat (limited to 'clojure')
-rw-r--r--clojure/leiningen.spec133
1 files changed, 133 insertions, 0 deletions
diff --git a/clojure/leiningen.spec b/clojure/leiningen.spec
new file mode 100644
index 0000000..ce366cb
--- /dev/null
+++ b/clojure/leiningen.spec
@@ -0,0 +1,133 @@
+%global vendor technomancy
+%global groupId leiningen
+%global artifactId leiningen
+%global commit_hash 713a4d9
+
+%global fullver %{version}%{?prerel:-%{prerel}}
+
+Name: leiningen
+Version: 1.7.1
+#Version: 2.0.0
+Release: %{?prerel:0.}1%{?prerel:.%{prerel}}%{?dist}
+Summary: Clojure project automation tool
+
+License: EPL
+URL: https://github.com/%{vendor}/%{name}
+# wget --content-disposition %{url}/tarball/%{version}%{?prerel:-%{prerel}}
+Source0: %{vendor}-%{name}-%{fullver}-0-g%{commit_hash}.tar.gz
+
+BuildArch: noarch
+
+BuildRequires: jpackage-utils
+
+BuildRequires: clojure-compat
+BuildRequires: clojure-contrib
+BuildRequires: java-devel
+BuildRequires: clucy
+BuildRequires: jline
+BuildRequires: lancet
+BuildRequires: maven-ant-tasks
+# this should be a maven-ant-tasks dependency
+BuildRequires: maven-error-diagnostics
+BuildRequires: robert-hooke
+
+BuildRequires: maven
+
+BuildRequires: maven-compiler-plugin
+BuildRequires: maven-install-plugin
+BuildRequires: maven-jar-plugin
+BuildRequires: maven-javadoc-plugin
+BuildRequires: maven-release-plugin
+BuildRequires: maven-resources-plugin
+BuildRequires: maven-surefire-plugin
+
+Requires: jpackage-utils
+%if 0%{?rhel}
+Requires(post): jpackage-utils
+Requires(postun): jpackage-utils
+%endif
+
+Requires: clojure-compat
+Requires: clojure-contrib
+Requires: java-devel
+Requires: clucy
+Requires: jline
+Requires: lancet
+Requires: maven-ant-tasks
+Requires: maven-error-diagnostics
+Requires: robert-hooke
+
+%description
+Working on Clojure projects with tools designed for Java can be an
+exercise in frustration. With Leiningen, you describe your build with
+Clojure. Leiningen handles fetching dependencies, running tests,
+packaging your projects and can be easily extended with a number of
+plugins.
+
+
+%prep
+%setup -q -n %{vendor}-%{name}-%{commit_hash}
+
+
+%build
+%if 0%{?rhel}
+export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
+mkdir -p $MAVEN_REPO_LOCAL
+
+mvn-jpp \
+ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
+%else
+mvn-rpmbuild \
+%endif
+ install
+
+
+%install
+install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
+install -pm 644 target/%{name}-%{version}.jar \
+ $RPM_BUILD_ROOT/%{_javadir}/%{name}.jar
+
+install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
+install -pm 644 pom.xml \
+ $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom
+
+%if 0%{?add_maven_depmap:1}
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
+%else
+%add_to_maven_depmap %{groupId} %{artifactId} %{version} JPP %{name}.jar
+%endif
+
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
+cp -p bash_completion.bash \
+ $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/lein
+
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions
+cp -p zsh_completion.zsh \
+ $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions/_lein
+
+
+%if 0%{?rhel}
+%post
+%update_maven_depmap
+
+%postun
+%update_maven_depmap
+%endif
+
+
+%files
+%doc COPYING README.md NEWS.md TUTORIAL.md
+%{_mavendepmapfragdir}/%{name}
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_javadir}/%{name}.jar
+%dir %{_sysconfdir}/bash_completion.d
+%{_sysconfdir}/bash_completion.d/lein
+%dir %{_datadir}/zsh
+%dir %{_datadir}/zsh/site-functions
+%{_datadir}/zsh/site-functions/_lein
+
+
+%changelog
+* Mon Jun 11 2012 Michel Salim <salimma@fedoraproject.org> - 1.7.1-1
+- Initial package
+