summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2019-12-17 16:57:28 +0000
committerDaniel Bermond2019-12-17 17:35:34 +0000
commit4ee624b1bc5f1fa42a135643a432eb27ba79150b (patch)
tree66b9d7b29da138559daf2167b6efcddbb675942e
downloadaur-4ee624b1bc5f1fa42a135643a432eb27ba79150b.tar.gz
Initial commit of nvidia-vpf-git
-rw-r--r--.SRCINFO23
-rw-r--r--010-nvidia-vpf-git-fix-install.patch26
-rw-r--r--PKGBUILD43
3 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..4ee75413638
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = nvidia-vpf-git
+ pkgdesc = NVIDIA Video Processing Framework (git version)
+ pkgver = r4.g9630e0d
+ pkgrel = 1
+ url = https://github.com/NVIDIA/VideoProcessingFramework/
+ arch = x86_64
+ license = Apache
+ makedepends = git
+ makedepends = cmake
+ makedepends = nvidia-sdk
+ depends = cuda
+ depends = nvidia-utils
+ depends = ffmpeg
+ depends = python
+ provides = nvidia-vpf
+ conflicts = nvidia-vpf
+ source = git+https://github.com/NVIDIA/VideoProcessingFramework.git
+ source = 010-nvidia-vpf-git-fix-install.patch
+ sha256sums = SKIP
+ sha256sums = 04931025174a113df620b46a824b6b41437782533a0e9b7ce945f539208b72ae
+
+pkgname = nvidia-vpf-git
+
diff --git a/010-nvidia-vpf-git-fix-install.patch b/010-nvidia-vpf-git-fix-install.patch
new file mode 100644
index 00000000000..3850c322c8a
--- /dev/null
+++ b/010-nvidia-vpf-git-fix-install.patch
@@ -0,0 +1,26 @@
+diff -Naurp a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2019-12-17 16:52:55.000000000 +0000
++++ b/CMakeLists.txt 2019-12-17 17:30:31.455144875 +0000
+@@ -44,16 +44,10 @@ include_directories(${TC_INC_PATH})
+ include_directories(${VIDEO_CODEC_SDK_INCLUDE_DIR})
+
+ #Bring all the stuff together
+-install(FILES $<TARGET_FILE:TC_CORE> DESTINATION bin)
+-install(FILES $<TARGET_FILE:TC> DESTINATION bin)
++install(FILES $<TARGET_FILE:TC_CORE> DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(FILES $<TARGET_FILE:TC> DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+ if(GENERATE_PYTHON_BINDINGS)
+- install(FILES $<TARGET_FILE:PyNvCodec> DESTINATION bin)
+- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SampleDecode.py DESTINATION bin)
+- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SampleEncode.py DESTINATION bin)
+- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SampleTranscode.py DESTINATION bin)
+- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SampleFrameUpload.py DESTINATION bin)
+- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SampleColorConversion.py DESTINATION bin)
+- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SampleSufraceDownload.py DESTINATION bin)
+- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SampleTranscodeOneToN.py DESTINATION bin)
+-endif(GENERATE_PYTHON_BINDINGS)
+\ No newline at end of file
++ find_package(Python COMPONENTS Interpreter Development)
++ install(FILES $<TARGET_FILE:PyNvCodec> DESTINATION ${Python_SITEARCH}/PyNvCodec)
++endif(GENERATE_PYTHON_BINDINGS)
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..0690ad65e7c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Daniel Bermond <dbermond@archlinux.org>
+
+pkgname=nvidia-vpf-git
+pkgver=r4.g9630e0d
+pkgrel=1
+pkgdesc='NVIDIA Video Processing Framework (git version)'
+arch=('x86_64')
+url='https://github.com/NVIDIA/VideoProcessingFramework/'
+license=('Apache')
+depends=('cuda' 'nvidia-utils' 'ffmpeg' 'python')
+makedepends=('git' 'cmake' 'nvidia-sdk')
+provides=('nvidia-vpf')
+conflicts=('nvidia-vpf')
+source=('git+https://github.com/NVIDIA/VideoProcessingFramework.git'
+ '010-nvidia-vpf-git-fix-install.patch')
+sha256sums=('SKIP'
+ '04931025174a113df620b46a824b6b41437782533a0e9b7ce945f539208b72ae')
+
+prepare() {
+ patch -d VideoProcessingFramework -Np1 -i "${srcdir}/010-nvidia-vpf-git-fix-install.patch"
+}
+
+pkgver() {
+ cd VideoProcessingFramework
+ printf 'r%s.g%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ export CXXFLAGS+=' -I/opt/cuda/include'
+ export LDFLAGS+=' -L/opt/cuda/lib'
+ cmake -B build -S VideoProcessingFramework \
+ -DCMAKE_BUILD_TYPE:STRING='None' \
+ -DCMAKE_SKIP_RPATH:BOOL='YES' \
+ -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
+ -DGENERATE_PYTHON_BINDINGS:BOOL='TRUE' \
+ -DVIDEO_CODEC_SDK_INCLUDE_DIR:PATH='/usr/include/nvidia-sdk' \
+ -Wno-dev
+ make -C build
+}
+
+package() {
+ make -C build DESTDIR="$pkgdir" install
+}