summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8def96fa576748096c9ba6ffa98c32270905ab11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Based on the following version of extra/libmtp:
# $Id: PKGBUILD 155745 2012-04-06 00:05:58Z tomegun $
#
# Contributor: damir <damir@archlinux.org>
# Contributor: Kevin Edmonds <edmondskevin@hotmail.com>
# Contributor: John Karahalis <john.karahalis@gmail.com>
#
# GitHub repository: https://github.com/openjck/libmtp-git
#
# Changed to philipl's git: Lubosz Sarnecki <lubosz@gmail.com>


pkgname=libmtp-gvfs-git
pkgver=20120910
pkgrel=1
pkgdesc="Library implementation of the Media Transfer Protocol"
arch=("i686" "x86_64")
url="http://libmtp.sourceforge.net"
license=('LGPL')
depends=('libusb')
options=('!libtool')
conflicts=('libmtp' 'libmtp-git')
provides=('libmtp')

#_gitroot="git://libmtp.git.sourceforge.net/gitroot/libmtp/libmtp"
_gitroot="git://github.com/philipl/libmtp.git"
_gitname="libmtp"

build() {
  cd "${srcdir}"
  msg "Connecting to Git server...."

  if [ -d $_gitname ]; then
    cd $_gitname && git pull origin
  else
    git clone $_gitroot $_gitname
  fi

  msg "Git checkout done or server timeout"
  msg "Starting make..."

  rm -rf "${srcdir}/${_gitname}-build"
  git clone "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build"
  cd "${srcdir}/${_gitname}-build"

  yes | ./autogen.sh
  ./configure --prefix=/usr --with-udev=/usr/lib/udev
  make
}

package() {
  cd "${srcdir}/${_gitname}-build"
  make DESTDIR="${pkgdir}" install
}