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.

175 lines
4.7 KiB

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