summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDet2017-02-04 20:54:43 +0200
committerDet2017-02-04 20:54:43 +0200
commitb07957dc7c78392d80bd86e15a935c715df4b7a7 (patch)
tree0d832bf302443ca2b7c659bb9f967f0a2ae5f596
parent705aeddabada94aeae753c200d5a1faced409142 (diff)
downloadaur-b07957dc7c78392d80bd86e15a935c715df4b7a7.tar.gz
Sync syntax with extra/x264
-rw-r--r--PKGBUILD67
1 files changed, 38 insertions, 29 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 284b47f0db7..99edc1c0a36 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,6 +3,7 @@
# Contributor: DrZaius <lou[at]fakeoutdoorsman.com>
# Contributor: zhuqin <zhuqin83[at]gmail>
# Contributor: pressh <pressh[at]gmail>
+# Based on extra/x264's trunk: https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/x264
# Build 10-bit x264 instead of 8-bit? (Better quality, but slower.)
# For comparison, see, e.g.: https://gist.github.com/l4n9th4n9/4459997
@@ -14,69 +15,75 @@ _10bit=0 # "1" to enable. (This will be auto-detected afterwards.)
_8bit=0
pkgname=('x264-git' 'libx264-git' 'libx264-10bit-git')
-_gitname=x264
+_pkgname=x264
pkgver=148.20151011.r2638
pkgrel=1
arch=('i686' 'x86_64')
-url="http://www.videolan.org/developers/x264.html"
+url='http://www.videolan.org/developers/x264.html'
license=('GPL')
depends=('glibc')
makedepends=('yasm' 'git' 'ffmpeg' 'l-smash')
-source=('git://git.videolan.org/x264.git')
-md5sums=('SKIP')
+source=("git://git.videolan.org/x264.git")
+sha256sums=('SKIP')
# Use the 10-bit version?
-if [[ $_10bit = 1 ]] || ([[ $_8bit != 1 ]] && pacman -Q libx264-10bit-git &>/dev/null); then
+if [[ ${_10bit} = 1 ]] || ([[ ${_8bit} != 1 ]] && pacman -Q libx264-10bit-git &>/dev/null); then
pkgname=('x264-git' 'libx264-10bit-git')
_10bit=1
-elif [[ $_8bit = 1 ]] || pacman -Q libx264-git &>/dev/null; then
+elif [[ ${_8bit} = 1 ]] || pacman -Q libx264-git &>/dev/null; then
pkgname=('x264-git' 'libx264-git')
fi
pkgver() {
- cd $_gitname
+ cd ${_pkgname}
_ver=$(grep '#define X264_BUILD' x264.h | cut -d' ' -f3)
_date=$(git log -1 --format="%cd" --date=short | tr -d -)
_commits=$(git rev-list --count HEAD)
- echo $_ver.$_date.r$_commits
+ echo ${_ver}.${_date}.r${_commits}
}
prepare() {
- rm -rf $_gitname-10bit
- cp -r $_gitname $_gitname-10bit
+ rm -rf ${_pkgname}-10bit
+
+ cp -r ${_pkgname} ${_pkgname}-10bit
}
build() {
- cd $_gitname
+ cd ${_pkgname}
msg2 "Configuring x264..."
- ./configure --prefix=/usr \
- --enable-shared --enable-pic
-
+ ./configure \
+ --prefix='/usr' \
+ --enable-shared \
+ --enable-pic
+
msg2 "Making x264..."
make
-
- cd ../$_gitname-10bit
-
+
+ cd ../${_pkgname}-10bit
+
msg2 "Configuring x264 (10-bit)..."
- ./configure --prefix=/usr \
- --enable-shared --enable-pic \
- --bit-depth=10
-
+ ./configure \
+ --prefix='/usr' \
+ --enable-shared \
+ --enable-pic \
+ --bit-depth='10'
+
msg2 "Making x264 (10-bit)..."
make
}
package_x264-git() {
pkgdesc='CLI tools for encoding H264/AVC video streams (Git)'
- depends=('ffmpeg' 'l-smash')
+ depends=('libavcodec.so' 'libavformat.so' 'libavutil.so' 'liblsmash.so'
+ 'libswscale.so')
provides=('x264-10bit' 'x264')
conflicts=('x264-10bit' 'x264')
replaces=('x264-10bit')
- make -C $_gitname DESTDIR="$pkgdir" install-cli
- install -Dm755 $_gitname-10bit/x264 "$pkgdir"/usr/bin/x264-10bit
+ make -C ${_pkgname} DESTDIR="${pkgdir}" install-cli
+ install -m 755 ${pkgbase}-10bit/x264 "${pkgdir}"/usr/bin/x264-10bit
}
package_libx264-git() {
@@ -85,8 +92,8 @@ package_libx264-git() {
conflicts=('x264-dev' 'libx264')
replaces=('x264-dev')
- install -d "$pkgdir"/usr/lib
- make -C $_gitname DESTDIR="$pkgdir" install-lib-shared
+ install -dm 755 "${pkgdir}"/usr/lib
+ make -C ${_pkgname} DESTDIR="${pkgdir}" install-lib-shared
}
package_libx264-10bit-git() {
@@ -94,6 +101,8 @@ package_libx264-10bit-git() {
provides=('libx264.so' 'libx264' 'x264-dev' 'libx264-10bit')
conflicts=('libx264' 'x264-dev' 'libx264-10bit')
- install -d "$pkgdir"/usr/lib
- make -C $_gitname-10bit DESTDIR="$pkgdir" install-lib-shared
-} \ No newline at end of file
+ install -dm 755 "${pkgdir}"/usr/lib
+ make -C ${_pkgname}-10bit DESTDIR="${pkgdir}" install-lib-shared
+}
+
+# vim: ts=2 sw=2 et: \ No newline at end of file