summaryrefslogtreecommitdiff
path: root/libre/avidemux/PKGBUILD
blob: 68bb802bd5ca1fc178688e4fd9c20dc75d67238e (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Maintainer (Arch): Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer (Arch): Eric Bélanger <eric@archlinux.org>
# Maintainer: Andreas Grapentin <andreas@grapentin.org>
# Contributor: André Silva <emulatorman@hyperbola.info>

# parabola changes and rationale:
#  - removed faac support

pkgbase=avidemux
pkgname=('avidemux-cli' 'avidemux-qt')
pkgver=2.7.1
pkgrel=6
pkgrel+=.parabola1
pkgdesc='Graphical tool to edit video (filter/re-encode/split)'
pkgdesc+=', without nonfree faac support'
url='http://fixounet.free.fr/avidemux/'
arch=('x86_64')
arch+=('i686' 'armv7h')
license=('GPL2')
makedepends=('cmake' 'libxslt' 'qt5-base' 'jack' 'libvorbis' 'libxv' 'opus' 'desktop-file-utils'
             'alsa-lib' 'lame' 'xvidcore' 'faad2' 'x264' 'x265' 'libsamplerate'
             'opencore-amr' 'yasm' 'mesa' 'libvpx' 'libpulse' 'libva' 'intltool' 'sqlite'
             'libvdpau' 'libdca' 'fribidi' 'glu' 'qt5-tools' 'twolame' 'libfdk-aac' 'libass')
options=('!emptydirs')
source=(https://downloads.sourceforge.net/avidemux/avidemux_${pkgver}.tar.gz)
sha256sums=('3ccd784a329c8957c6741923549fdfb70f3b96d087aeb514f3d52e1cd281e995')
sha512sums=('85a690a36cad827f176818d6f566d897b4e46b2a272c8fb18bd64672d92f106d2706ac214b3e3ac3a836c5c98f81f7d5feca1229c3f3f2152ab715a3565008be')

prepare() {
  cd ${pkgbase}_${pkgver}
  sed -i 's|../avidemux/qt4|../avidemux/qt4 -DLRELEASE_EXECUTABLE=/usr/bin/lrelease-qt5|' bootStrap.bash
  sed -e 's|0.19|1.0|' -i avidemux_plugins/ADM_videoFilters6/ass/CMakeLists.txt
  cp avidemux2.desktop avidemux-qt.desktop
  sed -ri 's|(Name=).*|\1avidemux (Qt)|' avidemux-qt.desktop
  sed -ri 's|(Exec=).*|\1avidemux3_qt5|' avidemux-qt.desktop

  # https://sourceforge.net/p/avidemux/bugs/77/
  sed -e 's|pow10f|exp10f|g' -i avidemux/common/ADM_audioFilter/src/audiofilter_normalize.cpp
}

build() {
  cd ${pkgbase}_${pkgver}
  bash bootStrap.bash --with-core --with-cli --with-plugins
}

package_avidemux-cli() {
  depends=('libxml2' 'fontconfig' 'sqlite' 'libvpx' 'libva' 'libvdpau')
  optdepends=('lame: for the corresponding audio encoder plugin'
              'faad2: for the corresponding audio decoder plugin'
              'opus: for the corresponding audio decoder plugin'
              'opencore-amr: for the corresponding audio decoder plugin'
              'jack: for the corresponding audio device plugin'
              'libpulse: for the corresponding audio device plugin'
              'x264: for the corresponding video encoder plugin'
              'libx264: for the corresponding video encoder plugin'
              'x265: for the corresponding video encoder plugin'
              'xvidcore: for the corresponding video encoder plugin'
              'qt5-base: for the QtScript scripting support'
              'libdca: for the corresponding audio decoder plugin'
              'twolame: for the corresponding audio decoder plugin'
              'libass: for the corresponding video filter plugin'
              'fribidi: for the corresponding video filter plugin')

  cd ${pkgbase}_${pkgver}
  make -C buildCli DESTDIR="${pkgdir}" install
  make -C buildCore DESTDIR="${pkgdir}" install
  make -C buildPluginsCLI DESTDIR="${pkgdir}" install
  make -C buildPluginsCommon DESTDIR="${pkgdir}" install

  install -Dm 644 avidemux_icon.png "${pkgdir}/usr/share/pixmaps/avidemux.png"
  install -Dm 644 man/avidemux.1 -t "${pkgdir}/usr/share/man/man1"
}

package_avidemux-qt() {
  pkgdesc='Graphical tool to edit video (filter/re-encode/split) - Qt GUI'
  pkgdesc+=', without nonfree faac support'
  depends=("avidemux-cli=${pkgver}" 'qt5-base' 'x264' 'x265' 'glu' 'libxv' 'desktop-file-utils')
  replaces=('avidemux-gtk')

  cd ${pkgbase}_${pkgver}
  make -C buildQt5 DESTDIR="${pkgdir}" install
  make -C buildPluginsQt5 DESTDIR="${pkgdir}" install
  install -Dm 644 avidemux-qt.desktop -t "${pkgdir}/usr/share/applications"
}

# vim: ts=2 sw=2 et: