mirror of
https://github.com/terrapkg/packages.git
synced 2026-05-31 09:01:55 +00:00
* add: Some more NVIDIA stuff
* fix: Add arches in anda.hcl
Signed-off-by: Gilver <rockgrub@disroot.org>
---------
Signed-off-by: Gilver <rockgrub@disroot.org>
(cherry picked from commit 23a0de7300)
Co-authored-by: Gilver <rockgrub@disroot.org>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
project pkg {
|
||||
rpm {
|
||||
spec = "libnvjitlink.spec"
|
||||
}
|
||||
labels {
|
||||
subrepo = "nvidia"
|
||||
updbranch = 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
%global debug_package %{nil}
|
||||
%global __strip /bin/true
|
||||
%global _missing_build_ids_terminate_build 0
|
||||
%global _build_id_links none
|
||||
%global major_package_version 12-8
|
||||
|
||||
Name: libnvjitlink
|
||||
Epoch: 1
|
||||
Version: 12.8.61
|
||||
Release: 1%{?dist}
|
||||
Summary: NVIDIA compiler library for JIT LTO functionality
|
||||
License: CUDA Toolkit
|
||||
URL: https://developer.nvidia.com/cuda-toolkit
|
||||
ExclusiveArch: x86_64 aarch64
|
||||
|
||||
Source0: https://developer.download.nvidia.com/compute/cuda/redist/%{name}/linux-x86_64/%{name}-linux-x86_64-%{version}-archive.tar.xz
|
||||
Source1: https://developer.download.nvidia.com/compute/cuda/redist/%{name}/linux-sbsa/%{name}-linux-sbsa-%{version}-archive.tar.xz
|
||||
Source3: nvjitlink.pc
|
||||
|
||||
Conflicts: %{name}-%{major_package_version} < %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
|
||||
%description
|
||||
NVJIT link compiler LTO functionality native runtime library.
|
||||
Just-in-time link-time-optimization (JIT LTO) allows developers to proved
|
||||
runtime linking of specialized kernel functions with no-call overhead.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for NVIDIA compiler library for JIT LTO functionality
|
||||
Requires: %{name}%{_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Conflicts: %{name}-devel-%{major_package_version} < %{?epoch:%{epoch}:}%{version}
|
||||
|
||||
%description devel
|
||||
This package provides development files for the CUDA NVIDIA compiler library for
|
||||
JIT LTO functionality.
|
||||
|
||||
%package static
|
||||
Summary: Static libraries for NVIDIA compiler library for JIT LTO functionality
|
||||
Requires: %{name}-devel%{_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
|
||||
%description static
|
||||
This package contains static libraries for NVIDIA compiler library for JIT LTO
|
||||
functionality.
|
||||
|
||||
%prep
|
||||
%ifarch x86_64
|
||||
%setup -q -n %{name}-linux-x86_64-%{version}-archive
|
||||
%endif
|
||||
|
||||
%ifarch aarch64
|
||||
%setup -q -T -b 1 -n %{name}-linux-sbsa-%{version}-archive
|
||||
%endif
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_includedir}
|
||||
mkdir -p %{buildroot}%{_libdir}
|
||||
mkdir -p %{buildroot}%{_libdir}/pkgconfig/
|
||||
|
||||
cp -fr include/* %{buildroot}%{_includedir}/
|
||||
cp -fr lib/lib* %{buildroot}%{_libdir}/
|
||||
cp -fr %{SOURCE3} %{buildroot}/%{_libdir}/pkgconfig/
|
||||
|
||||
# Set proper variables
|
||||
sed -i \
|
||||
-e 's|CUDA_VERSION|%{version}|g' \
|
||||
-e 's|LIBDIR|%{_libdir}|g' \
|
||||
-e 's|INCLUDE_DIR|%{_includedir}|g' \
|
||||
%{buildroot}/%{_libdir}/pkgconfig/*.pc
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%{_libdir}/libnvJitLink.so.*
|
||||
|
||||
%files devel
|
||||
%{_includedir}/nvJitLink.h
|
||||
%{_libdir}/libnvJitLink.so
|
||||
%{_libdir}/pkgconfig/nvjitlink.pc
|
||||
|
||||
%files static
|
||||
%{_libdir}/libnvJitLink_static.a
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
@@ -0,0 +1,8 @@
|
||||
libdir=LIBDIR
|
||||
includedir=INCLUDE_DIR
|
||||
|
||||
Name: NVIDIA compiler library for JIT LTO functionality
|
||||
Description: NVIDIA JIT LTO
|
||||
Version: CUDA_VERSION
|
||||
Libs: -L${libdir} -lnvjitlink
|
||||
Cflags: -I${includedir}
|
||||
@@ -0,0 +1,3 @@
|
||||
import "andax/nvidia.rhai" as nvidia;
|
||||
|
||||
rpm.version(nvidia::nvidia_component_version("libnvjitlink"));
|
||||
@@ -0,0 +1,9 @@
|
||||
project pkg {
|
||||
rpm {
|
||||
spec = "libnvjpeg2k.spec"
|
||||
}
|
||||
labels {
|
||||
subrepo = "nvidia"
|
||||
updbranch = 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
%global debug_package %{nil}
|
||||
%global __strip /bin/true
|
||||
%global _missing_build_ids_terminate_build 0
|
||||
|
||||
Name: libnvjpeg2k
|
||||
Version: 0.8.1.40
|
||||
Release: 1%{?dist}
|
||||
Summary: NVIDIA JPEG 2K decoder (nvJPEG2000)
|
||||
License: NVIDIA EULA
|
||||
URL: https://developer.nvidia.com/nvjpeg
|
||||
ExclusiveArch: aarch64 x86_64
|
||||
|
||||
# https://developer.nvidia.com/nvjpeg2000/downloads
|
||||
Source0: https://developer.download.nvidia.com/compute/nvjpeg2000/redist/libnvjpeg_2k/linux-x86_64/libnvjpeg_2k-linux-x86_64-%{version}-archive.tar.xz
|
||||
Source1: https://developer.download.nvidia.com/compute/nvjpeg2000/redist/libnvjpeg_2k/linux-sbsa/libnvjpeg_2k-linux-sbsa-%{version}-archive.tar.xz
|
||||
Source2: nvjpeg2k.pc
|
||||
|
||||
Obsoletes: cuda-nvjpeg2k < %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Provides: cuda-nvjpeg2k = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
|
||||
Conflicts: libnvjpeg2k0 < %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
|
||||
%description
|
||||
The nvJPEG2000 library accelerates the decoding of JPEG 2000 images on NVIDIA
|
||||
GPUs. The library utilizes both CPU and GPU for decoding. Tier 2 decode stage
|
||||
(First stage of decode, refer to the JPEG 2000 specification for details.) is
|
||||
run on the CPU. All other stages of the decoding process are offloaded to the
|
||||
GPU.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for NVIDIA JPEG 2K decoder (nvJPEG2000)
|
||||
Requires: %{name}%{_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires: cuda-devel%{_isa} >= 1:11
|
||||
Conflicts: libnvjpeg2k-devel < %{?epoch:%{epoch}:}%{version}
|
||||
|
||||
%description devel
|
||||
This package provides development files for the NVIDIA JPEG 2K decoder (nvJPEG2000).
|
||||
|
||||
%package static
|
||||
Summary: Static libraries for NVIDIA JPEG 2K decoder (nvJPEG2000)
|
||||
Requires: pkgconf-pkg-config
|
||||
Requires: %{name}-devel%{_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
|
||||
%description static
|
||||
This package contains static libraries for NVIDIA JPEG 2K decoder (nvJPEG2000).
|
||||
|
||||
%prep
|
||||
%ifarch x86_64
|
||||
%setup -q -n libnvjpeg_2k-linux-x86_64-%{version}-archive
|
||||
%endif
|
||||
|
||||
%ifarch aarch64
|
||||
%setup -q -T -b 1 -n libnvjpeg_2k-linux-sbsa-%{version}-archive
|
||||
%endif
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}/%{_libdir}/pkgconfig/
|
||||
mkdir -p %{buildroot}/%{_includedir}/cuda/
|
||||
|
||||
cp -a lib/12/* %{buildroot}/%{_libdir}/
|
||||
chmod 755 %{buildroot}/%{_libdir}/*.so*
|
||||
|
||||
cp -a include/* %{buildroot}/%{_includedir}/
|
||||
chmod 644 %{buildroot}/%{_includedir}/*
|
||||
|
||||
install -pm 644 %{SOURCE2} %{buildroot}/%{_libdir}/pkgconfig/
|
||||
|
||||
# Set proper variables
|
||||
sed -i \
|
||||
-e 's|VERSION|%{version}|g' \
|
||||
-e 's|LIBDIR|%{_libdir}|g' \
|
||||
-e 's|INCLUDE_DIR|%{_includedir}/cuda|g' \
|
||||
%{buildroot}/%{_libdir}/pkgconfig/*.pc
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%{_libdir}/libnvjpeg2k.so.*
|
||||
|
||||
%files static
|
||||
%{_libdir}/libnvjpeg2k_static.a
|
||||
|
||||
%files devel
|
||||
%{_includedir}/nvjpeg2k.h
|
||||
%{_includedir}/nvjpeg2k_version.h
|
||||
%{_libdir}/libnvjpeg2k.so
|
||||
%{_libdir}/pkgconfig/nvjpeg2k.pc
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
@@ -0,0 +1,8 @@
|
||||
libdir=LIBDIR
|
||||
includedir=INCLUDE_DIR
|
||||
|
||||
Name: nvjpeg2k
|
||||
Description: NVIDIA JPEG 2K decoder
|
||||
Version: VERSION
|
||||
Libs: -L${libdir} -lnvjpeg2k
|
||||
Cflags: -I${includedir}
|
||||
@@ -0,0 +1,5 @@
|
||||
let url = "https://developer.download.nvidia.com/compute/nvjpeg2000/redist/";
|
||||
let matches = find_all("redistrib_[\\d.]+.json", get(url));
|
||||
let series = `${url}${matches[matches.len - 1][0]}`;
|
||||
let json = get(series).json();
|
||||
rpm.version(json["libnvjpeg_2k"]["version"]);
|
||||
@@ -0,0 +1,9 @@
|
||||
project pkg {
|
||||
arches = ["x86_64"]
|
||||
rpm {
|
||||
spec = "nv-codec-headers.spec"
|
||||
}
|
||||
labels {
|
||||
subrepo = "nvidia"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
Name: nv-codec-headers
|
||||
Version: 13.0.19.0
|
||||
Release: 1%{?dist}
|
||||
Summary: FFmpeg version of Nvidia Codec SDK headers
|
||||
License: MIT
|
||||
URL: https://github.com/FFmpeg/nv-codec-headers
|
||||
BuildArch: noarch
|
||||
|
||||
Source0: %url/archive/n%{version}/%{name}-n%{version}.tar.gz
|
||||
|
||||
BuildRequires: make
|
||||
|
||||
%description
|
||||
FFmpeg version of headers required to interface with Nvidias codec APIs.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-n%{version}
|
||||
sed -i -e 's@/include@/include/ffnvcodec@g' ffnvcodec.pc.in
|
||||
|
||||
# Extract license
|
||||
sed -n '4,25p' include/ffnvcodec/nvEncodeAPI.h > LICENSE
|
||||
sed -i '1,22s/^.\{,3\}//' LICENSE
|
||||
|
||||
%build
|
||||
%make_build PREFIX=%{_prefix} LIBDIR=/share
|
||||
|
||||
%install
|
||||
%make_install PREFIX=%{_prefix} LIBDIR=/share
|
||||
|
||||
%files
|
||||
%doc README
|
||||
%license LICENSE
|
||||
%{_includedir}/ffnvcodec/
|
||||
%{_datadir}/pkgconfig/ffnvcodec.pc
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
@@ -0,0 +1 @@
|
||||
rpm.version(gh("FFmpeg/nv-codec-headers"));
|
||||
Reference in New Issue
Block a user