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

  1. ########################################################
  2. # Common properties
  3. pkg_name="dxvk-nvapi-git"
  4. pkg_license="custom --copyrightfile ../LICENSE"
  5. pkg_maintainer="${USER} <${USER}@unknown>"
  6. pkg_section="otherosfs"
  7. pkg_priority="optional"
  8. pkg_arch="all"
  9. pkg_relative_builddir="debian/source/dxvk-nvapi-master"
  10. pkg_commondesc="Alternative NVAPI implementation on top of DXVK."
  11. pkg_longdesc="
  12. Alternative implementation of NVIDIA's NVAPI library for
  13. usage with DXVK and VKD3D-Proton.
  14. "
  15. pkg_giturl="${git_source_dxvknvapi_debian}"
  16. pkg_homeurl="https://github.com/jp7677/dxvk-nvapi"
  17. pkg_gitbranch=${git_branch_dxvknvapi}
  18. git_commithash=${git_commithash_dxvknvapi}
  19. 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')"
  20. pkg_installfile="./debian/install"
  21. pkg_controlfile="./debian/control"
  22. pkg_rulesfile="./debian/rules"
  23. pkg_compatfile="./debian/compat"
  24. ########################################################
  25. # Debian compatibility flag
  26. pkg_debcompat="12"
  27. ########################################################
  28. # Debian rules file section
  29. pkg_debrules="\
  30. #!/usr/bin/make -f
  31. %:
  32. dh \$@
  33. override_dh_auto_configure:
  34. override_dh_usrlocal:
  35. override_dh_install:
  36. # Compile DXVK NVAPI
  37. bash ./package-release.sh master debian/source/
  38. # Tell deb builder to create DXVK NVAPI x32 & x64 subfolders
  39. for arch in 32 64; do mkdir -p ${pkg_relative_builddir}/x${arch}; done
  40. # Make a proper executable script folder for setup_dxvk.sh file
  41. mkdir -p ${pkg_relative_builddir}/bin
  42. # Add missing setup_dxvk_nvapi.sh file
  43. cp debian/source/setup_dxvk_nvapi.sh /usr/share/dxvk_nvapi/
  44. chmod +x /usr/share/dxvk_nvapi/setup_dxvk_nvapi.sh
  45. 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\"
  46. chmod +x "${pkg_relative_builddir}/bin/setup_dxvk_nvapi"
  47. dh_install
  48. "
  49. ########################################################
  50. # Debian install file section
  51. pkg_debinstall="\
  52. ${pkg_relative_builddir}/setup_dxvk_nvapi.sh usr/share/dxvk_nvapi/
  53. ${pkg_relative_builddir}/bin/* usr/bin/
  54. $(for arch in 32 64; do echo -e ${pkg_relative_builddir}/x${arch}/* usr/share/dxvk_nvapi/x${arch}/; done)
  55. "
  56. ########################################################
  57. # Debian control file subfields
  58. # Debian control file Overrides section
  59. pkg_overrides=(
  60. empty
  61. )
  62. # Debian control file Suggests section
  63. pkg_suggests=(
  64. empty
  65. )
  66. # Debian control file Conflicts section
  67. pkg_conflicts=(
  68. empty
  69. )
  70. # Debian control file Breaks section
  71. pkg_breaks=(
  72. empty
  73. )
  74. # Debian control file Replaces section
  75. pkg_replaces=(
  76. empty
  77. )
  78. # Debian control file Provides section
  79. pkg_provides=(
  80. empty
  81. )
  82. ############################
  83. # Build time dependencies
  84. pkg_deps_build=(
  85. #${_coredeps[*]}
  86. 'meson'
  87. 'glslang'
  88. 'ninja-build (>= 1.5)'
  89. 'gcc-mingw-w64-base'
  90. #'binutils-common'
  91. 'mingw-w64-common'
  92. 'binutils-mingw-w64-x86-64'
  93. 'binutils-mingw-w64-i686'
  94. 'mingw-w64-x86-64-dev'
  95. 'gcc-mingw-w64-x86-64'
  96. 'g++-mingw-w64-x86-64'
  97. 'mingw-w64-i686-dev'
  98. 'gcc-mingw-w64-i686'
  99. 'g++-mingw-w64-i686'
  100. )
  101. # Runtime dependencies
  102. pkg_deps_runtime=(
  103. 'wine'
  104. )
  105. # Extra fields for Debian control file Source section
  106. pkg_extra_1=(
  107. empty
  108. )
  109. # Extra fields for Debian control file Package section
  110. pkg_extra_2=(
  111. empty
  112. )
  113. ############################
  114. # Deb builder execution field
  115. # Do not build either debug symbols or doc files
  116. pkg_debbuilder="DEB_BUILD_OPTIONS=\"strip nodocs noddebs\" dpkg-buildpackage -us -uc -b -d --source-option=--include-binaries"
  117. ########################################################
  118. # Contents of Debian control file
  119. # This is a necessary variable setting for array loops below
  120. IFS=$'\n'
  121. pkg_debcontrol="\
  122. Source: ${pkg_name}
  123. Section: ${pkg_section}
  124. Priority: ${pkg_priority}
  125. Maintainer: ${pkg_maintainer}
  126. Build-Depends: debhelper (>=9), $(if [[ ${pkg_deps_build[0]} != "empty" ]]; then \
  127. for w in ${pkg_deps_build[@]}; do printf '%s, ' ${w}; done; fi)
  128. Standards-Version: 4.1.3
  129. Homepage: ${pkg_homeurl}
  130. $(if [[ ${pkg_extra_1[0]} != "empty" ]]; then for w in ${pkg_extra_1[@]}; do echo ${w}; done ; fi)
  131. Package: ${pkg_name}
  132. Architecture: ${pkg_arch}
  133. Depends: \${shlibs:Depends}, \${misc:Depends}, $(if [[ ${pkg_deps_runtime[0]} != "empty" ]]; then \
  134. for w in ${pkg_deps_runtime[@]}; do printf '%s, ' ${w}; done; fi)
  135. Description: ${pkg_commondesc}
  136. $(echo -e ${pkg_longdesc} | sed 's/^/ /g; s/\n/\n /g')
  137. $(if [[ ${pkg_extra_2[0]} != "empty" ]]; then for w in ${pkg_extra_2[@]}; do echo ${w}; done ; fi)
  138. $(if [[ ${pkg_suggests[0]} != "empty" ]]; then echo "Suggests: $(echo ${_kg_suggests[*]} | sed 's/\s/, /g')"; fi)
  139. $(if [[ ${pkg_conflicts[0]} != "empty" ]]; then echo "Conflicts: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
  140. $(if [[ ${pkg_breaks[0]} != "empty" ]]; then echo "Breaks: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
  141. $(if [[ ${pkg_replaces[0]} != "empty" ]]; then echo "Replaces: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
  142. $(if [[ ${pkg_provides[0]} != "empty" ]]; then echo "Provides: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
  143. "
  144. unset IFS