diff options
author | Alexandre Teles | 2018-09-09 22:58:36 -0300 |
---|---|---|
committer | Alexandre Teles | 2018-09-09 22:58:36 -0300 |
commit | 2d4cd7bacb37c05730a7079774c0302ba18f7ad5 (patch) | |
tree | 5224edcebd99151e836f9e285471e3628f24053e | |
parent | 4355ffa728347a3f2e9e6a5392383a47a44ce6bc (diff) | |
download | aur-2d4cd7bacb37c05730a7079774c0302ba18f7ad5.tar.gz |
new pkg
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 155 | ||||
-rw-r--r-- | deepin-crossover.install | 67 |
3 files changed, 203 insertions, 39 deletions
@@ -1,16 +1,22 @@ pkgbase = deepin-crossover - pkgdesc = Deepin CrossOver. - pkgver = 0.5.14 + pkgdesc = Run Windows Programs on Linux (contains the Deepin OS license information) + pkgver = 16.0.6 pkgrel = 1 + provides = crossover-deepin + provides = crossover + conflicts = crossover url = https://www.codeweavers.com/ arch = i686 arch = x86_64 - license = unknown + license = CrossOver Linux License Grant makedepends = tar - depends = lib32-libx11 - noextract = deepin-crossover_0.5.14_i386.deb - source = https://mirrors.ustc.edu.cn/deepin/pool/non-free/d/deepin-crossover/deepin-crossover_0.5.14_i386.deb - md5sums = c5f59fd1d4ed2b1df597e0d4290fbbaf + depends = python2 + depends = desktop-file-utils + depends = pygtk + depends = python2-dbus + noextract = crossover-deepin_16.0.6-1_i386.deb + source = http://mirrors.deepin.com/deepin/pool/non-free/c/crossover-deepin/crossover-deepin_16.0.6-1_i386.deb + sha256sums = c5f59fd1d4ed2b1df597e0d4290fbbaf pkgname = deepin-crossover @@ -1,39 +1,130 @@ -# Maintainer: Bruce Zhang <zttt183525594@gmail.com> +# Maintainer: Alexandre Teles <ateles.1@gmail.com> pkgname=deepin-crossover -pkgver=0.5.14 +provides=('crossover-deepin' 'crossover') +pkgver=16.0.6 pkgrel=1 -epoch= -pkgdesc="Deepin CrossOver." +_pkgdebrel=1 +pkgdesc="Run Windows Programs on Linux (contains the Deepin OS license information)" arch=('i686' 'x86_64') url="https://www.codeweavers.com/" -license=('unknown') -groups=() -depends=('lib32-libx11') -makedepends=('tar') -checkdepends=() -optdepends=() -provides=() -conflicts=() -replaces=() -backup=() -options=() -install= -changelog= -source=("https://mirrors.ustc.edu.cn/deepin/pool/non-free/d/${pkgname}/${pkgname}_${pkgver}_i386.deb") -noextract=("${pkgname}_${pkgver}_i386.deb") -md5sums=('c5f59fd1d4ed2b1df597e0d4290fbbaf') -validpgpkeys=() - -prepare() { - ar -x ${pkgname}_${pkgver}_i386.deb - mkdir ${pkgname}-${pkgver} - tar -xf data.tar.xz --directory="${pkgname}-${pkgver}" - cd ${pkgname}-${pkgver} - mv ./lib ./usr/ - rm -rf ./lib -} +license=('custom:CrossOver Linux License Grant') +conflicts=(crossover) +install=${pkgname}.install + +source=("http://mirrors.deepin.com/deepin/pool/non-free/c/crossover-deepin/crossover-deepin_${pkgver}-${_pkgdebrel}_i386.deb") +noextract=("crossover-deepin_${pkgver}-${_pkgdebrel}_i386.deb") +sha256sums=('a3cbec7ad524cf87acf9b880b1134821bca5c36b14dd8151dbe9041d7e0c10a6') + +depends=( + 'python2' 'desktop-file-utils' 'pygtk' 'python2-dbus' +) + +optdepends=( + 'unzip: required to install Guild Wars, automatic installer extraction' +) + +depends_i686=( + 'glibc>=2.11' 'libice' 'libsm' 'libx11' 'libxext' 'libxi' 'freetype2' + 'libpng' 'zlib' 'lcms2' 'libgl' 'libxcursor' 'libxrandr' 'glu' +) + +optdepends_i686=( + 'alsa-lib: This is the preferred way to provide audio support to Windows applications.' + "fontconfig: Makes it possible to find and use the system's TrueType fonts. This is strongly recommended for office-type applications." + 'gnutls: This is needed by applications that perform encryption or check online certificates.' + 'gsm: Lets Windows applications use the GSM codec for audio compression and decompression.' + 'gstreamer0.10: This is needed by some games and multimedia applications.' + 'gstreamer0.10-base: This is needed by some games and multimedia applications.' + 'isdn4k-utils: (libcapi)Provides support for some ISDN cards. Very few applications need this.' + '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.' + 'libdbus: This is needed for Windows applications to automatically detect CD-ROM and USB key insertion.' + 'libexif: Some applications need to parse EXIF and read their data tags.' + 'libgphoto2: Lets Windows applications access digital cameras.' + 'libldap: Lets Windows applications access LDAP servers.' + 'libpulse: A featureful, general-purpose sound server (client library).' + 'libxcomposite: This is needed for most CAD-like applications and some games.' + "libxinerama: This is needed if your display spans multiple screens. If your computer has a single screen then you don't need it." + 'libxml2: This library makes it possible for Windows applications read and write XML files.' + 'libxslt: This library lets Windows applications perform queries and transformations on XML files.' + 'libxxf86vm: This is needed to let games perform some gamma adjustments (essentially to adjust the brightness).' + 'libxxf86dga: X11 Direct Graphics Access extension library.' + 'mpg123: Needed by some Windows applications to play MP3 files.' + 'nss-mdns: Host name resolution via mDNS' + 'ocl-icd: OpenCL ICD Bindings' + 'openal: Provides audio support to Windows applications.' + 'openssl: This library provides support for secure Internet communication.' + 'sane: Lets Windows applications access scanners.' + 'v4l-utils: Lets Windows applications access video devices.' +) + +depends_x86_64=( + 'lib32-glibc>=2.11' 'lib32-libice' 'lib32-libsm' 'lib32-libx11' + 'lib32-libxext' 'lib32-libxi' 'lib32-freetype2' 'lib32-libpng' 'lib32-zlib' + 'lib32-lcms2' 'lib32-libgl' 'lib32-libxcursor' 'lib32-libxrandr' + 'lib32-glu' +) + +optdepends_x86_64=( + 'lib32-alsa-lib: This is the preferred way to provide audio support to Windows applications.' + "lib32-fontconfig: Makes it possible to find and use the system's TrueType fonts. This is strongly recommended for office-type applications." + '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.' + 'lib32-libdbus: This is needed for Windows applications to automatically detect CD-ROM and USB key insertion.' + 'lib32-libexif: (aur) Some applications need to parse EXIF and read their data tags.' + 'lib32-libldap: Lets Windows applications access LDAP servers.' + 'lib32-libpulse: A featureful, general-purpose sound server (client library).' + 'lib32-gnutls: This is needed by applications that perform encryption or check online certificates.' + 'lib32-gsm: (aur) Lets Windows applications use the GSM codec for audio compression and decompression.' + 'lib32-gstreamer0.10: (aur) This is needed by some games and multimedia applications.' + 'lib32-gstreamer0.10-base: (aur) This is needed by some games and multimedia applications.' + 'lib32-libxcomposite: This is needed for most CAD-like applications and some games.' + "lib32-libxinerama: This is needed if your display spans multiple screens. If your computer has a single screen then you don't need it." + 'lib32-libxml2: This library makes it possible for Windows applications read and write XML files.' + 'lib32-libxslt: This library lets Windows applications perform queries and transformations on XML files.' + 'lib32-libxxf86vm: This is needed to let games perform some gamma adjustments (essentially to adjust the brightness).' + 'lib32-libxxf86dga: X11 Direct Graphics Access extension library.' + 'lib32-mpg123: Needed by some Windows applications to play MP3 files.' + 'lib32-nss-mdns: (aur) host name resolution via mDNS' + 'lib32-openal: Provides audio support to Windows applications.' + 'lib32-openssl: This library provides support for secure Internet communication.' + 'lib32-v4l-utils: Lets Windows applications access video devices.' +) package() { - cd "${pkgname}-${pkgver}" - cp -r ./ ${pkgdir}/ + cd ${srcdir} + + ar -p crossover-deepin_${pkgver}-${_pkgdebrel}_i386.deb data.tar.xz | tar Jxf - -C "${pkgdir}" || return 1 + if [[ "${CARCH}" = 'i686' ]]; then + rm -f ${pkgdir}/opt/cxoffice/lib/nsplugin-linux64.so + fi + + #remove symlink and create real directory + rm ${pkgdir}/opt/cxoffice/doc + mkdir ${pkgdir}/opt/cxoffice/doc + + mv ${pkgdir}/usr/share/doc/crossover-deepin/* ${pkgdir}/opt/cxoffice/doc + + rm -r "${pkgdir}/usr" + sed -e 's!;;"MenuRoot" = ""!"MenuRoot" = "Windows Games"!' \ + -e 's!;;"MenuStrip" = ""!"MenuStrip" = "1"!' \ + -i ${pkgdir}/opt/cxoffice/share/crossover/bottle_data/cxbottle.conf + + mkdir -p ${pkgdir}/usr/bin + ln -s /opt/cxoffice/bin/crossover ${pkgdir}/usr/bin/crossover + ln -s /opt/cxoffice/bin/cxsetup ${pkgdir}/usr/bin/cxsetup + + mkdir -p ${pkgdir}/etc/profile.d + echo '[ -d /opt/cxoffice/bin ] && export PATH="${PATH}:/opt/cxoffice/bin"' > ${pkgdir}/etc/profile.d/cxoffice.sh + echo '[ -d /opt/cxoffice/bin ] && setenv PATH ${PATH}:/opt/cxoffice/bin' > ${pkgdir}/etc/profile.d/cxoffice.csh + chmod 755 ${pkgdir}/etc/profile.d/cxoffice.sh ${pkgdir}/etc/profile.d/cxoffice.csh + + # Fix Auto update error + install -m 644 -D ${pkgdir}/opt/cxoffice/share/crossover/data/cxoffice.conf ${pkgdir}/opt/cxoffice/etc/cxoffice.conf + sed -e 's!;;"PrivateShortcutDirs" = ""!"PrivateShortcutDirs" = "${HOME}/bin:${CX_ROOT}/bin"!' \ + -e 's!;;"PrivateLinuxNSPluginDirs" = ""!"PrivateLinuxNSPluginDirs" = "${MOZ_PLUGIN_PATH}"!' \ + -e 's!;;"PrivateLinux64NSPluginDirs" = ""!"PrivateLinux64NSPluginDirs" = "${MOZ_PLUGIN_PATH}"!' \ + -e 's!;;"ProductPackage" = ""!"ProductPackage" = "Converted from .deb to pacman."!' \ + -i ${pkgdir}/opt/cxoffice/etc/cxoffice.conf + + # place license in correct directory + install -D -m644 ${pkgdir}/opt/cxoffice/doc/license.txt.gz ${pkgdir}/usr/share/licenses/${pkgname}/license.txt.gz } diff --git a/deepin-crossover.install b/deepin-crossover.install new file mode 100644 index 000000000000..a29918c4746c --- /dev/null +++ b/deepin-crossover.install @@ -0,0 +1,67 @@ +post_install() { + +echo "Updating wineserver link" + +CX_ROOT="/opt/cxoffice" +rm "$CX_ROOT/bin/wineserver" + +if "$CX_ROOT/bin/wineserver64" -v >/dev/null 2>/dev/null + then + ln -s wineserver64 "$CX_ROOT/bin/wineserver" + else + ln -s wineserver32 "$CX_ROOT/bin/wineserver" +fi + +echo "Creating menus and file associations, please wait..." + +/opt/cxoffice/bin/cxmenu --crossover --install +/opt/cxoffice/bin/cxassoc --crossover --install + +echo "Applying patches, please wait..." + +cd /opt/cxoffice/bin + +patch -p0 <<'EOF' +--- crossover 2018-09-09 19:57:41.000000000 -0300 ++++ crossover.edit 2018-09-09 22:35:05.050299884 -0300 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/env python2 + # (c) Copyright 2009-2015. CodeWeavers, Inc. + + import os +@@ -85,17 +85,6 @@ + import cxopt + + def main(): +- # Popup a warn when the user run CrossOver for Deepin in other distro +- result = os.popen("cat /etc/issue | grep Deepin").readlines() +- if not result: +- # pylint: disable=W0601 +- global GUI +- import crossover_deepin +- GUI = crossover_deepin.CrossOverDeepin() +- import gtk +- gtk.main() +- return 0 +- + # Parse the command line before we do anything that assumes $DISPLAY is set + # so we can handle --help and issue usage errors normally. + opt_parser = cxopt.Parser(usage="%prog [--help]", +EOF + echo "Done!" +} + +post_upgrade() { + post_install +} + +pre_remove() { + echo "Removing menus and file associations, please wait..." + + /opt/cxoffice/bin/cxmenu --crossover --uninstall + /opt/cxoffice/bin/cxassoc --crossover --uninstall + rm -f /usr/local/share/icons/hicolor/*x*/apps/cxmenu-*.png + + echo "Done!" +} |