Add PKGBUILD for AGS for arch(based) distros

This commit is contained in:
clsty
2024-06-16 22:01:01 +08:00
parent 430a322c2c
commit 04cc988e5c
8 changed files with 113 additions and 49 deletions
@@ -0,0 +1,36 @@
pkgbase = ii-aylurs-gtk-shell-git
pkgdesc = Aylurs's Gtk Shell (AGS), version fixed for illogical-impulse dotfiles
pkgver = 1.8.2.r2.g1115022
pkgrel = 1
url = https://github.com/Aylur/ags
arch = x86_64
license = GPL3
makedepends = git
makedepends = gobject-introspection
makedepends = meson
makedepends = npm
makedepends = typescript
depends = gjs
depends = glib2
depends = glib2-devel
depends = glibc
depends = gtk3
depends = gtk-layer-shell
depends = libpulse
depends = pam
optdepends = gnome-bluetooth-3.0: required for bluetooth service
optdepends = greetd: required for greetd service
optdepends = libdbusmenu-gtk3: required for systemtray service
optdepends = libsoup3: required for the Utils.fetch feature
optdepends = libnotify: required for sending notifications
optdepends = networkmanager: required for network service
optdepends = power-profiles-daemon: required for powerprofiles service
optdepends = upower: required for battery service
conflicts = aylurs-gtk-shell
backup = etc/pam.d/ags
source = git+https://github.com/Aylur/ags
source = git+https://gitlab.gnome.org/GNOME/libgnome-volume-control
sha256sums = SKIP
sha256sums = SKIP
pkgname = aylurs-gtk-shell-git
@@ -0,0 +1,50 @@
# Copied from AUR package maintained by kotontrion <kotontrion@tutanota.de>
pkgname=illogical-impulse-ags
_pkgname=ags
pkgver=r525.05e0f23
pkgrel=1
pkgdesc="Aylurs's Gtk Shell (AGS), version fixed for illogical-impulse dotfiles."
arch=('x86_64')
url="https://github.com/Aylur/ags"
license=('GPL3')
makedepends=('git' 'gobject-introspection' 'meson' 'npm' 'typescript')
depends=('gjs' 'glib2' 'glib2-devel' 'glibc' 'gtk3' 'gtk-layer-shell' 'libpulse' 'pam')
optdepends=('gnome-bluetooth-3.0: required for bluetooth service'
'greetd: required for greetd service'
'libdbusmenu-gtk3: required for systemtray service'
'libsoup3: required for the Utils.fetch feature'
'libnotify: required for sending notifications'
'networkmanager: required for network service'
'power-profiles-daemon: required for powerprofiles service'
'upower: required for battery service')
conflicts=('aylurs-gtk-shell' 'aylurs-gtk-shell-git')
backup=('etc/pam.d/ags')
source=("git+${url}.git#commit=05e0f23534fa30c1db2a142664ee8f71e38db260"
"git+https://gitlab.gnome.org/GNOME/libgnome-volume-control")
sha256sums=('SKIP'
'SKIP')
pkgver(){
cd $srcdir/$_pkgname
printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd $srcdir/$_pkgname
git submodule init
git config submodule.subprojects/gvc.url "$srcdir/libgnome-volume-control"
git -c protocol.file.allow=always submodule update
}
build() {
cd $srcdir/$_pkgname
npm install
arch-meson build --libdir "lib/$_pkgname" -Dbuild_types=true
meson compile -C build
}
package() {
cd $srcdir/$_pkgname
meson install -C build --destdir "$pkgdir"
ln -sf /usr/share/com.github.Aylur.ags/com.github.Aylur.ags ${pkgdir}/usr/bin/ags
}
+7 -14
View File
@@ -127,7 +127,7 @@ install-local-pkgbuild() {
}
# Install core dependencies from the meta-packages
metapkgs=(./arch-packages/illogical-impulse-{audio,backlight,basic,fonts-themes,gnome,gtk,microtex,portal,python,screencapture,widgets})
metapkgs=(./arch-packages/illogical-impulse-{audio,backlight,basic,ags,fonts-themes,gnome,gtk,microtex,portal,python,screencapture,widgets})
for i in "${metapkgs[@]}"; do
metainstallflags="--needed"
@@ -189,19 +189,6 @@ v systemctl --user enable ydotool --now
printf "\e[36m[$0]: 2. Installing parts from source repo\e[0m\n"
sleep 1
case $SKIP_AGS in
true) sleep 0;;
*)
if command -v ags >/dev/null 2>&1;then
echo -e "\e[33m[$0]: Command \"ags\" already exists, no need to install.\e[0m"
echo -e "\e[34mYou can reinstall it in order to update to the latest version anyway.\e[0m"
ask_ags=$ask
else ask_ags=true
fi
if $ask_ags;then showfun install-ags;v install-ags;fi
;;
esac
if $(fc-list|grep -q Rubik); then
echo -e "\e[33m[$0]: Font \"Rubik\" already exists, no need to install.\e[0m"
echo -e "\e[34mYou can reinstall it in order to update to the latest version anyway.\e[0m"
@@ -331,6 +318,9 @@ try hyprctl reload
existed_zsh_conf=n
grep -q 'source ${XDG_CONFIG_HOME:-~/.config}/zshrc.d/dots-hyprland.zsh' ~/.zshrc && existed_zsh_conf=y
existed_ags_localbin=n
test -f /usr/local/bin/ags && existed_ags_localbin=y
#####################################################################################
printf "\e[36m[$0]: Finished. See the \"Import Manually\" folder and grab anything you need.\e[0m\n"
printf "\n"
@@ -352,3 +342,6 @@ case $existed_hypr_conf in
printf "\e[33mPlease use \"$XDG_CONFIG_HOME/hypr/hyprland.conf.new\" as a reference for a proper format.\e[0m\n"
printf "\e[33mIf this is your first time installation, you must overwrite \"$XDG_CONFIG_HOME/hypr/hyprland.conf\" with \"$XDG_CONFIG_HOME/hypr/hyprland.conf.new\".\e[0m\n"
;;esac
case $existed_ags_localbin in
y) printf "\n\e[31m[$0]: \!! Important \!! : Please delete \"/usr/local/bin/ags\" manually as soon as possible, since we\'re now using local PKGBUILD to build AGS for Arch(based) Linux distros, and \"/usr/local/bin/ags\" takes precedence over it.\e[0m\n"
;;esac
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
#
# This script is for installing/updating some "packages" for non-Arch users.
#
cd "$(dirname "$0")"
export base="$(pwd)"
source ./scriptdata/functions
source ./scriptdata/installers
if command -v pacman >/dev/null 2>&1;then printf "\e[31m[$0]: pacman found, it seems that the system is ArchLinux or Arch-based distro. Aborting...\e[0m\n";exit 1;fi
install-ags
install-Rubik
install-Gabarito
install-OneUI
install-bibata
install-MicroTeX
-19
View File
@@ -1,19 +0,0 @@
#!/usr/bin/env bash
#
# This script is for installing/updating some "packages" which are not installed by system package managers.
# Its functions are contained in `install.sh` already, and this just makes it more convenient for non-Arch users.
#
# Though this is not elegant at all. I may improve the method some day in the future.
#
cd "$(dirname "$0")"
export base="$(pwd)"
source ./scriptdata/functions
source ./scriptdata/installers
install-ags
install-Rubik
install-Gabarito
install-OneUI
install-bibata
install-MicroTeX
+2
View File
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
# TODO: This file should be provided for non-Arch(based) distros. As for Arch Linux, we should write local PKGBUILDs, which is the "right" way compared to copying files directly into /usr/local/* .
# This script depends on `functions' .
# This is NOT a script for execution, but for loading functions, so NOT need execution permission.
# NOTE that you NOT need to `cd ..' because the `$0' is NOT this file, but the script file which will source this file.
+1 -3
View File
@@ -14,7 +14,6 @@ If no option is specified, run default install process.
-f, --force (Dangerous) Force mode without any confirm
-c, --clean Clean the build cache first
-s, --skip-sysupdate Skip \"sudo pacman -Syu\"
--skip-ags Skip installing ags and its config
--skip-hyprland Skip installing the config for Hyprland
--skip-hypr-aur Skip installing hyprland-git
--skip-pymyc-aur Skip installing python-materialyoucolor-git, gradience-git,
@@ -36,7 +35,7 @@ cleancache(){
# `man getopt` to see more
para=$(getopt \
-o hfk:cs \
-l help,force,fontset:,deplistfile:,clean,skip-sysupdate,skip-ags,skip-fish,skip-hyprland,skip-hypr-aur,skip-pymyc-aur,skip-plasmaintg,skip-miscconf \
-l help,force,fontset:,deplistfile:,clean,skip-sysupdate,skip-fish,skip-hyprland,skip-hypr-aur,skip-pymyc-aur,skip-plasmaintg,skip-miscconf \
-n "$0" -- "$@")
[ $? != 0 ] && echo "$0: Error when getopt, please recheck parameters." && exit 1
#####################################################################################
@@ -63,7 +62,6 @@ while true ; do
## Ones without parameter
-f|--force) ask=false;shift;;
-s|--skip-sysupdate) SKIP_SYSUPDATE=true;shift;;
--skip-ags) SKIP_AGS=true;shift;;
--skip-hyprland) SKIP_HYPRLAND=true;shift;;
--skip-hypr-aur) SKIP_HYPR_AUR=true;shift;;
--skip-pymyc-aur) SKIP_PYMYC_AUR=true;shift;;
-13
View File
@@ -1,13 +0,0 @@
#!/usr/bin/env bash
# This script showed one reason about why it's good to split functions and installers in another file.
#
# This script is for install/update ags itself, NOT the config for it.
# The install.sh will install ags for you, why you still need this?
# Because you may run this script to ONLY update ags, since ags is a very active project currently and updates frequently.
#
cd "$(dirname "$0")"
export base="$(pwd)"
source ./scriptdata/functions
source ./scriptdata/installers
install-ags