Automate installation of DXVK, D9VK + Wine/Wine Staging & update GPU drivers + PlayonLinux wineprefixes (Debian/Ubuntu/Mint/Arch Linux/Manjaro)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

186 lines
5.0 KiB

########################################################
# Common properties
pkg_name="dxvk-nvapi-git"
pkg_license="custom --copyrightfile ../LICENSE"
pkg_maintainer="${USER} <${USER}@unknown>"
pkg_section="otherosfs"
pkg_priority="optional"
pkg_arch="all"
pkg_relative_builddir="debian/source/dxvk-nvapi-master"
pkg_commondesc="Alternative NVAPI implementation on top of DXVK."
pkg_longdesc="
Alternative implementation of NVIDIA's NVAPI library for
usage with DXVK and VKD3D-Proton.
"
pkg_giturl="${git_source_dxvknvapi_debian}"
pkg_homeurl="https://github.com/jp7677/dxvk-nvapi"
pkg_gitbranch=${git_branch_dxvknvapi}
git_commithash=${git_commithash_dxvknvapi}
pkg_gitver="printf '%s.%s' $(git rev-list --count HEAD) $(git rev-parse --short HEAD | sed 's/\-[a-z].*//; s/\-/\./g; s/[a-z]//g')"
pkg_installfile="./debian/install"
pkg_controlfile="./debian/control"
pkg_rulesfile="./debian/rules"
pkg_compatfile="./debian/compat"
########################################################
# Debian compatibility flag
pkg_debcompat="12"
########################################################
# Debian rules file section
pkg_debrules="\
#!/usr/bin/make -f
%:
dh \$@
override_dh_auto_configure:
override_dh_usrlocal:
override_dh_install:
# Compile DXVK NVAPI
bash ./package-release.sh master debian/source/
# Tell deb builder to create DXVK NVAPI x32 & x64 subfolders
for arch in 32 64; do mkdir -p ${pkg_relative_builddir}/x${arch}; done
# Make a proper executable script folder for setup_dxvk.sh file
mkdir -p ${pkg_relative_builddir}/bin
# Add missing setup_dxvk_nvapi.sh file
cp debian/source/setup_dxvk_nvapi.sh /usr/share/dxvk_nvapi/
chmod +x /usr/share/dxvk_nvapi/setup_dxvk_nvapi.sh
printf '%s\n%s\n%s %s' \"#!/bin/sh\" \"cd /usr/share/dxvk_nvapi/\" \"./setup_dxvk_nvapi.sh\" \"\${@}\" > \"${pkg_relative_builddir}/bin/setup_dxvk_nvapi\"
chmod +x "${pkg_relative_builddir}/bin/setup_dxvk_nvapi"
dh_install
"
########################################################
# Debian install file section
pkg_debinstall="\
${pkg_relative_builddir}/setup_dxvk_nvapi.sh usr/share/dxvk_nvapi/
${pkg_relative_builddir}/bin/* usr/bin/
$(for arch in 32 64; do echo -e ${pkg_relative_builddir}/x${arch}/* usr/share/dxvk_nvapi/x${arch}/; done)
"
########################################################
# Debian control file subfields
# Debian control file Overrides section
pkg_overrides=(
empty
)
# Debian control file Suggests section
pkg_suggests=(
empty
)
# Debian control file Conflicts section
pkg_conflicts=(
empty
)
# Debian control file Breaks section
pkg_breaks=(
empty
)
# Debian control file Replaces section
pkg_replaces=(
empty
)
# Debian control file Provides section
pkg_provides=(
empty
)
############################
# Build time dependencies
pkg_deps_build=(
#${_coredeps[*]}
'meson'
'glslang'
'ninja-build (>= 1.5)'
'gcc-mingw-w64-base'
#'binutils-common'
'mingw-w64-common'
'binutils-mingw-w64-x86-64'
'binutils-mingw-w64-i686'
'mingw-w64-x86-64-dev'
'gcc-mingw-w64-x86-64'
'g++-mingw-w64-x86-64'
'mingw-w64-i686-dev'
'gcc-mingw-w64-i686'
'g++-mingw-w64-i686'
)
# Runtime dependencies
pkg_deps_runtime=(
'wine'
)
# Extra fields for Debian control file Source section
pkg_extra_1=(
empty
)
# Extra fields for Debian control file Package section
pkg_extra_2=(
empty
)
############################
# Deb builder execution field
# Do not build either debug symbols or doc files
pkg_debbuilder="DEB_BUILD_OPTIONS=\"strip nodocs noddebs\" dpkg-buildpackage -us -uc -b -d --source-option=--include-binaries"
########################################################
# Contents of Debian control file
# This is a necessary variable setting for array loops below
IFS=$'\n'
pkg_debcontrol="\
Source: ${pkg_name}
Section: ${pkg_section}
Priority: ${pkg_priority}
Maintainer: ${pkg_maintainer}
Build-Depends: debhelper (>=9), $(if [[ ${pkg_deps_build[0]} != "empty" ]]; then \
for w in ${pkg_deps_build[@]}; do printf '%s, ' ${w}; done; fi)
Standards-Version: 4.1.3
Homepage: ${pkg_homeurl}
$(if [[ ${pkg_extra_1[0]} != "empty" ]]; then for w in ${pkg_extra_1[@]}; do echo ${w}; done ; fi)
Package: ${pkg_name}
Architecture: ${pkg_arch}
Depends: \${shlibs:Depends}, \${misc:Depends}, $(if [[ ${pkg_deps_runtime[0]} != "empty" ]]; then \
for w in ${pkg_deps_runtime[@]}; do printf '%s, ' ${w}; done; fi)
Description: ${pkg_commondesc}
$(echo -e ${pkg_longdesc} | sed 's/^/ /g; s/\n/\n /g')
$(if [[ ${pkg_extra_2[0]} != "empty" ]]; then for w in ${pkg_extra_2[@]}; do echo ${w}; done ; fi)
$(if [[ ${pkg_suggests[0]} != "empty" ]]; then echo "Suggests: $(echo ${_kg_suggests[*]} | sed 's/\s/, /g')"; fi)
$(if [[ ${pkg_conflicts[0]} != "empty" ]]; then echo "Conflicts: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
$(if [[ ${pkg_breaks[0]} != "empty" ]]; then echo "Breaks: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
$(if [[ ${pkg_replaces[0]} != "empty" ]]; then echo "Replaces: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
$(if [[ ${pkg_provides[0]} != "empty" ]]; then echo "Provides: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
"
unset IFS