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.

189 lines
5.2 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. 'directx-headers-dev'
  101. )
  102. # Runtime dependencies
  103. pkg_deps_runtime=(
  104. 'wine'
  105. )
  106. # Extra fields for Debian control file Source section
  107. pkg_extra_1=(
  108. empty
  109. )
  110. # Extra fields for Debian control file Package section
  111. pkg_extra_2=(
  112. empty
  113. )
  114. ############################
  115. # Deb builder execution field
  116. # Exclude -z flag from LDFLAGS because it does not work with meson
  117. # Do not build either debug symbols or doc files
  118. pkg_debbuilder="LDFLAGS=\"-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto\" DEB_BUILD_OPTIONS=\"strip nodocs noddebs\" dpkg-buildpackage -us -uc -b -d --source-option=--include-binaries"
  119. ########################################################
  120. # Contents of Debian control file
  121. # This is a necessary variable setting for array loops below
  122. IFS=$'\n'
  123. pkg_debcontrol="\
  124. Source: ${pkg_name}
  125. Section: ${pkg_section}
  126. Priority: ${pkg_priority}
  127. Maintainer: ${pkg_maintainer}
  128. Build-Depends: debhelper (>=9), $(if [[ ${pkg_deps_build[0]} != "empty" ]]; then \
  129. for w in ${pkg_deps_build[@]}; do printf '%s, ' ${w}; done; fi)
  130. Standards-Version: 4.1.3
  131. Homepage: ${pkg_homeurl}
  132. $(if [[ ${pkg_extra_1[0]} != "empty" ]]; then for w in ${pkg_extra_1[@]}; do echo ${w}; done ; fi)
  133. Package: ${pkg_name}
  134. Architecture: ${pkg_arch}
  135. Depends: \${shlibs:Depends}, \${misc:Depends}, $(if [[ ${pkg_deps_runtime[0]} != "empty" ]]; then \
  136. for w in ${pkg_deps_runtime[@]}; do printf '%s, ' ${w}; done; fi)
  137. Description: ${pkg_commondesc}
  138. $(echo -e ${pkg_longdesc} | sed 's/^/ /g; s/\n/\n /g')
  139. $(if [[ ${pkg_extra_2[0]} != "empty" ]]; then for w in ${pkg_extra_2[@]}; do echo ${w}; done ; fi)
  140. $(if [[ ${pkg_suggests[0]} != "empty" ]]; then echo "Suggests: $(echo ${_kg_suggests[*]} | sed 's/\s/, /g')"; fi)
  141. $(if [[ ${pkg_conflicts[0]} != "empty" ]]; then echo "Conflicts: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
  142. $(if [[ ${pkg_breaks[0]} != "empty" ]]; then echo "Breaks: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
  143. $(if [[ ${pkg_replaces[0]} != "empty" ]]; then echo "Replaces: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
  144. $(if [[ ${pkg_provides[0]} != "empty" ]]; then echo "Provides: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
  145. "
  146. unset IFS