summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b9942e53707986274f346f3c6924f4e699517711 (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
# Maintainer: Vladislav Tyulbashev <vtyulb@vtyulb.ru>

pkgname=bsa-analytics-git
pkgbase=bsa-analytics
pkgver=20230512
pkgrel=1
pkgdesc="PRAO BSA telescope data viewer, pulsar searching & analytics software"
arch=('x86_64')
url="https://github.com/vtyulb/BSA-Analytics"
license=('GPL')
depends=('qt5-base')
makedepends=('git')

_gitroot="https://github.com/vtyulb/BSA-Analytics.git"
_gitname="BSA-Analytics"

build() {
  cd $srcdir
  msg "Connecting to the GIT server..."
  if [[ -d $srcdir/$_gitname ]] ; then
    cd $_gitname
    git pull origin
    msg "The local files are updated."
  else
    git clone $_gitroot
  fi

  msg "GIT checkout done"
  msg "Starting make"
  if [[ -d ${srcdir}/BSA-Analytics/build ]]; then
    msg "Cleaning previous build directory..."
    rm -rf ${srcdir}/BSA-Analytics/build
  fi

  mkdir ${srcdir}/BSA-Analytics/build
  cd ${srcdir}/BSA-Analytics/build
  qmake-qt5 ../src
  make -j2
}

package() {
  cd ${srcdir}/BSA-Analytics/build

  mkdir -p $pkgdir/usr/bin
  mkdir -p $pkgdir/usr/share/doc/bsa-analytics

  cp -f BSA-Analytics $pkgdir/usr/bin/bsa-analytics
  cp -f ../docs/HandBook.pdf $pkgdir/usr/share/doc/bsa-analytics/
}