summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Guilloux2019-11-09 14:20:10 +0100
committerNicolas Guilloux2019-11-09 14:20:10 +0100
commitd2cb41045e3641cf949d49e33169d1e57ed4d36f (patch)
tree108cc4531f2c6cefbf20a4d1bd81712ab790be7c
parent75a9fdf4891ae19a6e864de70d3663eff3470c6f (diff)
downloadaur-d2cb41045e3641cf949d49e33169d1e57ed4d36f.tar.gz
Add optdepends
-rw-r--r--.SRCINFO14
-rw-r--r--.gitignore5
-rw-r--r--Makefile30
-rw-r--r--PKGBUILD123
-rw-r--r--README.md2
-rw-r--r--parse_yaml.sh16
-rw-r--r--shadow-tech.install8
7 files changed, 137 insertions, 61 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ead81e27ac0d..666aa0f7c749 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = shadow-tech
- pkgdesc = Shadow launcher (stable version)
- pkgver = 4.7.10
+ pkgdesc = Shadow xxa application
+ pkgver = 5.0.226
pkgrel = 1
- url = http://shadow.tech
+ url = https://shadow.tech
install = shadow-tech.install
arch = x86_64
license = unknown
@@ -31,9 +31,13 @@ pkgbase = shadow-tech
depends = ttf-dejavu
depends = libxss
depends = libsndio-61-compat
+ depends = gnome-keyring
+ optdepends = libva-vdpau-driver-shadow-nvidia: Patch for recent Nvidia GPU
+ optdepends = nouveau-fw: Driver for old Nvidia GPU
+ optdepends = libva-intel-driver: Driver for Intel GPU
provides = shadow-tech
- source = https://update.shadow.tech/launcher/prod/linux/ubuntu_18.04/Shadow.zip
- md5sums = 2057d3656d67156d52b7fb3bf1f5abaa
+ source = shadow-tech-5.0.226-1.AppImage::https://update.shadow.tech/launcher/prod/linux/ubuntu_18.04/Shadow.AppImage
+ sha512sums = SKIP
pkgname = shadow-tech
diff --git a/.gitignore b/.gitignore
index 8acd7e8a3ee7..b36484a8f3e1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,10 @@
pkg/
src/
-shadowbeta.deb
+*.deb
*.pkg.tar
*.pkg.tar.xz
.directory
*.zip
+*.part
+*.AppImage
+*.yml
diff --git a/Makefile b/Makefile
index 783e75be1135..fc8a86f6d4de 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,33 @@
-help:
+version = 9add3366d25530d51d168608c54b5339b64d2a4e
+
+help:
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-10s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
-build:clear ## Build pakage
+build:clear ## Builds pakage
makepkg -s
-clear: ## Clear files
+clear: ## Clears files
rm -rf ./pkg
rm -rf ./src
+ rm -f ./*.deb
rm -f ./*.zip
- rm -f ./*.pkg.tar.xz
-
+ rm -f ./shadow-*.pkg.tar
+ rm -f ./shadow-*.pkg.tar.xz
+ rm -f ./*~
+ rm -f *.AppImage
+ rm -f *.yml
-install:build ## Install package with pacman
- sudo pacman -U shadow-beta-*.pkg.tar
+install:build ## Installs package with pacman
+ sudo pacman -U shadow-*.pkg.tar
-pkgsum: ## update pkgsum with updpkgsums
+pkgsum: ## Updates pkgsum with updpkgsums
updpkgsums
-srcinfo: ## génération .SRCINFO
+release:clear pkgsum srcinfo ## Release preparation
+ git pull
+
+sanity: ## Checkcwqing package sanity
+ namcap shadow-*.pkg.tar
+
+srcinfo: ## Generates .SRCINFO
makepkg --printsrcinfo > .SRCINFO
diff --git a/PKGBUILD b/PKGBUILD
index 060d1a0856fb..a5d42e75bd24 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,55 +4,104 @@
# Creator Blade <contact@blade-group.com>
# Made with https://github.com/NicolasGuilloux/blade-shadow-beta
-_commit=9add3366d25530d51d168608c54b5339b64d2a4e
-pkgname=shadow-tech
-pkgver=4.7.10
-pkgrel=1
-pkgdesc="Shadow launcher (stable version)"
-arch=('x86_64')
-url="http://shadow.tech"
-license=('unknown')
-depends=('desktop-file-utils' 'freetype2' 'libuv' 'gconf' 'hicolor-icon-theme' 'json-c' 'libappindicator-gtk2' 'libbsd' 'libcurl-gnutls' 'libdrm' 'libnotify' 'libva' 'libxtst' 'nss' 'opus' 'qt5-base' 'qt5-svg' 'sdl2' 'libappindicator' 'libcurl-compat' 'sdl' 'gcc7-libs' 'ttf-dejavu' 'libxss' 'libsndio-61-compat')
-provides=(shadow-tech)
-source=('https://update.shadow.tech/launcher/prod/linux/ubuntu_18.04/Shadow.zip')
-md5sums=('2057d3656d67156d52b7fb3bf1f5abaa')
-install=$pkgname.install
+
+# Import parse_yaml script
+. parse_yaml.sh
+
+# Get the info from the yaml
+info() {
+ if [ ! -f info.yml ]; then
+ curl -s "https://storage.googleapis.com/shadow-update/launcher/${basename}/linux/ubuntu_18.04/latest-linux.yml" -o info.yml
+ fi
+
+ eval $(parse_yaml info.yml "shadow_")
+}
+
+# Get the package version
+pkgver() {
+ info
+
+ echo "$shadow_version"
+}
+
+# Get the SHA512 checksum
+sha512sum() {
+ info
+
+ echo "$shadow_sha512"
+}
+
+file() {
+ echo "$pkgname-$pkgver-$pkgrel.AppImage"
+}
+
+# Extract the zip file and prepare for the build
+prepare() {
+ # Give execution rights
+ chmod +x $(file)
+
+ # Extract AppImage
+ ./$(file) --appimage-extract
+}
# Build the package
package() {
+ # Make the directories
+ mkdir -p "${pkgdir}/opt"
+
+ # Move directories
+ mv "${srcdir}/squashfs-root/usr" "${pkgdir}"
+ mv "${srcdir}/squashfs-root" "${pkgdir}/opt/${pkgname}"
- ### Create working folder
- mkdir shadow
+ # Move de icons
+ mv "${pkgdir}/usr/share/icons/hicolor/0x0/" "${pkgdir}/usr/share/icons/hicolor/1024x1024/"
- ### Extract zip file
- bsdtar -x -f Shadow.zip -C shadow
+ # Make a copy of the icons
+ cp "${pkgdir}/usr/share/icons/hicolor/1024x1024/apps/shadow.png" "${pkgdir}/usr/share/icons/"
- ### Extract the deb
- ar xv shadow/Shadow*.deb
+ # Fix rights
+ chmod -R g-w "${pkgdir}/usr"
+ chmod -R g-w "${pkgdir}/opt"
- ### Extract the data
- bsdtar xf data.tar.xz
+ # Create shortcut folder
+ mkdir "${pkgdir}/usr/share/applications"
- mv "${srcdir}/usr/share/icons/hicolor/0x0/" "${srcdir}/usr/share/icons/hicolor/1024x1024/"
- mv "${srcdir}/usr/share/icons/hicolor/1024x1024/apps/shadow.png" "${srcdir}/usr/share/icons/shadow.png"
+ # Move to shortcut directory
+ cd "${pkgdir}/usr/share/applications"
- chmod -R g-w usr
- mv usr "${pkgdir}"
+ mv "${pkgdir}/opt/${pkgname}/shadow.desktop" "${pkgname}.desktop"
+ sed -i -e 's/^Categories=.*$/Categories=Games;Game;Utility;Virtualization/g' ${pkgname}.desktop
+ sed -i -e "s/^Exec=.*$/Exec=\/opt\/${pkgname}\/shadow --no-sandbox/g" ${pkgname}.desktop
- chmod -R g-w opt
- mv opt "${pkgdir}"
+ chmod g-w ${pkgname}.desktop
- # Move to shortcut directory
- cd "${pkgdir}/usr/share/applications/"
+ # Create shortcut
+ mkdir -p "${pkgdir}/usr/bin"
+ ln -srf "../..//opt/${pkgname}/shadow" "${pkgdir}/usr/bin/{$pkgname}"
- sed -i -e 's/^Categories=.*$/Categories=Games;Game;Utility;Virtualization/g' shadow.desktop
- sed -i -e 's/^Icon=.*$/Icon=shadow.png/g' shadow.desktop
- sed -i -e 's/^Exec=.*$/& --no-sandbox/g' shadow.desktop
- mv shadow.desktop "$srcdir/shadow.desktop"
+ # Remove AppImage related files
+ rm "${pkgdir}/opt/${pkgname}/AppRun"
- # Move the source directory
- cd "$srcdir"
+ # Remove embedded libraries to avoid conflicts
+ rm -R "${pkgdir}/usr/lib"
- chmod g-w shadow.desktop
- mv shadow.desktop "${pkgdir}/usr/share/applications/shadow.desktop"
+ # Fix rights
+ chmod 755 -R "${pkgdir}"
}
+
+_commit=9add3366d25530d51d168608c54b5339b64d2a4e
+pkgname=shadow-tech
+basename=prod
+pkgver="$(pkgver)"
+pkgrel=1
+pkgdesc="Shadow xxa application"
+arch=('x86_64')
+url="https://shadow.tech"
+license=('unknown')
+depends=('desktop-file-utils' 'freetype2' 'libuv' 'gconf' 'hicolor-icon-theme' 'json-c' 'libappindicator-gtk2' 'libbsd' 'libcurl-gnutls' 'libdrm' 'libnotify' 'libva' 'libxtst' 'nss' 'opus' 'qt5-base' 'qt5-svg' 'sdl2' 'libappindicator' 'libcurl-compat' 'sdl' 'gcc7-libs' 'ttf-dejavu' 'libxss' 'libsndio-61-compat' 'gnome-keyring')
+optdepends=('libva-vdpau-driver-shadow-nvidia: Patch for recent Nvidia GPU' 'nouveau-fw: Driver for old Nvidia GPU' 'libva-intel-driver: Driver for Intel GPU')
+provides=(shadow-tech)
+source=("$(file)::https://update.shadow.tech/launcher/${basename}/linux/ubuntu_18.04/Shadow.AppImage")
+# sha512sums=("$(sha512sum))
+sha512sums=('SKIP')
+install=$pkgname.install
diff --git a/README.md b/README.md
index 5b23c9f22e75..194985f90580 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,6 @@ This PKBUILD and INSTALL file creates a package for Arch Linux distribution comp
This work is a support for the AUR package made by agentcobra#6142.
-To use it, download the files and go in this directory. Then, do a `makepkg` to build the package and finally, do `sudo pacman -U ./shadow-beta-*-x86_64.pkg.tar.xz` to install it.
+To use it, download the files and go in this directory. Then, do a `makepkg` to build the package and finally, do `sudo pacman -U ./shadow-tech-*-x86_64.pkg.tar.xz` to install it.
The only thing left for Arch users is to setup a valid VA-API installation.
diff --git a/parse_yaml.sh b/parse_yaml.sh
new file mode 100644
index 000000000000..4450daa5c161
--- /dev/null
+++ b/parse_yaml.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+parse_yaml() {
+ local prefix=$2
+ local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
+ sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
+ -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
+ awk -F$fs '{
+ indent = length($1)/2;
+ vname[indent] = $2;
+ for (i in vname) {if (i > indent) {delete vname[i]}}
+ if (length($3) > 0) {
+ vn=""; for (i=0; i<indent; i++) {vn=(vn)(vname[i])("_")}
+ printf("%s%s%s=\"%s\"\n", "'$prefix'",vn, $2, $3);
+ }
+ }'
+} \ No newline at end of file
diff --git a/shadow-tech.install b/shadow-tech.install
index 180055564bb1..698694b3e944 100644
--- a/shadow-tech.install
+++ b/shadow-tech.install
@@ -1,7 +1,3 @@
-post_install() {
- ln -sf '/opt/Shadow/shadow' '/usr/bin/shadow'
-}
-
post_remove() {
# Remove configuration
for user in `ls /home`
@@ -18,7 +14,3 @@ pre_upgrade(){
rm -r "/opt/Shadow"
fi
}
-
-post_upgrade(){
- post_install
-}