Skip to content

Instantly share code, notes, and snippets.

@kolewu
Last active December 11, 2015 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kolewu/4614862 to your computer and use it in GitHub Desktop.
Save kolewu/4614862 to your computer and use it in GitHub Desktop.
This is a PKGBUILD script to create a tdom package that is compatible with tcl 8.6 (see https://aur.archlinux.org/packages/tdom/)
# Maintainer: Uwe Koloska <kolewu@koloro.de>
# Contributor: Dejan Cabrilo <dcabrilo@bitspan.rs>
pkgname=tdom-git
pkgver=20130121
pkgrel=1
pkgdesc="A fast XML/DOM/XPath package for Tcl written in C"
arch=('i686' 'x86_64')
url="http://tdom.github.com/"
license=('MPL')
groups=('devel')
depends=('expat' 'tcl')
makedepends=('git')
conflicts=('tdom')
provides=('tdom')
_gitroot=https://github.com/tDOM/tdom.git
_gitname="tdom"
build() {
cd "${srcdir}"
msg "Connecting to GIT server..."
if [[ -d "${_gitname}" ]]; then
cd "${_gitname}" && git pull origin
msg "The local files are updated."
else
git clone --depth=1 "${_gitroot}" "${_gitname}"
fi
msg "GIT checkout done or server timeout"
msg "Starting make..."
cd "${srcdir}"
rm -rf "${_gitname}-build"
git clone "${_gitname}" "${_gitname}-build"
cd "${srcdir}/${_gitname}-build"
if [ $CARCH = "x86_64" ] ; then
./configure --prefix=/usr --enable-64bit --mandir=/usr/share/man
else
./configure --prefix=/usr --mandir=/usr/share/man
fi
make
}
package() {
make -C "${srcdir}/$_gitname-build" DESTDIR="$pkgdir/" install
}
@kolewu
Copy link
Author

kolewu commented Jan 30, 2013

incorporate the changes suggested by Daniel Wallace (but leaving the subshell around 'git pull')

@kolewu
Copy link
Author

kolewu commented Jan 30, 2013

update with changes suggested by Limao Luo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment