forked from pool/leiningen
osc copypac from project:home:KGronlund package:leiningen revision:29
OBS-URL: https://build.opensuse.org/package/show/devel:languages:clojure/leiningen?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
23
PKGBUILD
Normal file
23
PKGBUILD
Normal file
@@ -0,0 +1,23 @@
|
||||
# Maintainer: Kristoffer Gronlund <kgronlund at suse dot com>
|
||||
pkgname=leiningen
|
||||
pkgver=2.5.1
|
||||
pkgrel=1
|
||||
epoch=1
|
||||
pkgdesc="Automating Clojure projects without setting your hair on fire."
|
||||
arch=('any')
|
||||
url="http://github.com/technomancy/leiningen"
|
||||
license=("EPL-1.0")
|
||||
depends=('java-environment')
|
||||
optdepends=('rlwrap: for readline support')
|
||||
# https://raw.github.com/technomancy/leiningen/stable/bin/lein
|
||||
# https://raw.github.com/technomancy/leiningen/stable/doc/lein.1
|
||||
source=("${pkgname}-${pkgver}.tar.xz")
|
||||
sha1sums=('a162e301089a66d05a9047987d20e3b205e6bc97')
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
install -m 0755 -D ./bin/lein "${pkgdir}/usr/bin/lein"
|
||||
install -m 0644 -D ./doc/lein.1 "${pkgdir}/usr/share/man/man1/lein.1"
|
||||
install -m 0644 -D ./zsh_completion.zsh "${pkgdir}/usr/share/zsh/site-functions/_lein"
|
||||
install -m 0644 -D ./bash_completion.bash "${pkgdir}/usr/share/bash-completion/completions/lein"
|
||||
}
|
38
bash_completion.bash
Normal file
38
bash_completion.bash
Normal file
@@ -0,0 +1,38 @@
|
||||
_lein_completion() {
|
||||
local cur prev tasks
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
tasks="check classpath clean compile deploy deps help install jar javac new pom repl retest run search swank test trampoline uberjar upgrade version with-profile"
|
||||
|
||||
case "${prev}" in
|
||||
check | classpath | clean | deploy | deps | install | jar | javac | new | pom | repl | swank | uberjar | version)
|
||||
COMPREPLY=()
|
||||
;;
|
||||
help)
|
||||
# Show tasks again, but only once; don't infinitely recurse
|
||||
local prev2="${COMP_WORDS[COMP_CWORD-2]}"
|
||||
if [ "$prev2" == "help" ]; then
|
||||
COMPREPLY=()
|
||||
else
|
||||
COMPREPLY=( $(compgen -W "${tasks}" -- ${cur}) )
|
||||
fi
|
||||
;;
|
||||
test | retest )
|
||||
# list project's test namespaces:
|
||||
local namespaces=$(find test/ -type f -name "*.clj" -exec sed -n 's/^(ns[ ]*//p' '{}' '+')
|
||||
COMPREPLY=( $(compgen -W "${namespaces}" -- ${cur}) )
|
||||
;;
|
||||
run | compile)
|
||||
# list project's src namespaces:
|
||||
local namespaces=$(find src/ -type f -name "*.clj" -exec sed -n 's/^(ns[ ]*//p' '{}' '+')
|
||||
COMPREPLY=( $(compgen -W "${namespaces}" -- ${cur}) )
|
||||
;;
|
||||
lein)
|
||||
COMPREPLY=( $(compgen -W "${tasks}" -- ${cur}) )
|
||||
;;
|
||||
esac
|
||||
|
||||
return 0
|
||||
}
|
||||
complete -F _lein_completion lein
|
3
leiningen-2.5.1.tar.xz
Normal file
3
leiningen-2.5.1.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2fd63f41ae1c688eb1af6c6332dfa2f1314fce23340c0177b14c4b4c0f934846
|
||||
size 631144
|
11
leiningen.changes
Normal file
11
leiningen.changes
Normal file
@@ -0,0 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 19 13:24:55 UTC 2015 - kgronlund@suse.com
|
||||
|
||||
- Update to 2.5.1
|
||||
- Completion scripts are now bundled in the distribution.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jan 12 07:11:47 UTC 2014 - kgronlund@suse.com
|
||||
|
||||
- Initial version.
|
||||
|
68
leiningen.spec
Normal file
68
leiningen.spec
Normal file
@@ -0,0 +1,68 @@
|
||||
#
|
||||
# spec file for package leiningen
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
|
||||
|
||||
Name: leiningen
|
||||
Version: 2.5.1
|
||||
Release: 0
|
||||
Summary: Automating Clojure projects without setting your hair on fire
|
||||
License: EPL-1.0
|
||||
Group: Development/Tools/Building
|
||||
Url: http://leiningen.org/
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
%if 0%{?suse_version} > 01020
|
||||
BuildRequires: fdupes
|
||||
%endif
|
||||
Requires: java >= 1.7.0
|
||||
Requires: clojure >= 1.5.1
|
||||
%if 0%{?suse_version} > 1110
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%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
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
install -m 0755 -D ./bin/lein %{buildroot}%{_bindir}/lein
|
||||
install -m 0644 -D ./doc/lein.1 %{buildroot}%{_mandir}/man1/lein.1
|
||||
install -m 0644 -D ./zsh_completion.zsh %{buildroot}%{_sysconfdir}/zsh_completion.d/_lein
|
||||
install -m 0644 -D ./bash_completion.bash %{buildroot}%{_sysconfdir}/bash_completion.d/lein.sh
|
||||
|
||||
%if 0%{?suse_version} > 01020
|
||||
%fdupes %{buildroot}
|
||||
%endif
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/lein
|
||||
%doc %{_mandir}/man1/lein*
|
||||
%config %{_sysconfdir}/bash_completion.d/*.sh
|
||||
%config %{_sysconfdir}/zsh_completion.d
|
||||
|
||||
%changelog
|
66
zsh_completion.zsh
Normal file
66
zsh_completion.zsh
Normal file
@@ -0,0 +1,66 @@
|
||||
#compdef lein
|
||||
|
||||
# Lein ZSH completion function
|
||||
# Drop this somewhere in your $fpath (like /usr/share/zsh/site-functions)
|
||||
# and rename it _lein
|
||||
|
||||
_lein() {
|
||||
if (( CURRENT > 2 )); then
|
||||
# shift words so _arguments doesn't have to be concerned with second command
|
||||
(( CURRENT-- ))
|
||||
shift words
|
||||
# use _call_function here in case it doesn't exist
|
||||
_call_function 1 _lein_${words[1]}
|
||||
else
|
||||
_values "lein command" \
|
||||
"check[Check syntax and warn on reflection.]" \
|
||||
"classpath[Print the classpath of the current project.]" \
|
||||
"clean[Remove all files from project's target-path.]" \
|
||||
"compile[Compile Clojure source into \.class files.]" \
|
||||
"deploy[Build jar and deploy to remote repository.]" \
|
||||
"deps[Download :dependencies.]" \
|
||||
"help[Display a list of tasks or help for a given task.]" \
|
||||
"install[Install current project to the local repository.]" \
|
||||
"jack-in[Jack in to a Clojure SLIME session from Emacs.]" \
|
||||
"jar[Package up all the project's files into a jar file.]" \
|
||||
"javac[Compile Java source files.]" \
|
||||
"new[Create a new project skeleton.]" \
|
||||
"plugin[Manage user-level plugins.]" \
|
||||
"pom[Write a pom.xml file to disk for Maven interoperability.]" \
|
||||
"profiles[List all available profiles or display one if given an argument.]" \
|
||||
"repl[Start a repl session either with the current project or standalone.]" \
|
||||
"retest[Run only the test namespaces which failed last time around.]" \
|
||||
"run[Run the project's -main function.]" \
|
||||
"search[Search remote repositories.]" \
|
||||
"swank[Launch swank server for Emacs to connect.]" \
|
||||
"test[Run the project's tests.]" \
|
||||
"trampoline[Run a task without nesting the project's JVM inside Leiningen's.]" \
|
||||
"uberjar[Package up the project files and all dependencies into a jar file.]" \
|
||||
"upgrade[Upgrade Leiningen to the latest stable release.]" \
|
||||
"version[Print version for Leiningen and the current JVM.]" \
|
||||
"with-profile[Apply the given task with the profile(s) specified.]"
|
||||
fi
|
||||
}
|
||||
|
||||
_lein_plugin() {
|
||||
_values "lein plugin commands" \
|
||||
"install[Download, package, and install plugin jarfile into ~/.lein/plugins]" \
|
||||
"uninstall[Delete the plugin jarfile: \[GROUP/\]ARTIFACT-ID VERSION]"
|
||||
}
|
||||
|
||||
|
||||
_lein_namespaces() {
|
||||
if [ -d test ]; then
|
||||
_values "lein valid namespaces" $(find $1 -type f -name "*.clj" -exec grep -E \
|
||||
'^\(ns[[:space:]]+\w+' '{}' ';' | awk '/\(ns[ ]*([A-Za-z\.]+)/ {print $2}')
|
||||
fi
|
||||
}
|
||||
|
||||
_lein_run() {
|
||||
_lein_namespaces "src/"
|
||||
}
|
||||
|
||||
_lein_test() {
|
||||
_lein_namespaces "test/"
|
||||
}
|
||||
|
Reference in New Issue
Block a user