summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d46fb34b1d92c320975c23496e4df32b5b6bdf4c (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
# Maintainer: Alex Wiggins <alex.d.wiggins at gmail . com>

_pkgname=penguin-subtitle-player
pkgname=${_pkgname}-git
pkgver=v1.4.0.r7.822f34e
pkgrel=1
pkgdesc="An open-source, cross-platform standalone subtitle player"
arch=('i686' 'x86_64')
url="https://github.com/carsonip/Penguin-Subtitle-Player/"
license=('GPL3')
depends=('qt5-base' 'libxkbcommon-x11' 'libsm') # qt5 and xcb plugin
makedepends=('git' 'qt5-base') # git and qmake-qt5
provides=("${_pkgname}=${pkgver}")
conflicts=("${_pkgname}" "${pkgname}")
source=("${pkgname}::git+https://github.com/carsonip/Penguin-Subtitle-Player.git")
sha512sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname}"

	# automatically update version from git
	printf "%s" "$(git describe --tags --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')" # Git, tags available
}

build() {
	cd "$srcdir/${pkgname}"
	
	# required for uchardet git submodule
	git submodule update --init --recursive

	# build using Qt Creator project file
	qmake-qt5 "PenguinSubtitlePlayer.pro"
	make
}

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

	# copy binary executable to package output for install by pacman
	install -D -m 755 "PenguinSubtitlePlayer" "$pkgdir/usr/bin/PenguinSubtitlePlayer"
}