summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3412bea2e1066d4cf133ae72732cce6864e5b068 (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
55
56
57
58
59
60
# Maintainer: Michael Mansell <michael.mansell@gmail.com>
# Maintainer: Gosha Tugai [SAL9000] <gosha.tugai@gmail.com>
# Contributor: Ross Melin <rdmelin@gmail.com>

# 1.1-2 : Updated autogen.sh.patch to handle newer versions of automake.

pkgname=gimp-plugin-deskew-git
pkgver=1.1
pkgrel=3
pkgdesc="Auto straighten lines of text in scanned documents"
arch=('x86_64')
#(old) url="http://www.cubewano.org/gimp-deskew-plugin/"
url="https://github.com/prokoudine/gimp-deskew-plugin"
license=('GPL')
depends=('gimp')
makedepends=('git')
provides=('gimp-plugin-deskew')
conflicts=('gimp-plugin-deskew')
source=('autogen.patch')
sha256sums=('b64799de98d8089790752d35ad8b1b1c5bc387a725b21cf2bd08589b26258b58')

_gitroot='git://github.com/prokoudine/gimp-deskew-plugin.git'
_gitname='gimp-deskew-plugin'

package() {
  cd "$srcdir"
  msg "Connecting to GIT server...."

  if [[ -d "$_gitname" ]]; then
    cd "$_gitname" && git pull origin
    msg "The local files are updated."
  else
    git clone "$_gitroot" "$_gitname"
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting build..."

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

  #
  # BUILD HERE
  #
  # Of course it's incompatible with newest autoconf >_<
  msg "Patching autogen.sh for autoconf-1.12"
  patch -u -F5 -N autogen.sh ../../autogen.patch
  msg "autogen.sh"
  ./autogen.sh --prefix=/usr
  msg "make"
  make || return 1
  msg "make install"
  make DESTDIR="$pkgdir/" install
  # hack to correct broken make --install
  mv "$pkgdir/usr/usr/lib" "$pkgdir/usr"
  rmdir "$pkgdir/usr/usr"
}