summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: addc4b973ccae240c73cf5cde693fa04380ba50f (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
61
62
63
64
65
66
67
# Contributor: 2xsaiko <aur@dblsaiko.net>

_gitname="kde-rounded-corners"
_pkgname="kwin-effect-rounded-corners"
pkgname="$_pkgname-git"
pkgver=0.3.0.r6.g28855e8
pkgrel=1
pkgdesc="Rounds the corners of your windows"
arch=('x86_64')
url="https://github.com/matinlotfali/KDE-Rounded-Corners"
license=("GPL3")
provides=(
  "$_gitname"{,-git}
  "$_pkgname"
  "kwin-effect-shapecorners"{,-git}
)
conflicts=(${provides[@]})
replaces=(
  "$_gitname"{,-git}
  "kwin-effect-shapecorners"{,-git}
)
depends=(
  'kwin'
)
makedepends=(
  'cmake'
  'extra-cmake-modules'
  'git'
  'kinit'
  'qt5-tools'
)

source=(
  "$_gitname"::"git+$url"
)
sha512sums=(
  "SKIP"
)

pkgver() {
  cd "$srcdir/$_gitname"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  mkdir -p qt5build
}

build() {
  cd qt5build
  cmake "../$_gitname" \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -DQT5BUILD=ON
  make
}

package() {
  cd qt5build
  make DESTDIR="$pkgdir" install

  # fix file locations
  mkdir -p "$pkgdir/usr/share/kwin"
  mv "$pkgdir/kwin/shaders" "$pkgdir/usr/share/kwin/"

  mkdir -p "$pkgdir/usr/lib/qt/plugins"
  mv "$pkgdir/kwin" "$pkgdir/usr/lib/qt/plugins/"
}