blob: 6409329a51f57e6d4a3148c6e6dc5865f3ac580f (
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
49
50
51
52
53
54
55
56
|
# Maintainer: Oscar Morante <oscar@mooistudios.com>
pkgname=unityhub
pkgver=2.1.1
pkgrel=1
pkgdesc="The Unity Hub is a standalone application that streamlines the way you find, download, and manage your Unity Projects and installations."
arch=('x86_64')
license=('custom')
depends=('gtk2' 'nss' 'p7zip' 'tar' 'gzip' 'cpio' 'zip' 'libxss' 'gconf' 'libxtst')
source=("${pkgname}-${pkgver}.AppImage::https://public-cdn.cloud.unity3d.com/hub/prod/UnityHub.AppImage")
md5sums=('012c855e84965e5fb3d52a36677ccfdf')
PKGEXT='.pkg.tar'
package() {
# Extract AppImage
chmod +x "${pkgname}-${pkgver}.AppImage"
"./${pkgname}-${pkgver}.AppImage" --appimage-extract
# Patch desktop file
_df="${srcdir}/squashfs-root/unityhub.desktop"
sed -i "/^Exec=/cExec=unityhub" "${_df}"
sed -i "s/^X-AppImage-Version=/Version=/" "${_df}"
sed -i "/^X-AppImage/d" "${_df}"
# Install
install -d "${pkgdir}/usr/share"
install -D ${_df} "${pkgdir}/usr/share/applications/unityhub.desktop"
install -D "${srcdir}/squashfs-root/usr/share/icons/hicolor/48x48/apps/unityhub.png" \
"${pkgdir}/usr/share/pixmaps/unityhub.png"
install -d "${pkgdir}/usr/share/licenses/${pkgname}"
cp --no-preserve=all \
"${srcdir}/squashfs-root/eula.txt" \
"${srcdir}"/squashfs-root/LICENSE* \
"${pkgdir}/usr/share/licenses/${pkgname}"
rm -r "${srcdir}/squashfs-root/AppRun" \
"${srcdir}/squashfs-root/unityhub.desktop" \
"${srcdir}/squashfs-root/usr/share" \
"${srcdir}/squashfs-root/eula.txt" \
"${srcdir}"/squashfs-root/LICENSE*
install -d "${pkgdir}/opt/${pkgname}"
cp -r --no-preserve=all ${srcdir}/squashfs-root/* ${pkgdir}/opt/${pkgname}
install -d "${pkgdir}/usr/bin"
ln -s "/opt/${pkgname}/unityhub" "${pkgdir}/usr/bin/unityhub"
chmod +x "${pkgdir}/opt/${pkgname}/unityhub"
# Fix 7z permissions
chmod +x "${pkgdir}/opt/${pkgname}/resources" \
"${pkgdir}/opt/${pkgname}/resources/app.asar.unpacked" \
"${pkgdir}/opt/${pkgname}/resources/app.asar.unpacked/lib/linux" \
"${pkgdir}/opt/${pkgname}/resources/app.asar.unpacked/lib/linux/7z" \
"${pkgdir}/opt/${pkgname}/resources/app.asar.unpacked/lib/linux/7z/linux64" \
"${pkgdir}/opt/${pkgname}/resources/app.asar.unpacked/lib/linux/7z/linux64/7z"
}
|