diff options
author | Daniel Bermond | 2018-08-17 22:19:19 +0000 |
---|---|---|
committer | Daniel Bermond | 2018-08-17 22:21:27 +0000 |
commit | 7639af6d0234e7c984c9a6c6ed2ce764a5b7d259 (patch) | |
tree | 0d9b2681cf41b7ec55a2c4bd488ced609b7b81b0 | |
download | aur-7639af6d0234e7c984c9a6c6ed2ce764a5b7d259.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 91 |
2 files changed, 120 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..649d73f7de5b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +pkgbase = x264-noffmpeg + pkgdesc = Open Source H264/AVC video encoder (no ffmpeg dependency) + pkgver = 155.r2917.g0a84d986 + pkgrel = 1 + url = https://www.videolan.org/developers/x264.html + arch = i686 + arch = x86_64 + license = GPL + makedepends = git + makedepends = nasm + makedepends = l-smash + depends = liblsmash.so + provides = x264 + provides = libx264 + provides = libx264.so + conflicts = x264 + conflicts = x264-git + conflicts = x264-noffmpeg-git + conflicts = libx264 + conflicts = libx264-10bit + conflicts = libx264-all + conflicts = libx264-git + conflicts = libx264-10bit-git + conflicts = libx264-all-git + source = x264-noffmpeg::git+https://git.videolan.org/git/x264.git#commit=0a84d986e7020f8344f00752e3600b9769cc1e85 + sha256sums = SKIP + +pkgname = x264-noffmpeg + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..cec8c532f9e4 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,91 @@ +# Maintainer : Daniel Bermond < yahoo-com: danielbermond > + +# NOTE: +# This package provides both 8 and 10-bit support in a single package. +# x264 from the [extra] official repository is currently 8-bit only. +# When used "normally", this package is just like x264 from [extra] +# in terms of bith depth, acting as 8-bit. For explanation and +# comparison about 8-bit and 10-bit, please see, e.g.: +# https://gist.github.com/l4n9th4n9/4459997 + +_commit='0a84d986e7020f8344f00752e3600b9769cc1e85' + +pkgname=x264-noffmpeg +pkgver=155.r2917.g0a84d986 +pkgrel=1 +arch=('i686' 'x86_64') +pkgdesc='Open Source H264/AVC video encoder (no ffmpeg dependency)' +url='https://www.videolan.org/developers/x264.html' +license=('GPL') +depends=('liblsmash.so') +makedepends=('git' 'nasm' 'l-smash') +provides=('x264' 'libx264' 'libx264.so') +conflicts=('x264' 'x264-git' 'x264-noffmpeg-git' 'libx264' 'libx264-10bit' + 'libx264-all' 'libx264-git' 'libx264-10bit-git' 'libx264-all-git') +source=("$pkgname"::"git+https://git.videolan.org/git/x264.git#commit=${_commit}") +sha256sums=('SKIP') + +pkgver() { + cd "$pkgname" + + local _version + local _revision + local _shorthash + + _version="$(grep '#define X264_BUILD' x264.h | awk '{ print $3 }')" + _revision="$( git rev-list --count HEAD)" + _shorthash="$(git rev-parse --short HEAD)" + + printf '%s.r%s.g%s' "$_version" "$_revision" "$_shorthash" +} + +build() { + mkdir -p "$pkgname"/build-{8,10}bit + + msg2 'Building for 8-bit...' + cd "${pkgname}/build-8bit" + ../configure \ + --prefix='/usr' \ + --enable-shared \ + --bit-depth='8' \ + --enable-lto \ + --enable-pic \ + --disable-swscale \ + --disable-lavf \ + --disable-ffms \ + --disable-gpac + make + + msg2 'Building for 10-bit...' + cd ../build-10bit + ../configure \ + --prefix='/usr' \ + --libdir='/usr/lib/x264-10bit' \ + --includedir='/usr/include/x264-10bit' \ + --enable-shared \ + --bit-depth='10' \ + --enable-lto \ + --enable-pic \ + --disable-swscale \ + --disable-lavf \ + --disable-ffms \ + --disable-gpac + make +} + +package() { + cd "$pkgname" + + local _depth + + for _depth in 10 8 + do + msg2 "Installing for ${_depth}-bit..." + make -C "build-${_depth}bit" DESTDIR="$pkgdir" install-cli install-lib-shared + + if [ "$_depth" -eq '10' ] + then + mv "${pkgdir}/usr/bin/x264" "${pkgdir}/usr/bin/x264-${_depth}bit" + fi + done +} |