updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / lpms / PKGBUILD
blobc9b3af58ef2b5c40563713252f9101e19d717795
1 pkgname=lpms
2 pkgver=20111218
3 pkgrel=1
4 pkgdesc="Package Management System of Hadron GNU/Linux. Don't use it instead of Arch's 'pacman'. For building rootfs."
5 arch=('i686')
6 url='http://hadronproject.org/'
7 license=('GPL')
8 makedepends=('git')
9 depends=('fermion' 'python-magic' 'flex' 'bison' 'autoconf' 'automake' 'makedepend' 'make' 'gcc')
10 backup=('etc/lpms/lpms.conf' 'etc/lpms/repo.conf' 'etc/lpms/build.conf' 'etc/lpms/sandbox.conf')
12 _gitroot="git://gitorious.org/hadron/lpms.git"
13 _gitname="lpms"
15 build() {
16   cd "$srcdir"
17   msg "Connecting to GIT server...."
19   if [ -d $_gitname ] ; then
20     cd $_gitname && git pull origin
21     msg "The local files are updated."
22   else
23     git clone $_gitroot $_gitname
24   fi
26   msg "GIT checkout done or server timeout"
28   rm -rf "$srcdir/$_gitname-build"
29   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
33 package() {
34   cd "$srcdir/$_gitname-build"
35   sed -i 's/python/python2/' bin/lpms
36   sed -i 's/magic.MIME_TYPE/magic.MAGIC_MIME/' src/utils.py
37   mkdir -p $pkgdir/usr/lib/python2.7/site-packages/lpms
38   mkdir -p $pkgdir/usr/bin
39   mkdir -p $pkgdir/var/tmp/lpms
40   mkdir -p $pkgdir/var/cache/lpms/sources
41   mkdir -p $pkgdir/etc/lpms
42   mkdir -p $pkgdir/var/db/lpms
43   mkdir -p $pkgdir/var/lib/lpms/
44   
45   cp -a src/* $pkgdir/usr/lib/python2.7/site-packages/lpms/
46   cp data/* $pkgdir/etc/lpms
47   cp bin/* $pkgdir/usr/bin/