blob: 4d362064b1eb38d7673327dc718f70fdb515e587 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Maintainer: begin-theadventure <begin-thecontact.ncncb at dralias dot com>
_pkgname=crossover-overlay
_pkgname2=crossoverlay
pkgname=$_pkgname-bin
pkgver=3.3.4
pkgrel=3
pkgdesc="🎯 A Crosshair Overlay for any screen (binary release, system Electron)"
arch=('x86_64' 'i686')
url="https://github.com/lacymorrow/crossover"
license=('CC-BY-SA-4.0')
arch=('x86_64' 'i686')
depends=('at-spi2-core' 'electron' 'gtk3' 'libnotify' 'libsecret' 'libxss' 'libxtst'
'nss' 'util-linux-libs' 'xdg-utils')
optdepends=('libappindicator-gtk3')
provides=("$_pkgname")
conflicts=("$_pkgname")
_desktop=$_pkgname2.desktop
source_x86_64=("$url/releases/download/v$pkgver/CrossOver-$pkgver-x86_64.rpm")
source_i686=("$url/releases/download/v$pkgver/CrossOver-$pkgver-i686.rpm ")
sha256sums_x86_64=('d83a2d7ec5bcdf253ab22210159e2bd353ef7ba9e03efa6e4b841b5facb2b933')
sha256sums_i686=('SKIP')
prepare() {
# Create an exec file
echo -e "#!/bin/sh\n\
export ELECTRON_IS_DEV=0\n\
cd /usr/lib/$_pkgname2\n\
exec electron /usr/lib/$_pkgname2/app.asar \$@" > $_pkgname2
# Edit the shortcut
mv usr/share/applications/crossover.desktop $_desktop
chmod 644 $_desktop
sed -i -E "s|Exec=/opt/CrossOver/crossover %U|Exec=$_pkgname2|g" $_desktop
sed -i -E "s|Icon=crossover|Icon=$_pkgname2|g" $_desktop
# Remove unnecessary files
cd opt/CrossOver/resources
rm app-update.yml package-type
}
package() {
# Create a folder
mkdir -p "$pkgdir/usr/lib/$_pkgname2"
# Install
install -Dm644 $_desktop -t "$pkgdir/usr/share/applications"
install -Dm644 usr/share/icons/hicolor/0x0/apps/crossover.png "$pkgdir/usr/share/pixmaps/$_pkgname2.png"
install -Dm755 $_pkgname2 -t "$pkgdir/usr/bin"
mv opt/CrossOver/resources/* "$pkgdir/usr/lib/$_pkgname2"
}
|