summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b6ed4fa587ad9c359cb1a474c907a271ce5ad2c1 (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: Greg White <sgwhite-at-kupulau-dot-com>

pkgname=yakuake-copy-paste-git
pkgver=20151201.1
pkgrel=1
pkgdesc="A KDE konsole application with the look and feel of that in the Quake engine - GIT version (patched to use Alt+V for paste/Alt+K to clear scrollback)"
arch=('i686' 'x86_64')
url="http://yakuake.kde.org"
license=('GPL')
depends=('kdebase-konsole')
makedepends=('cmake' 'automoc4' 'git')
install="${pkgname}.install"
provides=('yakuake')
conflicts=('yakuake')

_gitroot="git://anongit.kde.org/yakuake.git"
_gitname="yakuake"

source=('copy_paste.patch')
md5sums=('cc680a2a0493237dc02913eb3b7e1740')


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

  if [ -d ${_gitname}/.git ] ; then
    cd ${_gitname}

    # Change remote url to anongit
    if [ -z $( git branch -v | grep anongit ) ] ; then
        git remote set-url origin ${_gitroot}
    fi
    
    git fetch --all
    git reset --hard origin/master  
    #git pull origin
    msg "The local files are updated."
  else
    git clone ${_gitroot} ${_gitname}
  fi

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

  cd ${srcdir}
  patch -p1 --verbose -i $srcdir/copy_paste.patch 
  mkdir -p build
  cd build
  cmake ../${_gitname} \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_SKIP_RPATH=ON \
    -DCMAKE_INSTALL_PREFIX=/usr
  make
}

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