diff --git a/which/PKGBUILD b/which/PKGBUILD new file mode 100644 index 00000000..6f45fa1f --- /dev/null +++ b/which/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Alexey Pavlov + +pkgname=which +pkgver=2.20 +pkgrel=1 +pkgdesc="A utility to show the full path of commands" +arch=('i686' 'x86_64') +url="http://www.xs4all.nl/~carlo17/which" +license=('GPL3') +groups=('base') +source=(http://www.xs4all.nl/~carlo17/$pkgname/$pkgname-$pkgver.tar.gz + am-1.14.all.patch) +depends=('msys2-runtime' 'sh') +install=which.install +md5sums=('95be0501a466e515422cde4af46b2744' + '9315cae265dd34eaf7aae9a23ac1840e') + +prepare() { + cd ${srcdir}/${pkgname}-${pkgver} + patch -p1 -i ${srcdir}/am-1.14.all.patch +} + +build() { + [[ -d ${srcdir}/build-${CHOST} ]] && rm -rf ${srcdir}/build-${CHOST} + mkdir ${srcdir}/build-${CHOST} && cd ${srcdir}/build-${CHOST} + + ../${pkgname}-${pkgver}/configure \ + --prefix=/usr \ + --build=${CHOST} \ + --host=${CHOST} \ + --target=${CHOST} + + make +} + +package() { + cd ${srcdir}/build-${CHOST} + make install DESTDIR=${pkgdir} +} diff --git a/which/am-1.14.all.patch b/which/am-1.14.all.patch new file mode 100644 index 00000000..0fc270dd --- /dev/null +++ b/which/am-1.14.all.patch @@ -0,0 +1,17 @@ +--- which-2.20/Makefile.am.orig 2007-10-10 00:11:42.000000000 +0000 ++++ which-2.20/Makefile.am 2013-07-25 11:44:32.103848400 +0000 +@@ -1,5 +1,5 @@ + AUTOMAKE_OPTIONS = no-texinfo.tex +-ACLOCAL_AMFLAGS=@ACLOCAL_CWFLAGS@ ++ACLOCAL_AMFLAGS = @ACLOCAL_CWFLAGS@ + + SUBDIRS = tilde . + +--- which-2.20/tilde/Makefile.am.orig 2008-01-16 17:51:57.000000000 +0000 ++++ which-2.20/tilde/Makefile.am 2013-07-25 11:45:06.456210600 +0000 +@@ -1,4 +1,4 @@ +-ACLOCAL_AMFLAGS=@ACLOCAL_CWFLAGS@ ++ACLOCAL_AMFLAGS = @ACLOCAL_CWFLAGS@ + AUTOMAKE_OPTIONS = foreign + noinst_LIBRARIES = libtilde.a + libtilde_a_SOURCES = tilde.c shell.c tilde.h ansi_stdlib.h bashansi.h xmalloc.h diff --git a/which/which.install b/which/which.install new file mode 100644 index 00000000..e09bbef4 --- /dev/null +++ b/which/which.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(which.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file $infodir/dir 2> /dev/null + done +}