Advertisement
Guest User

Untitled

a guest
Aug 17th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.13 KB | None | 0 0
  1. pkgname=('lib32-x264')
  2. _pkgbase=('x264')
  3. pkgver=155.r0a84d986e702
  4. pkgrel=1
  5. arch=('x86_64')
  6. url='https://www.videolan.org/developers/x264.html'
  7. license=('GPL')
  8. depends=('lib32-glibc' 'libx264')
  9. makedepends=('git' 'l-smash' 'nasm')
  10. pkgdesc='Library for encoding H264/AVC video streams (lib32)'
  11. provides=('lib32-libx264' 'libx264.so')
  12. conflicts=('lib32-libx264' 'lib32-libx264-10bit' 'libx264-all')
  13. replaces=('lib32-libx264' 'lib32-libx264-10bit' 'lib32-libx264-all')
  14. _commit='0a84d986e7020f8344f00752e3600b9769cc1e85'
  15. source=("git+https://git.videolan.org/git/x264.git#commit=${_commit}")
  16. sha256sums=('SKIP')
  17.  
  18. pkgver() {
  19.     cd ${_pkgbase}
  20.  
  21.     local _ver=$(grep '#define X264_BUILD' x264.h | cut -d' ' -f3)
  22.     local _rev=$(git rev-parse --short HEAD)
  23.  
  24.     echo ${_ver}.r${_rev}
  25. }
  26.  
  27. prepare() {
  28.     if [[ -d build ]]; then
  29.         rm -rf build
  30.     fi
  31.     mkdir build
  32. }
  33.  
  34. build() {
  35.     cd build
  36.     ../x264/configure \
  37.     --prefix='/usr' \
  38.     --enable-shared \
  39.     --enable-pic \
  40.     --enable-lto \
  41.     --libdir=/usr/lib32 \
  42.     --host=i686-linux-gnu
  43.     make
  44. }
  45.  
  46. package() {
  47.     make -C build DESTDIR=${pkgdir} install-lib-shared
  48.   rm -rf "${pkgdir}"/usr/include
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement