summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b9edf7ccb4fc72020c3f1941aac77922347a0786 (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
# Maintainer: Jonas Heinrich <onny@project-insanity.org>
# Contributor: Jonas Heinrich <onny@project-insanity.org>

_pkgname=chdkptp
pkgname=${_pkgname}-svn
pkgver=r978
pkgrel=2
pkgdesc="chdkptp is a client application for the CHDK"
arch=(x86_64)
url="https://www.assembla.com/spaces/chdkptp"
license=('GPL' 'MIT')
depends=('lua53' 'libusb-compat' 'lua53-lgi')
makedepends=('subversion' 'lua53-lgi')
provides=('chdkptp')
conflicts=('chdkptp')
source=("svn+https://subversion.assembla.com/svn/chdkptp/trunk")
sha512sums=('SKIP')

pkgver() {
  cd "$srcdir/trunk"
  local ver="$(svnversion)"
  printf "r%s" "${ver//[[:alpha:]]}"
}

prepare() {
 cd "$srcdir/trunk"
 sed -i '8iCHDKPTP_DIR=/usr/lib/chdkptp' chdkptp.sh
}

build() {
  cd "$srcdir/trunk"
  make \
  	LUA_LIB=lua5.3 \
	LUA_INCLUDE_DIR=/usr/include/lua5.3 \
	GUI=1 \
	GTK_SUPPORT=1
}

package() {
  cd "$srcdir/trunk"
  install -Dm755 chdkptp $pkgdir/usr/lib/chdkptp/chdkptp
  install -dm644 "$pkgdir/usr/lib/chdkptp/lua/extras"
  install -m644 lua/*.lua "$pkgdir"/usr/lib/chdkptp/lua/
  install -m644 lua/extras/*.lua "$pkgdir"/usr/lib/chdkptp/lua/extras/
  install -Dm755 chdkptp.sh "$pkgdir"/usr/bin/chdkptp
}