Advertisement
Guest User

Untitled

a guest
Dec 5th, 2017
617
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.74 KB | None | 0 0
  1. # Maintainer: Erik Fleischer <erik [at] erlenweg [dot] de>
  2. # Contributor: Cian Mc Govern <cian [at] cianmcgovern [dot] com>
  3. # Contributor: Roland Singer <roland [at] manjaro [dot] org>
  4. # Contributor: TheBenj <thebenj88 [at] gmail [dot] com>
  5. # Contributor: Philipp 'TamCore' B. <philipp [at] tamcore [dot] eu>
  6.  
  7. pkgname=crossover
  8. pkgver=17.0.0
  9. pkgrel=1
  10. _pkgdebrel=1
  11. pkgdesc="Run Windows Programs on Linux"
  12. arch=('i686' 'x86_64')
  13. url="http://www.codeweavers.com"
  14. license=('custom:CrossOver Linux License Grant')
  15. makedepends=('tar')
  16. install=${pkgname}.install
  17. replaces=('crossover-games' 'crossover-pro' 'crossover-standard')
  18.  
  19. source=("http://media.codeweavers.com/pub/${pkgname}/cxlinux/demo/${pkgname}_${pkgver}-${_pkgdebrel}.deb")
  20. sha256sums=('ce92a39b26ca4161d59f453ecb216678385d4df3c00cab2f2de7c4b74efaba6e')
  21.  
  22. depends=(
  23. 'python2' 'desktop-file-utils' 'pygtk' 'python2-dbus'
  24. )
  25.  
  26. optdepends=(
  27. 'unzip: required to install Guild Wars, automatic installer extraction'
  28. )
  29.  
  30. depends_i686=(
  31. 'glibc>=2.11' 'libice' 'libsm' 'libx11' 'libxext' 'libxi' 'freetype2'
  32. 'libpng' 'zlib' 'lcms2' 'libgl' 'libxcursor' 'libxrandr' 'glu'
  33. )
  34.  
  35. optdepends_i686=(
  36. 'alsa-lib: This is the preferred way to provide audio support to Windows applications.'
  37. "fontconfig: Makes it possible to find and use the system's TrueType fonts. This is strongly recommended for office-type applications."
  38. 'gnutls: This is needed by applications that perform encryption or check online certificates.'
  39. 'gsm: Lets Windows applications use the GSM codec for audio compression and decompression.'
  40. 'gstreamer0.10: This is needed by some games and multimedia applications.'
  41. 'gstreamer0.10-base: This is needed by some games and multimedia applications.'
  42. 'isdn4k-utils: (libcapi)Provides support for some ISDN cards. Very few applications need this.'
  43. 'libcups: Needed to print to printers managed by the CUPS system, which is most likely the case. It is strongly recommended for office-type applications.'
  44. 'libdbus: This is needed for Windows applications to automatically detect CD-ROM and USB key insertion.'
  45. 'libexif: Some applications need to parse EXIF and read their data tags.'
  46. 'libgphoto2: Lets Windows applications access digital cameras.'
  47. 'libldap: Lets Windows applications access LDAP servers.'
  48. 'libpulse: A featureful, general-purpose sound server (client library).'
  49. 'libxcomposite: This is needed for most CAD-like applications and some games.'
  50. "libxinerama: This is needed if your display spans multiple screens. If your computer has a single screen then you don't need it."
  51. 'libxml2: This library makes it possible for Windows applications read and write XML files.'
  52. 'libxslt: This library lets Windows applications perform queries and transformations on XML files.'
  53. 'libxxf86vm: This is needed to let games perform some gamma adjustments (essentially to adjust the brightness).'
  54. 'libxxf86dga: X11 Direct Graphics Access extension library.'
  55. 'mpg123: Needed by some Windows applications to play MP3 files.'
  56. 'nss-mdns: Host name resolution via mDNS'
  57. 'ocl-icd: OpenCL ICD Bindings'
  58. 'openal: Provides audio support to Windows applications.'
  59. 'openssl: This library provides support for secure Internet communication.'
  60. 'sane: Lets Windows applications access scanners.'
  61. 'v4l-utils: Lets Windows applications access video devices.'
  62. )
  63.  
  64. depends_x86_64=(
  65. 'lib32-glibc>=2.11' 'lib32-libice' 'lib32-libsm' 'lib32-libx11'
  66. 'lib32-libxext' 'lib32-libxi' 'lib32-freetype2' 'lib32-libpng' 'lib32-zlib'
  67. 'lib32-lcms2' 'lib32-libgl' 'lib32-libxcursor' 'lib32-libxrandr'
  68. 'lib32-glu'
  69. )
  70.  
  71. optdepends_x86_64=(
  72. 'lib32-alsa-lib: This is the preferred way to provide audio support to Windows applications.'
  73. "lib32-fontconfig: Makes it possible to find and use the system's TrueType fonts. This is strongly recommended for office-type applications."
  74. 'lib32-libcups: Needed to print to printers managed by the CUPS system, which is most likely the case. It is strongly recommended for office-type applications.'
  75. 'lib32-libdbus: This is needed for Windows applications to automatically detect CD-ROM and USB key insertion.'
  76. 'lib32-libexif: (aur) Some applications need to parse EXIF and read their data tags.'
  77. 'lib32-libldap: Lets Windows applications access LDAP servers.'
  78. 'lib32-libpulse: A featureful, general-purpose sound server (client library).'
  79. 'lib32-gnutls: This is needed by applications that perform encryption or check online certificates.'
  80. 'lib32-gsm: (aur) Lets Windows applications use the GSM codec for audio compression and decompression.'
  81. 'lib32-gstreamer0.10: (aur) This is needed by some games and multimedia applications.'
  82. 'lib32-gstreamer0.10-base: (aur) This is needed by some games and multimedia applications.'
  83. 'lib32-libxcomposite: This is needed for most CAD-like applications and some games.'
  84. "lib32-libxinerama: This is needed if your display spans multiple screens. If your computer has a single screen then you don't need it."
  85. 'lib32-libxml2: This library makes it possible for Windows applications read and write XML files.'
  86. 'lib32-libxslt: This library lets Windows applications perform queries and transformations on XML files.'
  87. 'lib32-libxxf86vm: This is needed to let games perform some gamma adjustments (essentially to adjust the brightness).'
  88. 'lib32-libxxf86dga: X11 Direct Graphics Access extension library.'
  89. 'lib32-mpg123: Needed by some Windows applications to play MP3 files.'
  90. 'lib32-nss-mdns: (aur) host name resolution via mDNS'
  91. 'lib32-openal: Provides audio support to Windows applications.'
  92. 'lib32-openssl: This library provides support for secure Internet communication.'
  93. 'lib32-v4l-utils: Lets Windows applications access video devices.'
  94. )
  95.  
  96. package() {
  97. cd ${srcdir}
  98.  
  99. ar -p crossover_${pkgver}-${_pkgdebrel}.deb data.tar.xz | tar Jxf - -C "${pkgdir}" || return 1
  100. if [[ "${CARCH}" = 'i686' ]]; then
  101. rm -f ${pkgdir}/opt/cxoffice/lib/nsplugin-linux64.so
  102. fi
  103.  
  104. #remove symlink and create real directory
  105. rm ${pkgdir}/opt/cxoffice/doc
  106. mkdir ${pkgdir}/opt/cxoffice/doc
  107.  
  108. mv ${pkgdir}/usr/share/doc/crossover/* ${pkgdir}/opt/cxoffice/doc
  109.  
  110. rm -r "${pkgdir}/usr"
  111. sed -e 's!;;"MenuRoot" = ""!"MenuRoot" = "Windows Games"!' \
  112. -e 's!;;"MenuStrip" = ""!"MenuStrip" = "1"!' \
  113. -i ${pkgdir}/opt/cxoffice/share/crossover/bottle_data/cxbottle.conf
  114.  
  115. mkdir -p ${pkgdir}/usr/bin
  116. ln -s /opt/cxoffice/bin/crossover ${pkgdir}/usr/bin/crossover
  117. ln -s /opt/cxoffice/bin/cxsetup ${pkgdir}/usr/bin/cxsetup
  118.  
  119. mkdir -p ${pkgdir}/etc/profile.d
  120. echo '[ -d /opt/cxoffice/bin ] && export PATH="${PATH}:/opt/cxoffice/bin"' > ${pkgdir}/etc/profile.d/cxoffice.sh
  121. echo '[ -d /opt/cxoffice/bin ] && setenv PATH ${PATH}:/opt/cxoffice/bin' > ${pkgdir}/etc/profile.d/cxoffice.csh
  122. chmod 755 ${pkgdir}/etc/profile.d/cxoffice.sh ${pkgdir}/etc/profile.d/cxoffice.csh
  123.  
  124. # Fix Auto update error
  125. install -m 644 -D ${pkgdir}/opt/cxoffice/share/crossover/data/cxoffice.conf ${pkgdir}/opt/cxoffice/etc/cxoffice.conf
  126. sed -e 's!;;"PrivateShortcutDirs" = ""!"PrivateShortcutDirs" = "${HOME}/bin:${CX_ROOT}/bin"!' \
  127. -e 's!;;"PrivateLinuxNSPluginDirs" = ""!"PrivateLinuxNSPluginDirs" = "${MOZ_PLUGIN_PATH}"!' \
  128. -e 's!;;"PrivateLinux64NSPluginDirs" = ""!"PrivateLinux64NSPluginDirs" = "${MOZ_PLUGIN_PATH}"!' \
  129. -e 's!;;"ProductPackage" = ""!"ProductPackage" = "Converted from .deb to pacman."!' \
  130. -i ${pkgdir}/opt/cxoffice/etc/cxoffice.conf
  131.  
  132. # place license in correct directory
  133. install -D -m644 ${pkgdir}/opt/cxoffice/doc/license.txt.gz ${pkgdir}/usr/share/licenses/${pkgname}/license.txt.gz
  134. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement