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.

184 lines
5.1 KiB

  1. ########################################################
  2. # Common properties
  3. pkg_name="vkd3d-proton-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/vkd3d-proton-master"
  10. pkg_commondesc="Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation."
  11. pkg_longdesc="
  12. Fork of VKD3D, which aims to implement the full Direct3D 12
  13. API on top of Vulkan. The project serves as the development
  14. effort for Direct3D 12 support in Proton.
  15. "
  16. pkg_giturl="${git_source_vkd3dproton_debian}"
  17. pkg_homeurl="https://github.com/HansKristian-Work/vkd3d-proton"
  18. pkg_gitbranch=${git_branch_vkd3dproton}
  19. git_commithash=${git_commithash_vkd3dproton}
  20. pkg_gitver="git describe --long --always | sed 's/\-[a-z].*//; s/\-/\./g; s/[a-z]//g'"
  21. pkg_installfile="./debian/install"
  22. pkg_controlfile="./debian/control"
  23. pkg_rulesfile="./debian/rules"
  24. pkg_compatfile="./debian/compat"
  25. ########################################################
  26. # Debian compatibility flag
  27. pkg_debcompat="12"
  28. ########################################################
  29. # Debian rules file section
  30. pkg_debrules="\
  31. #!/usr/bin/make -f
  32. %:
  33. dh \$@
  34. override_dh_auto_configure:
  35. override_dh_usrlocal:
  36. override_dh_install:
  37. # Compile VKD3D Proton
  38. bash ./package-release.sh master debian/source/ --no-package
  39. # Tell deb builder to create VKD3D Proton x86 & x64 subfolders
  40. for arch in 86 64; do mkdir -p ${pkg_relative_builddir}/x${arch}; done
  41. # Make a proper executable script folder for setup_dxvk.sh file
  42. mkdir -p ${pkg_relative_builddir}/bin
  43. printf '%s\n%s\n%s %s' \"#!/bin/sh\" \"cd /usr/share/vkd3d_proton/\" \"./setup_vkd3d_proton.sh\" \"\${@}\" > \"${pkg_relative_builddir}/bin/setup_vkd3d_proton\"
  44. chmod +x "${pkg_relative_builddir}/bin/setup_vkd3d_proton"
  45. dh_install
  46. "
  47. ########################################################
  48. # Debian install file section
  49. pkg_debinstall="\
  50. ${pkg_relative_builddir}/setup_vkd3d_proton.sh usr/share/vkd3d_proton/
  51. ${pkg_relative_builddir}/bin/* usr/bin/
  52. $(for arch in 86 64; do echo -e ${pkg_relative_builddir}/x${arch}/* usr/share/vkd3d_proton/x${arch}/; done)
  53. "
  54. ########################################################
  55. # Debian control file subfields
  56. # Debian control file Overrides section
  57. pkg_overrides=(
  58. empty
  59. )
  60. # Debian control file Suggests section
  61. pkg_suggests=(
  62. empty
  63. )
  64. # Debian control file Conflicts section
  65. pkg_conflicts=(
  66. empty
  67. )
  68. # Debian control file Breaks section
  69. pkg_breaks=(
  70. empty
  71. )
  72. # Debian control file Replaces section
  73. pkg_replaces=(
  74. empty
  75. )
  76. # Debian control file Provides section
  77. pkg_provides=(
  78. empty
  79. )
  80. ############################
  81. # Build time dependencies
  82. pkg_deps_build=(
  83. #${_coredeps[*]}
  84. 'meson'
  85. 'glslang'
  86. 'ninja-build (>= 1.5)'
  87. 'gcc-mingw-w64-base'
  88. #'binutils-common'
  89. 'mingw-w64-common'
  90. 'binutils-mingw-w64-x86-64'
  91. 'binutils-mingw-w64-i686'
  92. 'mingw-w64-x86-64-dev'
  93. 'gcc-mingw-w64-x86-64'
  94. 'g++-mingw-w64-x86-64'
  95. 'mingw-w64-i686-dev'
  96. 'gcc-mingw-w64-i686'
  97. 'g++-mingw-w64-i686'
  98. )
  99. # Runtime dependencies
  100. pkg_deps_runtime=(
  101. 'wine'
  102. )
  103. # Extra fields for Debian control file Source section
  104. pkg_extra_1=(
  105. empty
  106. )
  107. # Extra fields for Debian control file Package section
  108. pkg_extra_2=(
  109. empty
  110. )
  111. ############################
  112. # Deb builder execution field
  113. # Exclude -z flag from LDFLAGS because it does not work with meson
  114. # Do not build either debug symbols or doc files
  115. 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"
  116. ########################################################
  117. # Contents of Debian control file
  118. # This is a necessary variable setting for array loops below
  119. IFS=$'\n'
  120. pkg_debcontrol="\
  121. Source: ${pkg_name}
  122. Section: ${pkg_section}
  123. Priority: ${pkg_priority}
  124. Maintainer: ${pkg_maintainer}
  125. Build-Depends: debhelper (>=9), $(if [[ ${pkg_deps_build[0]} != "empty" ]]; then \
  126. for w in ${pkg_deps_build[@]}; do printf '%s, ' ${w}; done; fi)
  127. Standards-Version: 4.1.3
  128. Homepage: ${pkg_homeurl}
  129. $(if [[ ${pkg_extra_1[0]} != "empty" ]]; then for w in ${pkg_extra_1[@]}; do echo ${w}; done ; fi)
  130. Package: ${pkg_name}
  131. Architecture: ${pkg_arch}
  132. Depends: \${shlibs:Depends}, \${misc:Depends}, $(if [[ ${pkg_deps_runtime[0]} != "empty" ]]; then \
  133. for w in ${pkg_deps_runtime[@]}; do printf '%s, ' ${w}; done; fi)
  134. Description: ${pkg_commondesc}
  135. $(echo -e ${pkg_longdesc} | sed 's/^/ /g; s/\n/\n /g')
  136. $(if [[ ${pkg_extra_2[0]} != "empty" ]]; then for w in ${pkg_extra_2[@]}; do echo ${w}; done ; fi)
  137. $(if [[ ${pkg_suggests[0]} != "empty" ]]; then echo "Suggests: $(echo ${_kg_suggests[*]} | sed 's/\s/, /g')"; fi)
  138. $(if [[ ${pkg_conflicts[0]} != "empty" ]]; then echo "Conflicts: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
  139. $(if [[ ${pkg_breaks[0]} != "empty" ]]; then echo "Breaks: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
  140. $(if [[ ${pkg_replaces[0]} != "empty" ]]; then echo "Replaces: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
  141. $(if [[ ${pkg_provides[0]} != "empty" ]]; then echo "Provides: $(echo ${pkg_overrides[*]} | sed 's/\s/, /g')"; fi)
  142. "
  143. unset IFS