updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / ldm-git / PKGBUILD
blobb2595eba3b48a67f80a305297b400e102bf5d66b
1 # Maintainer: Army <uli armbruster who uses the google mail service>
3 pkgname=ldm-git
4 _pkgname=ldm
5 pkgver=20110908
6 pkgrel=1
7 pkgdesc="A lightweight device mounter"
8 arch=('i686' 'x86_64')
9 url="https://github.com/LemonBoy/ldm"
10 license=(MIT)
11 depends=('udev')
12 makedepends=('git')
13 provides=(${_pkgname})
14 conflicts=(${_pkgname})
16 _gitroot="https://github.com/LemonBoy/ldm.git"
17 _gitname="${_pkgname}"
19 build() {
20         cd "$srcdir"
21         msg "Connecting to GIT server...."
22         
23         if [ -d ${_gitname} ] ; then
24                 cd ${_gitname} && git pull origin
25                 msg "The local files are updated."
26         else
27                 git clone ${_gitroot} ${_gitname}
28         fi
29         msg "GIT checkout done or server timeout"
30         msg "Starting make..."
32         rm -rf "${srcdir}/${_gitname}-build"
33         cp -a "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build"
34         cd "${srcdir}/${_gitname}-build"
36         make
39 package() {
40         install -Dm755 "${srcdir}/${_gitname}-build/${_pkgname}.daemon" "${pkgdir}/etc/rc.d/${_pkgname}"
41         install -Dm755 "${srcdir}/${_gitname}-build/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
42         install -Dm644 "${srcdir}/${_gitname}-build/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"