summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzoorat2021-09-19 12:13:16 +0600
committerzoorat2021-09-19 12:13:16 +0600
commit079e3470fe3682689288110a6bfc5f2613e4ddfa (patch)
tree00bdfdcf47f6afd1c17e43f91f4d27fd80d12ae6
parenta6f49b22dca47f67f2457191bf00c6bfda62dbd3 (diff)
downloadaur-079e3470fe3682689288110a6bfc5f2613e4ddfa.tar.gz
adding .install file and some small change...
Signed-off-by: zoorat <78788887+z00rat@users.noreply.github.com>
-rw-r--r--.SRCINFO5
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD23
-rw-r--r--alacritty-themes.install44
4 files changed, 60 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ec0af8cce6ba..7bd3984d6148 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,16 @@
pkgbase = alacritty-themes
pkgdesc = A cross-platform GPU-accelerated Terminal emulator.
pkgver = 4.1.1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/rajasegar/alacritty-themes
+ install = alacritty-themes.install
arch = any
license = MIT
makedepends = npm
makedepends = jq
depends = nodejs
+ conflicts = alacritty-themes
+ replaces = alacritty-themes
noextract = alacritty-themes-4.1.1.tgz
source = https://registry.npmjs.org/alacritty-themes/-/alacritty-themes-4.1.1.tgz
b2sums = 2dd1247ab59f5af74436b8643dedf5b679b063a869d6c70e1925f76aa856c907d77452f179ff5c810e6c8b46bc911da0833a8e63c8849d98a25681cc1f64bcc7
diff --git a/.gitignore b/.gitignore
index d6a038c8cf8f..b12b11914478 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*
!.gitignore
!PKGBUILD
-!.SCRINFO \ No newline at end of file
+!.SCRINFO
+!alacritty-themes.install
diff --git a/PKGBUILD b/PKGBUILD
index 387f3a0c0370..71150be2e80d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,32 @@
# Maintainer: zoorat <zoorat [at] protonmail [dot] com>
# Contributor: Ben Silverman <bensilverman10 at gmail dot com>
-_npmname=alacritty-themes
-pkgname=${_npmname}
+pkgname=alacritty-themes
pkgver=4.1.1
-pkgrel=1
+pkgrel=2
+
pkgdesc="A cross-platform GPU-accelerated Terminal emulator."
arch=(any)
url="https://github.com/rajasegar/alacritty-themes"
license=("MIT")
+
depends=("nodejs")
makedepends=("npm" "jq")
-source=("https://registry.npmjs.org/${_npmname}/-/${_npmname}-${pkgver}.tgz")
+conflicts=("$pkgname")
+replaces=("$pkgname")
+install="$pkgname.install"
+
+source=("https://registry.npmjs.org/${pkgname}/-/${pkgname}-${pkgver}.tgz")
noextract=("${pkgname}-${pkgver}.tgz")
b2sums=('2dd1247ab59f5af74436b8643dedf5b679b063a869d6c70e1925f76aa856c907d77452f179ff5c810e6c8b46bc911da0833a8e63c8849d98a25681cc1f64bcc7')
+# Document: https://wiki.archlinux.org/title/Node.js_package_guidelines
package() {
npm install -g --cache "${srcdir}/npm-cache" --user root --prefix "${pkgdir}/usr" "${srcdir}/${pkgname}-${pkgver}.tgz"
-
- # Non-deterministic race in npm gives 777 permissions to random directories.
- # See https://github.com/npm/cli/issues/1103 for details.
find "${pkgdir}/usr" -type d -exec chmod 755 {} +
-
- # npm gives ownership of ALL FILES to build user
- # https://bugs.archlinux.org/task/63396
chown -R root:root "${pkgdir}"
-
- # Remove references to $pkgdir
find "$pkgdir" -name package.json -print0 | xargs -r -0 sed -i '/_where/d'
- # Remove references to $srcdir
local tmppackage="$(mktemp)"
local pkgjson="$pkgdir/usr/lib/node_modules/$pkgname/package.json"
jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" >"$tmppackage"
diff --git a/alacritty-themes.install b/alacritty-themes.install
new file mode 100644
index 000000000000..a0aeccb75bb9
--- /dev/null
+++ b/alacritty-themes.install
@@ -0,0 +1,44 @@
+B='\033[1;36m' # Bold cyan
+C='\033[0;36m' # Cyan
+R='\033[0m \a' # Reset all colors and ring a bell
+
+call_to_action() {
+ echo -e "$C"
+ echo -e " +-$B=[ alacritty-themes ]=$C------------------------------------------------------------------+"
+ echo " | |"
+ echo " | You might want to backup your alacritty config by running |"
+ echo " | 'cp ~/.config/alacritty/alacritty.yml ~/.config/alacritty/alacritty.bak.yml' |"
+ echo " | because, it will compress the config file to what it only needs. |"
+ echo " | |"
+ echo " | If you don't have any config run 'alacritty-themes --create'. |"
+ echo " | |"
+ echo " | You can, |"
+ echo " | run this app by executing 'alacritty-themes' on your terminal |"
+ echo " | star the project at : https://github.com/rajasegar/alacritty-themes |"
+ echo " | vote the AUR package at : https://aur.archlinux.org/packages/alacritty-themes |"
+ echo " | report issue about packaging : https://github.com/z00rat/AUR/issues |"
+ echo " | report issue about the app at : https://github.com/rajasegar/alacritty-themes/issues |"
+ echo " | |"
+ echo " +-----------------------------------------------------------------------------------------+"
+ echo -e "$R"
+}
+
+after_remove() {
+ echo -e "$C"
+ echo -e " +-$B=[ alacritty-themes ]=$C---------------------------------------------------------+"
+ echo " | |"
+ echo " | This package doesn't create any file, no need to delete any files manually. |"
+ echo " | |"
+ echo " +--------------------------------------------------------------------------------+"
+ echo -e "$R"
+}
+
+post_install() {
+ call_to_action
+}
+post_upgrade() {
+ call_to_action
+}
+post_remove() {
+ after_remove
+}