summaryrefslogtreecommitdiff
path: root/pcr/libav-builder/PKGBUILD
blob: 372243b2a6088eb847dd6dbcfdb56b1d04d51d3f (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
# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>

static=false
pkgbase=libav
if [[ $static == true ]] || [[ $static == 1 ]] || [[ $static == enable ]]; then
  pkgname=libav-static-builder
elif [[ $static == false ]] || [[ $static == 0 ]] || [[ $static == disable ]]; then
  pkgname=libav-builder
fi
pkgflag=builder
pkgver=0.8.4
pkgrel=1
pkgdesc="Link files on /usr/include and /usr/lib dir (ONLY FOR BUILD OTHERS PACKAGES)"
arch=any
url="http://$pkgbase.org/"
license=GPL
depends=${pkgname%-$pkgflag}=$pkgver
conflicts=(
  ffmpeg
  ffmpeg-static
)
if [[ $static == true ]] || [[ $static == 1 ]] || [[ $static == enable ]]; then
  conflicts+=(
    ${pkgname%-static-$pkgflag}
  )
elif [[ $static == false ]] || [[ $static == 0 ]] || [[ $static == disable ]]; then
  conflicts+=(
    ${pkgname%-$pkgflag}-static
  )
fi

package() {
  install -m755 -d $pkgdir/usr/{include,lib{,/pkgconfig}}
  include_list=$(ls /opt/${pkgname%-$pkgflag}/include)
  for i in $include_list; do
    ln -s /opt/${pkgname%-$pkgflag}/include/$i $pkgdir/usr/include
  done
  lib_list=$(ls /opt/${pkgname%-$pkgflag}/lib | grep lib)
  for l in $lib_list; do
    ln -s /opt/${pkgname%-$pkgflag}/lib/$l $pkgdir/usr/lib
  done
  pkgconfig_list=$(ls /opt/${pkgname%-$pkgflag}/lib/pkgconfig)
  for c in $pkgconfig_list; do
    ln -s /opt/${pkgname%-$pkgflag}/lib/pkgconfig/$c $pkgdir/usr/lib/pkgconfig
  done
}

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