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.

182 lines
4.8 KiB

  1. ########################################################
  2. # Common properties
  3. pkg_name="dxvk-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. dxvk_relative_builddir="debian/source/dxvk-master"
  10. pkg_commondesc="Vulkan-based D3D11, D3D10 & D3D9 implementation for Linux / Wine"
  11. pkg_longdesc="
  12. A Vulkan-based translation layer for Direct3D 10/11 which
  13. allows running 3D applications on Linux using Wine.
  14. "
  15. pkg_giturl="https://github.com/doitsujin/dxvk"
  16. pkg_homeurl="https://github.com/doitsujin/dxvk"
  17. pkg_gitbranch=${git_branch_dxvk}
  18. git_commithash=${git_commithash_dxvk}
  19. pkg_gitver="git describe --long | sed 's/\-[a-z].*//; s/\-/\./; 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
  37. bash ./package-release.sh master debian/source/ --no-package
  38. # Tell deb builder to create DXVK x32 & x64 subfolders
  39. for arch in 32 64; do mkdir -p ${dxvk_relative_builddir}/x${arch}; done
  40. # Make a proper executable script folder for setup_dxvk.sh file
  41. mkdir -p ${dxvk_relative_builddir}/bin
  42. printf '%s\n%s %s' \"#!/bin/sh\" \"/usr/share/dxvk/setup_dxvk.sh\" \"\${@}\" > \"${dxvk_relative_builddir}/bin/setup_dxvk\"
  43. chmod +x "${dxvk_relative_builddir}/bin/setup_dxvk"
  44. dh_install
  45. "
  46. ########################################################
  47. # Debian install file section
  48. pkg_debinstall="\
  49. ${dxvk_relative_builddir}/setup_dxvk.sh usr/share/dxvk/
  50. ${dxvk_relative_builddir}/bin/* usr/bin/
  51. $(for arch in 32 64; do echo -e ${dxvk_relative_builddir}/x${arch}/* usr/share/dxvk/x${arch}/; done)
  52. "
  53. ########################################################
  54. # Debian control file subfields
  55. # Debian control file Overrides section
  56. pkg_overrides=(
  57. empty
  58. )
  59. # Debian control file Suggests section
  60. pkg_suggests=(
  61. empty
  62. )
  63. # Debian control file Conflicts section
  64. pkg_conflicts=(
  65. empty
  66. )
  67. # Debian control file Breaks section
  68. pkg_breaks=(
  69. empty
  70. )
  71. # Debian control file Replaces section
  72. pkg_replaces=(
  73. empty
  74. )
  75. # Debian control file Provides section
  76. pkg_provides=(
  77. empty
  78. )
  79. ############################
  80. # Build time dependencies
  81. pkg_deps_build=(
  82. #${_coredeps[*]}
  83. 'meson'
  84. 'glslang'
  85. 'ninja-build (>= 1.5)'
  86. 'gcc-mingw-w64-base'
  87. #'binutils-common'
  88. 'mingw-w64-common'
  89. 'binutils-mingw-w64-x86-64'
  90. 'binutils-mingw-w64-i686'
  91. 'mingw-w64-x86-64-dev'
  92. 'gcc-mingw-w64-x86-64'
  93. 'g++-mingw-w64-x86-64'
  94. 'mingw-w64-i686-dev'
  95. 'gcc-mingw-w64-i686'
  96. 'g++-mingw-w64-i686'
  97. )
  98. # Runtime dependencies
  99. pkg_deps_runtime=(
  100. 'wine'
  101. )
  102. # Extra fields for Debian control file Source section
  103. pkg_extra_1=(
  104. empty
  105. )
  106. # Extra fields for Debian control file Package section
  107. pkg_extra_2=(
  108. empty
  109. )
  110. ############################
  111. # Deb builder execution field
  112. # Do not build either debug symbols or doc files
  113. pkg_debbuilder="DEB_BUILD_OPTIONS=\"strip nodocs noddebs\" dpkg-buildpackage -us -uc -b -d --source-option=--include-binaries"
  114. ########################################################
  115. # Contents of Debian control file
  116. # This is a necessary variable setting for array loops below
  117. IFS=$'\n'
  118. pkg_debcontrol="\
  119. Source: ${pkg_name}
  120. Section: ${pkg_section}
  121. Priority: ${pkg_priority}
  122. Maintainer: ${pkg_maintainer}
  123. Build-Depends: debhelper (>=9), $(if [[ ${pkg_deps_build[0]} != "empty" ]]; then \
  124. for w in ${pkg_deps_build[@]}; do printf '%s, ' ${w}; done; fi)
  125. Standards-Version: 4.1.3
  126. Homepage: ${pkg_homeurl}
  127. $(if [[ ${pkg_extra_1[0]} != "empty" ]]; then for w in ${pkg_extra_1[@]}; do echo ${w}; done ; fi)
  128. Package: ${pkg_name}
  129. Architecture: ${pkg_arch}
  130. Depends: \${shlibs:Depends}, \${misc:Depends}, $(if [[ ${pkg_deps_runtime[0]} != "empty" ]]; then \
  131. for w in ${pkg_deps_runtime[@]}; do printf '%s, ' ${w}; done; fi)
  132. Description: ${pkg_commondesc}
  133. $(echo -e ${pkg_longdesc} | sed 's/^/ /g; s/\n/\n /g')
  134. $(if [[ ${pkg_extra_2[0]} != "empty" ]]; then for w in ${pkg_extra_2[@]}; do echo ${w}; done ; fi)
  135. $(if [[ ${pkg_suggests[0]} != "empty" ]]; then echo "Suggests: $(echo ${_kg_suggests[*]} | sed 's/\s/, /g')"; fi)
  136. $(if [[ ${pkg_conflicts[0]} != "empty" ]]; then echo "Conflicts: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
  137. $(if [[ ${pkg_breaks[0]} != "empty" ]]; then echo "Breaks: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
  138. $(if [[ ${pkg_replaces[0]} != "empty" ]]; then echo "Replaces: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
  139. $(if [[ ${pkg_provides[0]} != "empty" ]]; then echo "Provides: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
  140. "
  141. unset IFS