summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 243bef805dc71c4cc1c75d8de3f0dfc8b5e0a576 (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
# Maintainer: Patrick josé Pereira  <gmail.com@patrickelectric>
pkgname=qhot-git
_realname=qhot
confilicts=('qhot')
pkgver=d8be17e
pkgrel=1
pkgdesc="Hot reload for nested QML files!"
arch=('i686' 'x86_64')
url="https://github.com/patrickelectric/qhot"
license=('GPL3')
buildDepends=('git')
depends=(
  'qt5-base'
  'qt5-declarative'
  'qt5-3d'
  'qt5-charts'
  'qt5-graphicaleffects'
  'qt5-imageformats'
  'qt5-location'
  'qt5-multimedia'
  'qt5-quickcontrols'
  'qt5-quickcontrols2'
  'qt5-svg'
  'qt5-tools'
  'qt5-translations'
  'qt5-webengine'
  'qt5-websockets'
  'qt5-webglplugin'
)
source=('git://github.com/patrickelectric/qhot.git')
md5sums=(SKIP)

pkgver() {
  cd $_realname
  git log --pretty=format:'%h' -n 1
}

build() {
  cd $_realname
  mkdir "build" || true
  cd "build"
  qmake ..
  make PREFIX=/usr

  	echo "[Desktop Entry]
Type=Application
Name=QHot
Comment=${pkgdesc}
Path=/opt/${pkgname}/
Exec=/usr/bin/$_realname
Terminal=true
Categories=Qt;Utility;" > "$_realname.desktop"
}

package(){
  cd $_realname
  cd "build"


  mkdir -p "${pkgdir}/opt/" "${pkgdir}/usr/bin" "${pkgdir}/usr/share/applications"
  cp $_realname "${pkgdir}/usr/bin/$_realname"
  cp "$_realname.desktop" "${pkgdir}/opt/${pkgname}"

  ln -s "/opt/${pkgname}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
}