summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f193d09b50d8db045eff7396859e5627c911ccc5 (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: willemw <willemw12@gmail.com>

_pkgname=3ncode
pkgname=$_pkgname-git
pkgver=r35.30e0440
pkgrel=1
pkgdesc="Graphical video and audio converter for ffmpeg"
arch=('any')
url="https://github.com/llelectronics/3ncode"
license=('BSD')
#kdelibs
depends=('ffmpeg' 'kdebase-runtime' 'python2-pyqt4')
optdepends=('mkvtoolnix-cli: mkv files')
makedepends=('git')
provides=($_pkgname)
conflicts=($_pkgname)
source=(git://github.com/llelectronics/$_pkgname.git
        $_pkgname.sh
        $_pkgname.desktop)
md5sums=('SKIP'
         'a7879368369e806012f0785542370f47'
         'bdf9a12bcd4780479e867e6a5d1f1d34')

pkgver() {
  cd $_pkgname
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd $_pkgname
  sed -i 's|#!/usr/bin/python[ ]*$|#!/usr/bin/python2|' encode.py

  # Fix aac audio
  # 1) Allow 'aac' codec: add '-strict -2' to ffmpeg options
  sed -i 's|\(var[ ]*cmd[ ]*=[ ]*"ffmpeg.*$\)|\1 + " -strict -2"|' qml/encodeItem.qml
  # 2) Rename 'libfaac' codec to 'aac' codec
  sed -i 's|libfaac|aac|g' *.qml qml/*.qml
}

package() {
  install -Dm755 $_pkgname.sh "$pkgdir/usr/bin/$_pkgname"
  install -Dm644 $_pkgname.desktop "$pkgdir/usr/share/applications/$_pkgname.desktop"

  cd $_pkgname
  install -Dm644 qml/img/encode.png "$pkgdir/usr/share/pixmaps/$_pkgname.png"
  install -dm755 "$pkgdir/usr/share/$_pkgname"
  cp -r *.py *.qml qml/ "$pkgdir/usr/share/$_pkgname"
}