summaryrefslogtreecommitdiff
path: root/pcr/libav/PKGBUILD
blob: 4b92e0118f961be014ec61a69b808e680d02ba48 (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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Maintainer: Márcio Silva <coadde@lavabit.com>

_static=false # will be droped

_pkgname=libav
pkgname=$_pkgname
[[ $_static == true ]] && pkgname=$_pkgname-static
pkgver=9.8
pkgrel=2
pkgdesc="Complete and free Internet live audio and video broadcasting solution for GNU/Linux"
[[ $_static == true ]] && pkgdesc="Complete and free Internet live audio and video broadcasting solution for GNU/Linux, with static library"
arch=(
  mips64el
  x86_64
  i686
)
url=http://$_pkgname.org/
license=GPL3
depends=(
  alsa-lib
  bzip2
  freetype2
  gsm
  lame
  libpulse
  libtheora
  libva
  libvorbis
  libvpx
  opencore-amr
  #openjpeg
  opus
  rtmpdump
  schroedinger
  sdl
  speex
  x264
  xvidcore
  zlib
)
makedepends=(
  yasm
  libvdpau
)
source=http://$_pkgname.org/releases/$_pkgname-$pkgver.tar.gz
sha512sums=ef7c164fb29d365a236ead927e6355ca9191203dce86f0d0d8251f275ed5be4ab5e3f56a0c51384d7b9e83c3c3ef7ebdee95c9a7ac7b6520eaf25973a2bd20ae

build() {
  cd $_pkgname-$pkgver
  if [[ $CARCH == x86_64 ]]; then
    _asm='--disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-vis --disable-altivec\
          --enable-amd3dnow --enable-mmx --enable-mmxext --enable-amd3dnow --enable-amd3dnowext --enable-sse --enable-sse2 --enable-sse3\
          --enable-avx --enable-fma4 --enable-sse3 --enable-ssse3 --enable-sse4 --enable-sse42'
  elif [[ $CARCH == i686 ]]; then
    _asm='--disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-vis --disable-altivec\
          --enable-amd3dnow --enable-mmx --enable-mmxext --enable-amd3dnow --enable-amd3dnowext --enable-sse --enable-sse2 --enable-sse3\
          --disable-avx --disable-fma4 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42'
  else
    _asm='--disable-asm'
  fi
  [[ $_static == false ]] && _stf='--disable-static'
  ./configure\
    $_asm $_stf\
    --prefix=/usr\
    --incdir=/usr/include/$pkgname\
    --libdir=/usr/lib/$pkgname\
    --shlibdir=/usr/lib/$pkgname\
    --disable-avserver\
    --disable-debug\
    --enable-avresample\
    --enable-dxva2\
    --enable-gpl\
    --enable-libfreetype\
    --enable-libgsm\
    --enable-libmp3lame\
    --enable-libopencore_amrnb\
    --enable-libopencore_amrwb\
    --disable-libopenjpeg\
    --enable-libopus\
    --enable-libpulse\
    --enable-librtmp\
    --enable-libschroedinger\
    --enable-libspeex\
    --enable-libtheora\
    --enable-libvorbis\
    --enable-libvpx\
    --enable-libx264\
    --enable-libxvid\
    --enable-pic\
    --enable-runtime-cpudetect\
    --enable-shared\
    --enable-vdpau\
    --enable-version3\
    --enable-x11grab
  make
  make tools/qt-faststart
  make doc/av{conv,play}.1 # doc/avserver.1
}

package() {
  cd $_pkgname-$pkgver

  make DESTDIR=$pkgdir install install-man
  install -dDm755 tools/qt-faststart $pkgdir/usr/bin/qt-faststart-$_pkgname

  install -vd $pkgdir/etc/ld.so.conf.d
  echo /usr/lib/$pkgname > $pkgdir/etc/ld.so.conf.d/$pkgname.conf
}

# vim:set ts=2 sw=2 et: