diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/.gitignore | 2 | ||||
-rw-r--r-- | contrib/Makefile.am | 6 | ||||
-rw-r--r-- | contrib/PKGBUILD.proto | 35 | ||||
-rw-r--r-- | contrib/README | 7 | ||||
-rw-r--r-- | contrib/bash_completion | 4 | ||||
-rw-r--r-- | contrib/install.proto | 40 | ||||
-rwxr-xr-x | contrib/pacsearch | 2 | ||||
-rwxr-xr-x | contrib/re-pacman | 2 | ||||
-rw-r--r-- | contrib/vimproject | 5 | ||||
-rw-r--r-- | contrib/zsh_completion | 4 |
10 files changed, 94 insertions, 13 deletions
diff --git a/contrib/.gitignore b/contrib/.gitignore index 282522db..e69de29b 100644 --- a/contrib/.gitignore +++ b/contrib/.gitignore @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 3ad85931..73d2130a 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -1,8 +1,12 @@ EXTRA_DIST = \ + PKGBUILD.proto \ + PKGBUILD.vim \ bash_completion \ - pacsearch \ + install.proto \ pacdiff \ + pacsearch \ re-pacman \ + vimproject \ wget-xdelta.sh \ zsh_completion \ README diff --git a/contrib/PKGBUILD.proto b/contrib/PKGBUILD.proto new file mode 100644 index 00000000..9e4b69a0 --- /dev/null +++ b/contrib/PKGBUILD.proto @@ -0,0 +1,35 @@ +# This is an example PKGBUILD file. Use this as a start to creating your own, +# and remove these comments. For more information, see 'man PKGBUILD'. +# NOTE: Please fill out the license field for your package! If it is unknown, +# then please put 'unknown'. + +# Contributor: Your Name <youremail@domain.com> +pkgname=NAME +pkgver=VERSION +pkgrel=1 +pkgdesc="" +arch=() +url="" +license=('GPL') +groups=() +depends=() +makedepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +install= +source=($pkgname-$pkgver.tar.gz) +noextract=() +md5sums=() #generate with 'makepkg -g' + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure --prefix=/usr + make || return 1 + make DESTDIR="$pkgdir" install +} + +# vim:set ts=2 sw=2 et: diff --git a/contrib/README b/contrib/README index 3cb54a1a..95186aba 100644 --- a/contrib/README +++ b/contrib/README @@ -1,5 +1,8 @@ Here is a brief description of the files included in this directory: +{PKGBUILD,install}.proto - prototype PKGBUILD and install files for creating +packages using makepkg. + PKGBUILD.vim - a vim/gvim syntax file for PKGBUILDs. Colors known variable names, highlights common errors such as invalid characters in pkgname or pkgver, etc. @@ -21,3 +24,7 @@ database entries. Useful for reuse, or possible config file extension. vimproject - a project file for the vim project plugin (some files listed may need to be updated). + +wget-xdelta.sh - A download script for pacman which allows binary deltas +generated with makepkg to be used instead of downloading full binary packages. +This should cut download sizes for some package upgrades significantly. diff --git a/contrib/bash_completion b/contrib/bash_completion index 7018dfeb..a3d5c432 100644 --- a/contrib/bash_completion +++ b/contrib/bash_completion @@ -48,7 +48,7 @@ _available_pkgs () local available_pkgs local enabled_repos enabled_repos=$( grep '\[' /etc/pacman.conf | grep -v -e 'options' -e '^#' | tr -d '[]' ) - available_pkgs=$( for r in $enabled_repos; do echo /var/lib/pacman/$r/*; done ) + available_pkgs=$( for r in $enabled_repos; do echo /var/lib/pacman/sync/$r/*; done ) COMPREPLY=( $( compgen -W "$( for i in $available_pkgs; do j=${i##*/}; echo ${j%-*-*}; done )" -- $cur ) ) } @@ -67,7 +67,7 @@ _available_groups () local available_groups local enabled_repos enabled_repos=$( grep '\[' /etc/pacman.conf | grep -v -e 'options' -e '^#' | tr -d '[]' ) - available_groups=$( for r in $enabled_repos; do sed '/%GROUPS%/,/^$/{//d; p}' /var/lib/pacman/$r/*/desc | sort -u; done ) + available_groups=$( for r in $enabled_repos; do sed '/%GROUPS%/,/^$/{//d; p}' /var/lib/pacman/sync/$r/*/desc | sort -u; done ) COMPREPLY=( $( compgen -W "$( for i in $available_groups; do echo ${i%-*-*}; done )" -- $cur ) ) } diff --git a/contrib/install.proto b/contrib/install.proto new file mode 100644 index 00000000..4bf55280 --- /dev/null +++ b/contrib/install.proto @@ -0,0 +1,40 @@ +# This is a default template for a post-install scriptlet. You can +# remove any functions you don't need (and this header). + +# arg 1: the new package version +pre_install() { + /bin/true +} + +# arg 1: the new package version +post_install() { + /bin/true +} + +# arg 1: the new package version +# arg 2: the old package version +pre_upgrade() { + /bin/true +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + /bin/true +} + +# arg 1: the old package version +pre_remove() { + /bin/true +} + +# arg 1: the old package version +post_remove() { + /bin/true +} + +op=$1 +shift +["$(type -t "$op")" = "function" ] && $op "$@" + +# vim:set ts=2 sw=2 et: diff --git a/contrib/pacsearch b/contrib/pacsearch index 6eed254d..1e1c0504 100755 --- a/contrib/pacsearch +++ b/contrib/pacsearch @@ -72,7 +72,7 @@ done # Print colorized package list and descriptions to screen echo -e "$(sed -r \ - -e "s@current/.*@$CLR1&$BASE@" \ + -e "s@core/.*@$CLR1&$BASE@" \ -e "s@extra/.*@$CLR2&$BASE@" \ -e "s@community/.*@$CLR3&$BASE@" \ -e "s@testing/.*@$CLR4&$BASE@" \ diff --git a/contrib/re-pacman b/contrib/re-pacman index 350fe865..c53ce87d 100755 --- a/contrib/re-pacman +++ b/contrib/re-pacman @@ -48,6 +48,8 @@ make_pkginfo () { done } +LANG="POSIX" + if [ $# -ne 1 ]; then echo "usage: re-pacman <installed package name>" exit 1 diff --git a/contrib/vimproject b/contrib/vimproject index 662bf04f..c84b6762 100644 --- a/contrib/vimproject +++ b/contrib/vimproject @@ -24,16 +24,13 @@ pacman=~/devel/pacman-lib CD=. flags=S { handle.c log.c md5.c - md5driver.c package.c provide.c remove.c server.c - sha1.c sync.c trans.c util.c - versioncmp.c add.h alpm.h alpm_list.h @@ -51,11 +48,9 @@ pacman=~/devel/pacman-lib CD=. flags=S { provide.h remove.h server.h - sha1.h sync.h trans.h util.h - versioncmp.h Makefile.am Makefile.in } diff --git a/contrib/zsh_completion b/contrib/zsh_completion index d7e14864..4607bd7e 100644 --- a/contrib/zsh_completion +++ b/contrib/zsh_completion @@ -227,9 +227,9 @@ _pacman_completions_all_packages() { repositories=( $(_call_program repositories cat /etc/pacman.conf | grep "^\[" | sed "s,\(\[\|\]\),,g" | grep -v "^options" | sort -u) ) # these can be specified as either 'package' or 'repository/package' if [[ "$PREFIX" == "" ]] ; then - packages=( $(_call_program packages ls /var/lib/pacman/${^repositories} | grep -v "^/" | sed "s,\-[^-]*\-[^-]*$,," | sort -u) ) + packages=( $(_call_program packages ls /var/lib/pacman/sync/${^repositories} | grep -v "^/" | sed "s,\-[^-]*\-[^-]*$,," | sort -u) ) else - packages=( $(_call_program packages ls /var/lib/pacman/${^repositories} | grep -v "^/" | grep -e \^$PREFIX | sed "s,\-[^-]*\-[^-]*$,," | sort -u) ) + packages=( $(_call_program packages ls /var/lib/pacman/sync/${^repositories} | grep -v "^/" | grep -e \^$PREFIX | sed "s,\-[^-]*\-[^-]*$,," | sort -u) ) fi compadd "$@" -a packages } |