Last active
December 11, 2015 14:29
-
-
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/)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Uwe Koloska <[email protected]> | |
# Contributor: Dejan Cabrilo <[email protected]> | |
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 | |
} |
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
incorporate the changes suggested by Daniel Wallace (but leaving the subshell around 'git pull')