blob: 348d75bd859ce83471373cbed019883ee723e055 (
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# Maintainer: Tomasz Maciej Nowak <com[dot]gmail[at]tmn505>
# All my PKGBUILDs are managed at https://github.com/tmn505/AUR
pkgbase=libavio
pkgname=('libavio' 'python-avio')
pkgver=3.2.5
pkgrel=1
url='https://github.com/sr99622/libavio'
license=('Apache-2.0')
arch=('i686' 'x86_64')
makedepends=('cmake'
'ffmpeg4.4'
'git'
'libavcodec.so'
'libavformat.so'
'libavutil.so'
'libswresample.so'
'libswscale.so'
'pybind11'
'python-build'
'python-installer'
'python-setuptools'
'python-wheel'
'sdl2')
source=("git+${url}.git#commit=a6d4226abfd92f04a07e000aa4ce60173c74d1a3")
sha256sums=('c0a7a8a40b8a608331f47662932f7d4ed5c6c2a7a706f27cdcd69135d607e608')
prepare() {
cd ${srcdir}/${pkgname}
sed -e 's,add_subdirectory(pybind11),find_package(pybind11 REQUIRED),' -i CMakeLists.txt
}
pkgver() {
cd ${srcdir}/${pkgname}
sed -n -e '/libavio VERSION/p' CMakeLists.txt | sed -e 's/[^0-9,.]*//g'
}
build() {
cd ${srcdir}/${pkgbase}
export PKG_CONFIG_PATH='/usr/lib/ffmpeg4.4/pkgconfig'
cmake -B build-so \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=/usr \
-D WITHOUT_PYTHON=true \
-W no-dev
cmake --build build-so
python -m build --wheel --no-isolation
}
package_libavio() {
pkgdesc='Library for processing media streams designed for use in Onvif GUI'
depends=('libavcodec.so'
'libavformat.so'
'libavutil.so'
'libswresample.so'
'libswscale.so'
'sdl2')
cd ${srcdir}/${pkgbase}
install -D -m 644 -t ${pkgdir}/usr/include include/avio.h
install -D -m 755 -t ${pkgdir}/usr/lib build-so/${pkgname}.so.*
cp -a build-so/${pkgname}.so ${pkgdir}/usr/lib/${pkgname}.so
}
package_python-avio() {
pkgdesc='Python library for processing media streams designed for use in Onvif GUI'
depends=('libavcodec.so'
'libavformat.so'
'libavutil.so'
'libswresample.so'
'libswscale.so'
'python'
'sdl2')
cd ${srcdir}/${pkgbase}
python -m installer --destdir="${pkgdir}" dist/*.whl
}
|