summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzoorat2021-12-03 01:40:13 +0600
committerzoorat2021-12-03 01:40:13 +0600
commit76f5e250d22ae67b5608e9368a3a97ee2acc8867 (patch)
tree87b147c51b7daa665528fa4ac0da619f907c2363
parenta8b91ed8696daa6bdf88fe2564492047f0ec8b10 (diff)
downloadaur-76f5e250d22ae67b5608e9368a3a97ee2acc8867.tar.gz
better packaging
Signed-off-by: zoorat <78788887+z00rat@users.noreply.github.com>
-rw-r--r--.SRCINFO5
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD42
-rw-r--r--alacritty-themes.install40
4 files changed, 25 insertions, 65 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7bd12aa1f0ea..1e1bef6bcbf4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,8 @@
pkgbase = alacritty-themes
pkgdesc = A utility for choosing and applying Alacritty terminal themes.
pkgver = 4.1.6
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/rajasegar/alacritty-themes
- install = alacritty-themes.install
arch = any
license = MIT
makedepends = npm
@@ -12,6 +11,8 @@ pkgbase = alacritty-themes
conflicts = alacritty-themes
noextract = alacritty-themes-4.1.6.tgz
source = https://registry.npmjs.org/alacritty-themes/-/alacritty-themes-4.1.6.tgz
+ source = https://raw.githubusercontent.com/rajasegar/alacritty-themes/master/LICENSE
b2sums = 1b662634f0f4d43912568c36927a34548cce77709674dcd3102e4c3bd082ad435cdd5fe65eaf6857755a3fc050bb6747f30f7dd6f86117efc53f3e3895a812f8
+ b2sums = 7a11e2eeed89bc67e6cef84badf8cccd1bf2de44423c22bd023fe579795b45bc8906c7a2dc3df4c005d0524b99994d2f534410df8e9a52e2d95f97591dd8949c
pkgname = alacritty-themes
diff --git a/.gitignore b/.gitignore
index 71c67a0cf004..a7df78fc2ace 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,3 @@
!.gitignore
!PKGBUILD
!.SCRINFO
-!alacritty-themes.install
-
-!fixing_v4.1.2.patch
diff --git a/PKGBUILD b/PKGBUILD
index 95c0edd2d4aa..4d3ec4ff07f0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,9 @@
-# Maintainer: zoorat <zoorat [at] protonmail [dot] com>
+# Maintainer: zoorat <zoorat [at] protonmail [dot] com>
# Contributor: Ben Silverman <bensilverman10 at gmail dot com>
pkgname=alacritty-themes
pkgver=4.1.6
-pkgrel=1
+pkgrel=2
pkgdesc="A utility for choosing and applying Alacritty terminal themes."
arch=(any)
@@ -13,29 +13,31 @@ license=("MIT")
depends=("nodejs")
makedepends=("npm" "jq")
conflicts=("$pkgname")
-install="$pkgname.install"
+# install="$pkgname.install"
-source=("https://registry.npmjs.org/${pkgname}/-/${pkgname}-${pkgver}.tgz")
+source=("https://registry.npmjs.org/${pkgname}/-/${pkgname}-${pkgver}.tgz"
+ "https://raw.githubusercontent.com/rajasegar/alacritty-themes/master/LICENSE")
noextract=("${pkgname}-${pkgver}.tgz")
-b2sums=('1b662634f0f4d43912568c36927a34548cce77709674dcd3102e4c3bd082ad435cdd5fe65eaf6857755a3fc050bb6747f30f7dd6f86117efc53f3e3895a812f8')
+b2sums=('1b662634f0f4d43912568c36927a34548cce77709674dcd3102e4c3bd082ad435cdd5fe65eaf6857755a3fc050bb6747f30f7dd6f86117efc53f3e3895a812f8'
+ '7a11e2eeed89bc67e6cef84badf8cccd1bf2de44423c22bd023fe579795b45bc8906c7a2dc3df4c005d0524b99994d2f534410df8e9a52e2d95f97591dd8949c')
# 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"
- find "${pkgdir}/usr" -type d -exec chmod 755 {} +
- chown -R root:root "${pkgdir}"
- find "$pkgdir" -name package.json -print0 | xargs -r -0 sed -i '/_where/d'
+ npm install --verbose -g --cache "${srcdir}/npm-cache" --user root --prefix "${pkgdir}/usr" "${srcdir}/${pkgname}-${pkgver}.tgz"
+ find "${pkgdir}/usr" -type d -exec chmod -v 755 {} +
+ chown -vR root:root "${pkgdir}"
+ find "$pkgdir" -name package.json -print0 | xargs -t -n1 -r -0 sed -i '/_where/d'
- local tmppackage="$(mktemp)"
- local pkgjson="$pkgdir/usr/lib/node_modules/$pkgname/package.json"
- jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" >"$tmppackage"
- mv "$tmppackage" "$pkgjson"
- chmod 644 "$pkgjson"
+ local tmppackage="$(mktemp)"
+ local pkgjson="$pkgdir/usr/lib/node_modules/$pkgname/package.json"
+ jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" >"$tmppackage"
+ mv -v "$tmppackage" "$pkgjson"
+ chmod -v 644 "$pkgjson"
- find "$pkgdir" -type f -name package.json | while read pkgjson; do
- local tmppackage="$(mktemp)"
- jq 'del(.man)' "$pkgjson" >"$tmppackage"
- mv "$tmppackage" "$pkgjson"
- chmod 644 "$pkgjson"
- done
+ find "$pkgdir" -type f -name package.json | while read pkgjson; do
+ local tmppackage="$(mktemp)"
+ jq 'del(.man)' "$pkgjson" >"$tmppackage"
+ mv -v "$tmppackage" "$pkgjson"
+ chmod -v 644 "$pkgjson"
+ done
}
diff --git a/alacritty-themes.install b/alacritty-themes.install
deleted file mode 100644
index ab2303912a49..000000000000
--- a/alacritty-themes.install
+++ /dev/null
@@ -1,40 +0,0 @@
-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 " | 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
-}