summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0fdd61189590ffb52fe37735f64e17b0ea99bd3f (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
# Maintainer: pikl <me@pikl.uk>
# Contributor: Markus Hartung <mail@hartmark.se>
# Contributor: Kevin Lewis <aur AT kevin DOT oakaged DOT io>
# Contributor: Jason Lenz <Jason@Lenzplace.org>
_pkgname=oscar
pkgname=oscar
pkgver=1.5.2
pkgrel=1
pkgdesc="Open-source, cross platform, sleep tracking software with a focus on monitoring CPAP treatment. Fork of the sleepyhead project."
arch=('i686' 'x86_64')
url="https://gitlab.com/pholy/OSCAR-code"
license=('GPL-3.0-only')
depends=(
  'qt5-tools'
  'qt5-serialport'
)
optdepends=(
  'qt5-wayland'
)
makedepends=(
  'git'
  'glu'
)
provides=("$_pkgname")
source=(
  "${pkgname}-${pkgver}.tar.gz::https://gitlab.com/pholy/OSCAR-code/-/archive/${pkgver}/OSCAR-code-${pkgver}.tar.gz"
  'oscar.desktop'
  'odr-fix.patch'
)
sha256sums=('390c8524166e6b1a2858a87da12853d0584dc666d8b09cec4bf3532f28cf5a32'
            '6b2f735622f218e2ac5ef61475886fadfeeedd5f15b04fa0d54451162ee394ad'
            '5a887520f92ffde54835adf5507c6f8a93a54561866d07573d2a80bcaf8f3691')

prepare() {
  cd "${srcdir}/OSCAR-code-${pkgver}"
  git apply ../odr-fix.patch
}

build() {
  cd "${srcdir}/OSCAR-code-${pkgver}"
  qmake OSCAR_QT.pro
  make -j$(cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l)
}

package() {
  cd "${srcdir}/OSCAR-code-${pkgver}"
  install -Dm755 oscar/OSCAR "$pkgdir/usr/bin/oscar"
  install -Dm644 oscar/icons/logo-lg.png "$pkgdir/usr/share/oscar/icon.png"
  install -Dm644 ../oscar.desktop "$pkgdir/usr/share/applications/oscar.desktop"
  cp -dpr --no-preserve=ownership oscar/Html "$pkgdir/usr/share/oscar"
  cp -dpr --no-preserve=ownership oscar/Translations "$pkgdir/usr/share/oscar"
}