mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
88 lines
2.1 KiB
Bash
88 lines
2.1 KiB
Bash
# $Id$
|
|
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
|
|
# Contributor: Ionut Biru <ibiru@archlinux.org>
|
|
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
|
|
# Contributor: damir <damir@archlinux.org>
|
|
# Contributor: Paul Mattal <paul@archlinux.org>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - configure needs --disable-asm to build on non-AArch64
|
|
|
|
pkgname=('x264' 'libx264' 'libx264-10bit')
|
|
pkgver=148.20160103
|
|
pkgrel=1
|
|
epoch=2
|
|
arch=('i686' 'x86_64')
|
|
url='http://www.videolan.org/developers/x264.html'
|
|
license=('GPL')
|
|
depends=('glibc')
|
|
makedepends=('yasm' 'git' 'ffmpeg' 'l-smash')
|
|
_commit='5c6570495f8f1c716b294aee1430d8766a4beb9c'
|
|
source=("git://git.videolan.org/x264.git#commit=${_commit}")
|
|
sha256sums=('SKIP')
|
|
|
|
pkgver() {
|
|
cd ${pkgbase}
|
|
|
|
local _ver=$(grep '#define X264_BUILD' x264.h | cut -d' ' -f3)
|
|
local _date=$(git log -1 --format="%cd" --date=short | tr -d -)
|
|
|
|
echo ${_ver}.${_date}
|
|
}
|
|
|
|
prepare() {
|
|
cp -r ${pkgbase} ${pkgbase}-10bit
|
|
}
|
|
|
|
build() {
|
|
[[ $CARCH != "aarch64" ]] && CONFIG="--disable-asm"
|
|
|
|
cd ${pkgbase}
|
|
|
|
./configure \
|
|
--prefix='/usr' \
|
|
--enable-shared \
|
|
--enable-pic $CONFIG
|
|
make
|
|
|
|
cd ../${pkgbase}-10bit
|
|
|
|
./configure \
|
|
--prefix='/usr' \
|
|
--enable-shared \
|
|
--enable-pic \
|
|
--bit-depth='10' $CONFIG
|
|
make
|
|
}
|
|
|
|
package_x264() {
|
|
pkgdesc='CLI tools for encoding H264/AVC video streams'
|
|
depends=('ffmpeg' 'liblsmash.so')
|
|
provides=('x264-10bit')
|
|
conflicts=('x264-10bit')
|
|
replaces=('x264-10bit')
|
|
|
|
make -C ${pkgbase} DESTDIR="${pkgdir}" install-cli
|
|
install -m 755 ${pkgbase}-10bit/x264 "${pkgdir}"/usr/bin/x264-10bit
|
|
}
|
|
|
|
package_libx264() {
|
|
pkgdesc='Library for encoding H264/AVC video streams'
|
|
provides=('libx264.so' 'x264-dev')
|
|
conflicts=('x264-dev')
|
|
replaces=('x264-dev')
|
|
|
|
install -dm 755 "${pkgdir}"/usr/lib
|
|
make -C ${pkgbase} DESTDIR="${pkgdir}" install-lib-shared
|
|
}
|
|
|
|
package_libx264-10bit() {
|
|
pkgdesc='Library for encoding H264/AVC video streams. 10bit-depth.'
|
|
provides=('libx264.so' 'libx264' 'x264-dev')
|
|
conflicts=('libx264' 'x264-dev')
|
|
|
|
install -dm 755 "${pkgdir}"/usr/lib
|
|
make -C ${pkgbase}-10bit DESTDIR="${pkgdir}" install-lib-shared
|
|
}
|
|
|
|
# vim: ts=2 sw=2 et:
|