updated on Wed Jan 18 04:00:29 UTC 2012
[aur-mirror.git] / dmenu-hg-xdg / PKGBUILD
blobee3e60b3e2264405986fceada249dca22dbf97e2
1 # Contributor: Jon Raphaelson <jonraphaelson@gmail.com>
3 pkgname='dmenu-hg-xdg'
4 pkgver=384
5 pkgrel=1
6 pkgdesc="The latest hg pull of dmenu, with a patch to put cache files in XDG cache directories."
7 url="http://tools.suckless.org/dmenu/"
8 license='MIT'
9 arch=('i686' 'x86_64')
10 depends=('libx11' 'libxdg-basedir')
11 makedepends=('mercurial')
12 conflicts=('dmenu')
13 provides=('dmenu')
14 source=('xdgbasedir.patch')
15 md5sums=('627bf53074ece557ab074b8781031b6a')
17 _hgroot='http://hg.suckless.org/'
18 _hgrepo='dmenu'
20 build() {
21   cd $srcdir
22   msg "Connecting to Mercurial server...."
24   if [ -d $_hgrepo ] ; then
25     cd $_hgrepo
26     hg pull -u || return 1
27     msg "The local files are updated."
28   else
29     hg clone $_hgroot $_hgrepo || return 1
30   fi
32   msg "Mercurial checkout done or server timeout"
34   rm -rf "$srcdir/$_hgrepo-build"
35   cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
36   cd "$srcdir/$_hgrepo-build"
38   msg "Patching for XDG Base Directories"
39   patch -p1 < ../../xdgbasedir.patch
41   #
42   # BUILD HERE
43   #
45   msg "Starting make..."
46   make || return 1
49 package(){
50   cd "$srcdir/$_hgrepo-build"
51   install -Dm644 ${srcdir}/${_hgrepo-build}/LICENSE "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
52   make MANPREFIX="$pkgdir/usr/share/man" PREFIX="$pkgdir" clean install || return 1
55 # vim:set ts=2 sw=2 et: