summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1081aeffd598495de22b56d0229d1a60f690787f (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: Joel Ong <joel.hp+arch at gmail dot com>
# Originally written by Nathan Whitehead <nwhitehe at gmail dot com>

_GTK3=1
options=('!buildflags')
_opts=(
	-DCMAKE_INSTALL_PREFIX="${pkgdir}/usr"
)

pkgname='pineapple'

makedepends=('cmake' 'lessc' 'git')
depends=('python')

if (("${_GTK3}" == 0));then
	depends+=('wxgtk2' 'webkitgtk2')
	_opts+=(-DwxWidgets_CONFIG_OPTIONS="--toolkit=gtk2")
else
	_opts+=(-DwxWidgets_CONFIG_OPTIONS="--toolkit=gtk3")
	depends+=('wxgtk3' 'webkit2gtk')
fi

pkgver=0.8.0
pkgrel=2
pkgdesc="wxWidgets frontend for Jupyter Notebook, fork of project abandoned by original author (https://nwhitehead.github.io/pineapple/)"
url="https://github.com/darthoctopus/pineapple/tree/thin-client"
arch=('i686' 'x86_64')
license=('GPL3')

source=("git://github.com/darthoctopus/pineapple.git")

sha256sums=('SKIP')

prepare() {
	cd "${srcdir}/${pkgname}"
	git checkout thin-client
}

pkgver() {
  cd "${srcdir}/${pkgname}"
  git checkout thin-client > /dev/null
  ( set -o pipefail
    git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  cd "${srcdir}/${pkgname}"
  mkdir -p build
  cd build
  cmake .. "${_opts[@]}"
  make
  make custom-install
}

package() {
  cd "${srcdir}/${pkgname}/build"
  make install
}