Advertisement
Guest User

Untitled

a guest
Aug 8th, 2014
418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.18 KB | None | 0 0
  1. # Contributor: Cian Mc Govern <cian@cianmcgovern.com>
  2. # Contributor: Roland Singer <roland@manjaro.org>
  3. # Contributor: TheBenj <thebenj88 *AT* gmail *DOT* com>
  4. # Contributor: Philipp 'TamCore' B. <philipp [at] tamcore [dot] eu>
  5. # Maintainer: William Overstreet <william.ab.overstreet@gmail.com>
  6.  
  7. pkgname=crossover
  8. pkgver=13.2.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')
  15. changelog="CHANGELOG"
  16. makedepends=('tar')
  17. install=${pkgname}.install
  18. replaces=('crossover-games' 'crossover-pro' 'crossover-standard')
  19. depends=('python' 'alsa-lib' 'libsm' 'libxext' 'libxrandr' 'libice' 'pygtk'
  20. 'desktop-file-utils' 'fontconfig' 'libxcursor' 'libxdamage'
  21. 'libxxf86dga' 'mesa' 'libpng12' 'libjpeg' 'libcups' 'python2-dbus' 'glibc'
  22. 'libx11' 'zlib' 'dbus' 'gnutls' 'gstreamer0.10-base-plugins'
  23. 'gstreamer0.10-base' 'gstreamer0.10' 'libldap' 'openal' 'mpg123'
  24. 'libxcomposite' 'libxrender' 'libxslt' 'liblcms' )
  25.  
  26. optdepends=(
  27. 'libxi: enables joystick and tablet support'
  28. 'libxinerama: enables spanning multiple screens'
  29. 'openssl: support for secure Internet communication'
  30. 'libxxf86vm: perform gamma adjustments'
  31. 'unzip: required to install Guild Wars, automatic installer extraction'
  32. 'sane: support for scanners'
  33. 'v4l-utils: video recording'
  34. )
  35. source=("http://media.codeweavers.com/pub/${pkgname}/cxlinux/demo/${pkgname}_${pkgver}-${_pkgdebrel}.deb")
  36. sha256sums=('d9718d1ee9654c4a4bdd58905e44ce7efa03adfac5939f7664496478aaf3f311')
  37.  
  38. if [ "$CARCH" == "x86_64" ]; then
  39. depends=('python' 'fontconfig' 'desktop-file-utils' 'alsa-lib'
  40. 'lib32-alsa-lib' 'lib32-fontconfig' 'lib32-libxcursor' 'libxxf86dga'
  41. 'libxrandr' 'libxdamage' 'lib32-libxdamage' 'mesa' 'lib32-mesa'
  42. 'lib32-glibc' 'libxcursor' 'lib32-libsm' 'lib32-libxext' 'lib32-zlib'
  43. 'lib32-gcc-libs' 'lib32-libxrandr' 'lib32-libice' 'lib32-util-linux'
  44. 'lib32-e2fsprogs' 'pygtk' 'lib32-lcms' 'lib32-lcms2' 'lib32-libpng12'
  45. 'lib32-libjpeg' 'lib32-libcups' 'libcups' 'python2-dbus' 'lib32-libx11' 'zlib'
  46. 'lib32-libdbus' 'dbus' 'lib32-gnutls' 'gstreamer0.10' 'libldap'
  47. 'lib32-gstreamer0.10-base-plugins' 'lib32-gstreamer0.10-base'
  48. 'lib32-gstreamer0.10' 'gstreamer0.10-base-plugins' 'openal'
  49. 'gstreamer0.10-base' 'lib32-libldap' 'libldap' 'lib32-openal' 'mpg123'
  50. 'lib32-mpg123' 'lib32-libxcomposite' 'libxcomposite' 'libxrender'
  51. 'lib32-libxrender' 'libxslt' 'lib32-libxslt'
  52. )
  53.  
  54. optdepends=('lib32-nvidia-utils: enables 3D under nvidia cards'
  55. 'lib32-catalyst-utils: enables 3D under ati cards'
  56. 'lib32-libxinerama: enables spanning multiple screens'
  57. 'lib32-openssl: support for secure Internet communication'
  58. 'lib32-libxxf86vm: perform gamma adjustments'
  59. 'lib32-libxi: enables joystick and tablet support'
  60. 'unzip: required to install Guild Wars, automatic installer extraction'
  61. 'lib32-sane: (aur) support for scanners'
  62. 'lib32-v4l-utils: video recording'
  63. )
  64. fi
  65.  
  66. package() {
  67. cd ${srcdir}
  68.  
  69. ar -p crossover_${pkgver}-${_pkgdebrel}.deb data.tar.gz | tar zxf - -C "${pkgdir}" || return 1
  70. if [ $CARCH = 'i686' ] ; then
  71. rm -fr ${pkgdir}/opt/cxoffice/lib/nsplugin-linux64.so
  72. fi
  73.  
  74. #remove symlink and create real directory
  75. rm ${pkgdir}/opt/cxoffice/doc
  76. mkdir ${pkgdir}/opt/cxoffice/doc
  77.  
  78. mv ${pkgdir}/usr/share/doc/crossover/* ${pkgdir}/opt/cxoffice/doc
  79.  
  80. gzip -d "${pkgdir}/opt/cxoffice/doc/license.txt.gz"
  81. rm "${pkgdir}/usr" -r
  82. sed -i -e 's!;;"MenuRoot" = ""!"MenuRoot" = "Windows Games"!' \
  83. -e 's!;;"MenuStrip" = ""!"MenuStrip" = "1"!' \
  84. ${pkgdir}/opt/cxoffice/share/crossover/bottle_data/cxbottle.conf
  85.  
  86. mkdir -p ${pkgdir}/usr/bin
  87. ln -s /opt/cxoffice/bin/wine ${pkgdir}/usr/bin/crossover
  88. ln -s /opt/cxoffice/bin/cxsetup ${pkgdir}/usr/bin/cxsetup
  89.  
  90. mkdir -p ${pkgdir}/etc/profile.d
  91. echo '[ -d /opt/cxoffice/bin ] && export PATH="${PATH}:/opt/cxoffice/bin"' > ${pkgdir}/etc/profile.d/cxoffice.sh
  92. echo '[ -d /opt/cxoffice/bin ] && setenv PATH ${PATH}:/opt/cxoffice/bin' > ${pkgdir}/etc/profile.d/cxoffice.csh
  93. chmod 755 ${pkgdir}/etc/profile.d/cxoffice.sh ${pkgdir}/etc/profile.d/cxoffice.csh
  94.  
  95. # Fix Auto update error
  96. install -m 644 -D ${pkgdir}/opt/cxoffice/share/crossover/data/cxoffice.conf ${pkgdir}/opt/cxoffice/etc/cxoffice.conf
  97. sed -i -e 's!;;"PrivateShortcutDirs" = ""!"PrivateShortcutDirs" = "${HOME}/bin:${CX_ROOT}/bin"!' \
  98. -e 's!;;"PrivateLinuxNSPluginDirs" = ""!"PrivateLinuxNSPluginDirs" = "${MOZ_PLUGIN_PATH}"!' \
  99. -e 's!;;"PrivateLinux64NSPluginDirs" = ""!"PrivateLinux64NSPluginDirs" = "${MOZ_PLUGIN_PATH}"!' \
  100. -e 's!;;"ProductPackage" = ""!"ProductPackage" = "Converted from .deb to pacman."!' \
  101. ${pkgdir}/opt/cxoffice/etc/cxoffice.conf
  102.  
  103. # Changelog for pacman -Qc
  104. gzip -dfc ${pkgdir}/opt/cxoffice/doc/changelog.gz > ${startdir}/CHANGELOG
  105.  
  106. # place license in correct directory
  107. install -D -m644 ${pkgdir}/opt/cxoffice/doc/license.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
  108. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement