summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzoorat2023-11-11 18:49:17 +0600
committerzoorat2023-11-11 18:49:17 +0600
commitbf9bfa2fd0bfe1d86f37ba6638a3629b072220ea (patch)
tree71b5e86137369123e75621bfa16eabc4226f21ed
parentdf96db73239954433588cbc33f7f9e699879386a (diff)
downloadaur-bf9bfa2fd0bfe1d86f37ba6638a3629b072220ea.tar.gz
adding better tooling
-rw-r--r--.SRCINFO8
-rw-r--r--.gitignore11
-rw-r--r--Makefile90
-rw-r--r--PKGBUILD20
-rw-r--r--changelog.md7
5 files changed, 118 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5ededa677423..380053d4d340 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,17 @@
pkgbase = ttf-mononoki
pkgdesc = Monospace font for programmers, successor of monoOne
pkgver = 1.6
- pkgrel = 1
+ pkgrel = 2
url = https://madmalik.github.io/mononoki/
+ changelog = changelog.md
arch = any
license = custom:OFL
- depends = fontconfig
provides = ttf-mononoki
conflicts = ttf-mononoki-git
+ options = strip
options = emptydirs
- source = https://github.com/madmalik/mononoki/archive/1.6.tar.gz
+ options = zipman
+ source = ttf-mononoki-1.6.tar.gz::https://github.com/madmalik/mononoki/archive/1.6.tar.gz
b2sums = 584bf6d1f319fd15b30fcc2dc1f3c58e76105b1ca3cd6a02982e80c2df645b9861878dbfa0eb52768c3dfd2900ff30b59a3fad7e77a2785dc08087668cf54931
pkgname = ttf-mononoki
diff --git a/.gitignore b/.gitignore
index 665307854be8..fd1cf73e6413 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
-*.pkg.tar*
-*.src.tar*
-*.gz
-src
-pkg
+*
+!.gitignore
+!Makefile
+!PKGBUILD
+!.SRCINFO
+!changelog.md
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000000..3bccc63d3209
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,90 @@
+MAKEFLAGS += --warn-undefined-variables
+SHELL=/bin/bash
+
+REPO = "https://github.com/madmalik/mononoki"
+VERSION = $(shell grep pkgver .SRCINFO | cut -d '=' -f 2 | tr -d '[:space:]')
+TRASH = $(shell git check-ignore * | tr '\n' ' ')
+
+# DEFAULT
+all: clean log sum build check pre clean
+
+# just build the package
+build:
+ makepkg -sfr
+
+# build and install the package
+install:
+ makepkg --install
+
+# update checksums
+sum:
+ updpkgsums
+
+# check/lint
+check:
+ @echo "shellcheck: "
+ shellcheck -e SC2148 -e SC2034 PKGBUILD || exit 0
+
+ @echo "shell formate: "
+ shfmt -d PKGBUILD || exit 0
+
+ @echo "checking PKGBUILD: "
+ namcap -i PKGBUILD
+
+ @echo "checking build: "
+ namcap -i *.pkg.*
+
+# clean up the mess
+clean:
+ifeq ($(strip $(TRASH)),)
+ @echo "nothing to clear"
+else
+ file $(TRASH)
+ @echo -n "Are you sure? [Y/n] " && read ans && if [ $${ans:-'Y'} = 'Y' ]; then \
+ trash-put -v $(TRASH) ; \
+ exit 0 ; \
+ fi
+endif
+
+# generate `changelog.md`
+log:
+ @echo "wait, it will take some time"
+ $(eval NAME := $(shell gh release --repo $(REPO) view --json name | jq -r .name))
+ echo "# Name: $(NAME) " >changelog.md
+ $(eval URL := $(shell gh release --repo $(REPO) view --json url | jq -r .url))
+ echo "### URL: $(URL)" >>changelog.md
+ $(eval PUBLISHED_AT := $(shell gh release --repo $(REPO) view --json publishedAt | jq -r .publishedAt))
+ $(eval AUTHOR := $(shell gh release --repo $(REPO) view --json author | jq -r .author.login))
+ echo "### published at '$(PUBLISHED_AT)' by $(AUTHOR)" >>changelog.md
+ echo "---" >>changelog.md
+ gh release --repo $(REPO) view --json body | jq -r .body >>changelog.md
+
+# prepare for commit
+pre:
+ shfmt -w PKGBUILD
+ makepkg --printsrcinfo > .SRCINFO
+
+ git diff
+
+ git add PKGBUILD
+ git add changelog.md
+ git add .SRCINFO
+ git add .gitignore
+ git add Makefile
+
+# commit with version bump message
+commit:
+ $(eval VERSION := $(shell read -p "enter version (pkgver=$(VERSION)): " enter ; echo $${enter}))
+ @echo "commit message: \"updating to v$(VERSION)\""
+
+ @echo -n "Are you sure? [Y/n] " && read ans && if [ $${ans:-'Y'} = 'Y' ]; then \
+ git diff --cached ; \
+ exit 0 ; \
+ fi
+
+ @echo -n "Are you sure? [Y/n] " && read ans && if [ $${ans:-'Y'} = 'Y' ]; then \
+ git commit -m "updating to v$(VERSION)" ; \
+ exit 0 ; \
+ fi
+
+ @echo "recheck everything before pushing to AUR"
diff --git a/PKGBUILD b/PKGBUILD
index 30a4858cbcf4..94cf787b71ff 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,26 +1,26 @@
# Maintainer: zoorat <zoorat [at] protonmail [dot] com>
+# Contributor: Mike Swanson <mikeonthecomputer@gmail.com>
pkgname=ttf-mononoki
pkgver=1.6
-pkgrel=1
+pkgrel=2
pkgdesc="Monospace font for programmers, successor of monoOne"
arch=('any')
url="https://madmalik.github.io/mononoki/"
license=('custom:OFL')
-depends=('fontconfig')
-makedepends=()
-conflicts=("ttf-mononoki-git")
provides=("ttf-mononoki")
-options=(emptydirs)
+conflicts=("ttf-mononoki-git")
+options=(strip emptydirs zipman)
+changelog="changelog.md"
-source=("https://github.com/madmalik/mononoki/archive/$pkgver.tar.gz")
+source=("$pkgname-$pkgver.tar.gz::https://github.com/madmalik/mononoki/archive/$pkgver.tar.gz")
b2sums=('584bf6d1f319fd15b30fcc2dc1f3c58e76105b1ca3cd6a02982e80c2df645b9861878dbfa0eb52768c3dfd2900ff30b59a3fad7e77a2785dc08087668cf54931')
package() {
- cd mononoki-$pkgver
- install -dm755 "$pkgdir/usr/share/fonts/ttf-mononoki"
- install -m644 -t "$pkgdir/usr/share/fonts/ttf-mononoki" export/*.ttf
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ cd mononoki-$pkgver || exit
+ install -dm755 "$pkgdir/usr/share/fonts/ttf-mononoki"
+ install -m644 -t "$pkgdir/usr/share/fonts/ttf-mononoki" export/*.ttf
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
diff --git a/changelog.md b/changelog.md
new file mode 100644
index 000000000000..5dd7413d51fd
--- /dev/null
+++ b/changelog.md
@@ -0,0 +1,7 @@
+# Name: 1.6
+### URL: https://github.com/madmalik/mononoki/releases/tag/1.6
+### published at '2023-02-25T12:44:57Z' by madmalik
+---
+* added vietnamese characters (#102)
+* added option for dotted zero (#101)
+* bugfixes: #99 + #100