updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / wmiirc-lua-git / PKGBUILD
blobc0dfaa9eae8fec2e037413b2a8e818edfb09a3f0
1 # Contributor: Anthony Martin <ality@pbrane.org>
2 # Contributer: N30N <archlinux@alunamation.com>
4 pkgname="wmiirc-lua-git"
5 pkgver=20090303
6 pkgrel=1
7 pkgdesc="The latest git pull of wmiirc-lua, replacement for the builtin wmii config files"
8 url="http://www.jukie.net/~bart/blog/tag/wmiirc-lua"
9 license=("MIT")
10 arch=("i686" "x86_64")
11 depends=("libx11" "libxinerama" "libxrandr")
12 makedepends=("mercurial" "libixp-hg" "wmii-hg")
13 optdepends=("dmenu: use in the default configs" "slock: simple screen locker")
14 conflicts=("wmiirc-lua")
15 provides=("wmiirc-lua")
16 source=()
17 md5sums=()
19 _gitroot="git://git.jukie.net/wmiirc-lua.git/"
20 _gitname="wmiirc-lua"
22 build() {
23   cd ${srcdir}
25   msg "Connecting to GIT server..."
26   if [[ -d $_gitname ]]; then
27     (cd $_gitname && git pull origin)
28   else
29     git clone $_gitroot $_gitname
30   fi
31   msg "GIT checkout done or server timeout"
33   rm -rf $_gitname-build
34   cp -r $_gitname $_gitname-build
35   cd $_gitname-build
37   msg "Starting make..."
38   rm -rf config.mk
39   # add correct settings to config.mk
40   sed -e "s|^\(\s*PREFIX\s*=\).*|\1 /usr|" \
41       -e "s|^\(\s*HOME_WMII\s*=\).*|\1 ~/.wmii-lua|" \
42       -e "s|^\(\s*LUA_PKG_NAME\s*=\).*|\1 lua|" \
43       -e "s|^\(\s*RC_DIR\s*=\).*|\1 \${DESTDIR}/etc/wmii-lua|" \
44       -e "s|^\(\s*CFLAGS +=.*\)|\1 ${CFLAGS}|" \
45       -e "s|^\(\s*LDFLAGS +=.*\)|\1 ${LDFLAGS}|" \
46       -i config.mk.dist
48   for cf in "wmii-lua" \
49           "install-wmiirc-lua" \
50           "wmiirc.lua" \
51           "core/wmii.lua" \
52           "doc/bundled-plugins" \
53           "doc/configuration" \
54           "doc/dir-structure"
55   do
56           msg "Cleaning: $cf"
57           sed -e "s|/etc/X11/wmii-...|/etc/wmii-lua/|" \
58                   -e "s|\.wmii-...|.wmii-lua|" \
59                   -i $cf
60   done
62   msg "Starting build process."
63   make || return 1
64   make DESTDIR=${pkgdir} install