diff options
author | Daniel YC Lin | 2015-06-13 13:07:16 +0800 |
---|---|---|
committer | Daniel YC Lin | 2015-06-13 13:07:16 +0800 |
commit | 73b8369f02b55eb554b1a9480032069b618c19c1 (patch) | |
tree | aace20f44fd01e3a8caf6ec8636fe39e2cd51e56 | |
download | aur-fossil-tip.tar.gz |
merge to aur4
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 56 | ||||
-rw-r--r-- | fossil-autocomplete.bash | 33 | ||||
-rw-r--r-- | fossil-autocomplete.zsh | 30 | ||||
-rw-r--r-- | fossil-xinetd | 23 | ||||
-rw-r--r-- | fossil.service | 11 | ||||
-rw-r--r-- | fossil.socket | 10 |
8 files changed, 199 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8b5c8c70757a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +pkgbase = fossil-tip + pkgdesc = Simple, high-reliability, distributed software configuration management + pkgver = 20150205.0d1d + pkgrel = 2 + url = http://www.fossil-scm.org + arch = i686 + arch = x86_64 + arch = sh4 + license = BSD + depends = openssl + depends = fuse + provides = fossil + conflicts = fossil + backup = etc/xinetd.d/fossil + source = fossil.socket + source = fossil.service + source = fossil-xinetd + source = fossil-autocomplete.bash + source = fossil-autocomplete.zsh + source = http://www.fossil-scm.org/index.html/tarball/tip.tar.gz + md5sums = 47b8382c177e45b1932c4c8f98895ed4 + md5sums = aea80ead0dc14f773c2b0b546292f02c + md5sums = 62f6fb3739191b352c3e2995ced9be4e + md5sums = 2e57690b9153f4eb684acc378f2134d3 + md5sums = ff2fa9218fc7580e7866a07e752d031d + md5sums = 84d35062047e12aefbcac789012e8632 + +pkgname = fossil-tip + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..05e7a6298f95 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +## Ignore everything +*.zip +*.xz +*.gz +*.bz2 +*.7z +*/* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..df4103518172 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: Daniel YC Lin <dlin.tw at gmail> +# vim:et sw=2 ts=2: + +pkgname="fossil-tip" +_pkgname=fossil +pkgver=20150611.18fc +pkgrel=1 +pkgdesc="Simple, high-reliability, distributed software configuration management" +arch=('i686' 'x86_64' 'sh4') +license=('BSD') +url="http://www.fossil-scm.org" +depends=('openssl' 'fuse') +backup=(etc/xinetd.d/fossil) +conflicts=('fossil') +provides=('fossil') +source=(fossil.socket fossil.service fossil-xinetd + fossil-autocomplete.bash + fossil-autocomplete.zsh + http://www.fossil-scm.org/index.html/tarball/tip.tar.gz) +pkgver() { + cd tip + d=$(head manifest | awk 'NR==2{print substr($2,1,4) substr($2,6,2) substr($2,9,2)}') + u=$(awk 'NR==1{print substr($1,1,4)}' manifest.uuid) + echo "$d.$u" +} + +prepare() { + cp fossil-autocomplete.{bash,zsh} tip/tools +} + +build() { + cd tip + ./configure --prefix=/usr + # headers and translate targets are problematic with parallel jobs + make -j1 bld bld/headers + make +} + +package() { + install -Dm644 fossil-xinetd "$pkgdir"/etc/xinetd.d/fossil + install -Dm644 fossil.socket "$pkgdir"/usr/lib/systemd/system/fossil.socket + install -Dm644 fossil.service "$pkgdir"/usr/lib/systemd/system/fossil@.service + + cd $srcdir/tip + install -Dm644 tools/fossil-autocomplete.bash "$pkgdir"/usr/share/bash-completion/completions/fossil + install -Dm644 tools/fossil-autocomplete.zsh $pkgdir/usr/share/zsh/site-functions/_fossil + + install -Dm755 ${_pkgname} ${pkgdir}/usr/bin/${_pkgname} + install -Dm644 COPYRIGHT-BSD2.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} +md5sums=('47b8382c177e45b1932c4c8f98895ed4' + 'aea80ead0dc14f773c2b0b546292f02c' + '62f6fb3739191b352c3e2995ced9be4e' + '2e57690b9153f4eb684acc378f2134d3' + 'ff2fa9218fc7580e7866a07e752d031d' + SKIP) diff --git a/fossil-autocomplete.bash b/fossil-autocomplete.bash new file mode 100644 index 000000000000..4e0312672365 --- /dev/null +++ b/fossil-autocomplete.bash @@ -0,0 +1,33 @@ +# Command name bash completion for Fossil. +# Original: Mailing-list contribution by Stuart Rackham. +# Maintainer: Daniel YC Lin <dlin.tw at gmail.com> +# I'm not bash expert, please feed back to me, if you could improve this. +# TODO: fossil branch list --options + +function _fossil() { + local cur commands + cur=${COMP_WORDS[COMP_CWORD]} + prev="${COMP_WORDS[COMP_CWORD-1]}" + commands=$(fossil help --all) + if [ $COMP_CWORD -eq 1 ] || [ ${COMP_WORDS[1]} = help ]; then + # Command name completion for 1st argument or 2nd if help command. + COMPREPLY=( $(compgen -W "$commands" $cur) ) + else + case "${prev}" in + add) opts="--case-sensitive --dotfiles --force --ignore --clean" ;; + addremove) opts="--case-sensitive --dotfiles --ignore --clean --dry-run" ;; + all) opts="changes clean dbstat extras ignore info list pull push rebuild sync setting set unset" ;; + annotate) opts="--filevers --log --limit --ignore-all-space --ignore-trailing-space" ;; + bisect) opts="bad good log chart next options reset status undo" ;; + branch) opts="new list" ;; + merge) opts="--baseline --binary --case-sensitive --force --force-missing --integrate --dry-run --verbose" ;; + esac + compopt -o filenames + COMPREPLY=($(compgen -fW "${opts}" -- "${cur}") \ + $(compgen -d -- "$cur")) + # File name completion for other arguments. + #COMPREPLY=( $(compgen -f $cur) ) + fi +} +complete -o default -F _fossil fossil f +# vim: et sw=4 ts=4 diff --git a/fossil-autocomplete.zsh b/fossil-autocomplete.zsh new file mode 100644 index 000000000000..c3fe89ba0514 --- /dev/null +++ b/fossil-autocomplete.zsh @@ -0,0 +1,30 @@ +#compdef fossil + +# zsh completion wrapper for zsh by Daniel YC Lin <dlin.tw at gmail.com> +# I'm not zsh expert, please help me to fix this. 2015/02/06 +# TODO: fossil add -option<tab> +# +# Usage example: +# cp fossil-autocomplete.zsh ~/zshfunc/_fossil +# fpath=(~/zshfunc $fpath) +# autoload -U ~/zshfunc/*(:t) +# Package example: +# install -Dm644 fossil-autocomplete.zsh /share/zsh/site-functions/_fossil + +local curcontext="$curcontext" state line expl ret=1 +typeset -A opt_args + +_arguments -C \ + '(-)--help[print help information]' \ + '1: :->cmds' \ + '*:files:_files' && ret=0 + +_fossil_cmds=($(LC_ALL=C fossil help -a)) +_fossil_commands() { + compadd "$@" -k _fossil_cmds +} +case $state in + cmds) + _wanted commands expl 'fossil help' _fossil_commands && ret=0 + ;; +esac diff --git a/fossil-xinetd b/fossil-xinetd new file mode 100644 index 000000000000..28e22a198a23 --- /dev/null +++ b/fossil-xinetd @@ -0,0 +1,23 @@ +service fossil +{ +#better not change any of these +type = UNLISTED +socket_type = stream +protocol = tcp +wait = no +user = root +server = /usr/bin/fossil + +#only change these +#http port, fossil will listen +port = 8055 + +#change this path to where your fossil repositories are +server_args = http /var/fossil + +#comment next line to enable remote access +only_from = 127.0.0.1 localhost + +#change to `no` to activate fossil +disable = yes +} diff --git a/fossil.service b/fossil.service new file mode 100644 index 000000000000..9c585100e502 --- /dev/null +++ b/fossil.service @@ -0,0 +1,11 @@ +[Unit] +Description=Fossil service + +[Service] +# /var/fossil is the default path to fossil repositories +ExecStart=-/usr/bin/fossil http /var/fossil +StandardInput=socket +# Uncomment this line to use fossil with URL prefix +# This allows fossil to generate correct hyperlinks and redirects when +# hosted within virtual directory (e.g. nginx reverse-proxy setups) +#Environment=SCRIPT_NAME=/fossil diff --git a/fossil.socket b/fossil.socket new file mode 100644 index 000000000000..96aee9f0684e --- /dev/null +++ b/fossil.socket @@ -0,0 +1,10 @@ +[Unit] +Description=Fossil socket + +[Socket] +# TCP port to listen on +ListenStream=8055 +Accept=yes + +[Install] +WantedBy=sockets.target |