summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ec05d4835ceaadb1ca4a78de354474e7fab0f8a0 (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
# Maintainer: Jack L. Frost <fbt@fleshless.org>
# vim: expandtab sts=2
# Contributor: Corelli <corelli AT sent DOT com>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: intelfx <intelfx100 [at] gmail [dot] com>
# Contributor: Behem0th <grantipak@gmail.com> 

pkgname=freshplayerplugin-git
pkgver=v0.3.1.r2.gb100b9c
pkgrel=1
pkgdesc='PPAPI-host NPAPI-plugin adapter.'
arch=( 'i686' 'x86_64' )
url='https://github.com/i-rinat/freshplayerplugin'
license=( 'MIT' )
depends=( 'pango' 'alsa-lib' 'freetype2' 'libconfig' 'libevent' 'gtk2' 'libgl' 'v4l-utils' 'ffmpeg' )
makedepends=( 'cmake' 'ragel' 'git' )
conflicts=( 'freshplayerplugin' )
source=( "${pkgname}::git+${url}" "${pkgname}.install" )
install="${pkgname}.install"

optdepends=(
  'chromium-pepper-flash: for the necessary Pepper plugin'
  'chromium-pepper-flash-standalone: for the necessary Pepper plugin'
  'google-chrome: for the necessary Pepper plugin'
  'google-chrome-beta: for the necessary Pepper plugin'
  'google-chrome-dev: for the necessary Pepper plugin'
)

pkgver() {
	cd "$pkgname"

	if git_version=$( git describe --long --tags 2>/dev/null ); then
		IFS='-' read last_tag tag_rev commit <<< "$git_version"
		printf '%s.r%s.%s' "$last_tag" "$tag_rev" "$commit"
	else
		printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
	fi
}

build() {
  cd "$pkgname"
  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
  make
}

package() {
  cd "$pkgname"
  install -d "${pkgdir}/usr/lib/mozilla/plugins"
  install -m644 libfreshwrapper-*.so "${pkgdir}/usr/lib/mozilla/plugins"
  install -Dm644 data/freshwrapper.conf.example "${pkgdir}/usr/share/${pkgname}/freshwrapper.conf.example"
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

sha1sums=('SKIP'
          '331a3b3877249eaf1c3db917bde1dea6c4d374ab')