summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzoorat2023-11-12 00:00:59 +0600
committerzoorat2023-11-12 00:00:59 +0600
commit623366955a3412f4363ea910612bdb71815df75a (patch)
tree1b8878618f9bfc4e1cca80c726296e89819e6d3e
parent111c5af4cb8e1e2bab0b0e455f5bbef904013b09 (diff)
downloadaur-mymonero.tar.gz
adding better tooling
-rw-r--r--.SRCINFO32
-rw-r--r--.gitignore4
-rw-r--r--Makefile90
-rw-r--r--PKGBUILD68
-rw-r--r--changelog.md2
-rwxr-xr-xchangelog_generator.sh7
6 files changed, 169 insertions, 34 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 689dc0003af4..0e819b370981 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,40 @@
pkgbase = mymonero
pkgdesc = The simplest way to use the next-generation private digital currency Monero, at the sweet spot between security, convenience, and features.
pkgver = 1.3.3
- pkgrel = 1
+ pkgrel = 2
url = https://www.mymonero.com/
changelog = changelog.md
arch = x86_64
- license = custom:MyMonero
+ license = BSD-3
+ depends = alsa-lib
+ depends = at-spi2-core
+ depends = cairo
+ depends = dbus
+ depends = expat
+ depends = gcc-libs
+ depends = gdk-pixbuf2
+ depends = glib2
+ depends = glibc
+ depends = gtk3
+ depends = hicolor-icon-theme
+ depends = libcups
+ depends = libdrm
+ depends = libx11
+ depends = libxcb
+ depends = libxcomposite
+ depends = libxcursor
+ depends = libxdamage
+ depends = libxext
+ depends = libxfixes
+ depends = libxi
+ depends = libxrandr
+ depends = libxrender
depends = libxss
+ depends = libxtst
+ depends = mesa
+ depends = nspr
depends = nss
- depends = gtk3
+ depends = pango
provides = mymonero
noextract = mymonero-1.3.3.x86_64.AppImage
options = strip
diff --git a/.gitignore b/.gitignore
index 27973bdc1cc6..fd1cf73e6413 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
*
!.gitignore
-!.SRCINFO
+!Makefile
!PKGBUILD
+!.SRCINFO
!changelog.md
-!changelog_generator.sh
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000000..ac5ca497ecd1
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,90 @@
+MAKEFLAGS += --warn-undefined-variables
+SHELL=/bin/bash
+
+REPO = "https://github.com/mymonero/mymonero-app-js"
+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 9732d0514098..04cb1867eecd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,19 +2,45 @@
pkgname="mymonero"
pkgver=1.3.3
-pkgrel=1
+pkgrel=2
pkgdesc="The simplest way to use the next-generation private digital currency Monero, at the sweet spot between security, convenience, and features."
arch=('x86_64')
# url="https://github.com/mymonero/mymonero-app-js"
url="https://www.mymonero.com/"
-license=('custom:MyMonero')
+license=('BSD-3')
-depends=("libxss" "nss" "gtk3")
+depends=("alsa-lib"
+ "at-spi2-core"
+ "cairo"
+ "dbus"
+ "expat"
+ "gcc-libs"
+ "gdk-pixbuf2"
+ "glib2"
+ "glibc"
+ "gtk3"
+ "hicolor-icon-theme"
+ "libcups"
+ "libdrm"
+ "libx11"
+ "libxcb"
+ "libxcomposite"
+ "libxcursor"
+ "libxdamage"
+ "libxext"
+ "libxfixes"
+ "libxi"
+ "libxrandr"
+ "libxrender"
+ "libxss"
+ "libxtst"
+ "mesa"
+ "nspr"
+ "nss"
+ "pango")
provides=("$pkgname")
-# options=(debug !strip emptydirs zipman)
options=(strip emptydirs zipman)
-# install="$pkgname.install"
changelog="changelog.md"
source=("${pkgname}-${pkgver}.${CARCH}.AppImage::https://github.com/mymonero/mymonero-app-js/releases/download/v${pkgver}/MyMonero-${pkgver}.AppImage"
@@ -25,10 +51,10 @@ b2sums=('a2fe1e6c58c4996d9d56c901d8269393410edb86e74707bdb6508829ca6fd03145920e6
prepare() {
# making .AppImage file executable
- chmod -v +x "${pkgname}-${pkgver}.${CARCH}.AppImage"
+ chmod +x "${pkgname}-${pkgver}.${CARCH}.AppImage"
# extract .AppImage file
- "./${pkgname}-${pkgver}.${CARCH}.AppImage" --appimage-extract
+ "./${pkgname}-${pkgver}.${CARCH}.AppImage" --appimage-extract >/dev/null
}
build() {
@@ -38,34 +64,34 @@ build() {
package() {
# Copy app files
- install -vdm 755 "${pkgdir}/opt/${pkgname}"
- cp -va squashfs-root/* "${pkgdir}/opt/${pkgname}"
+ install -dm 755 "${pkgdir}/opt/${pkgname}"
+ cp -a squashfs-root/* "${pkgdir}/opt/${pkgname}"
# Fix permissions
for d in locales resources; do
- chmod -v 755 "${pkgdir}/opt/${pkgname}/$d"
- find "${pkgdir}/opt/${pkgname}/$d" -type d -exec chmod -v 755 {} +
+ chmod 755 "${pkgdir}/opt/${pkgname}/$d"
+ find "${pkgdir}/opt/${pkgname}/$d" -type d -exec chmod 755 {} +
done
chown root:root "${pkgdir}/opt/${pkgname}/chrome-sandbox"
chmod 4755 "${pkgdir}/opt/${pkgname}/chrome-sandbox"
# Link entry point
- install -vdm 755 "${pkgdir}/usr/bin"
- ln -vsf "/opt/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+ install -dm 755 "${pkgdir}/usr/bin"
+ ln -sf "/opt/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
# Copy icons files
- install -vdm 755 "${pkgdir}/usr/share/icons"
- find squashfs-root/usr/share/icons -type d -exec chmod -v 755 {} +
- cp -va squashfs-root/usr/share/icons/* "${pkgdir}/usr/share/icons"
+ install -dm 755 "${pkgdir}/usr/share/icons"
+ find squashfs-root/usr/share/icons -type d -exec chmod 755 {} +
+ cp -a squashfs-root/usr/share/icons/* "${pkgdir}/usr/share/icons"
# Copy desktop file
- install -vDm 644 "squashfs-root/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+ install -Dm 644 "squashfs-root/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
# Install LICENSE file
- install -vDm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# Remove unused files
- rm -vrf "${pkgdir}/opt/${pkgname}"/{usr,swiftshader,AppRun,${pkgname}.{desktop,png}}
- #rm -vrf "${pkgdir}/opt/${pkgname}"/{libGLESv2.so,libEGL.so,libvk_swiftshader.so,libvulkan.so}
- #rm -vrf "${pkgdir}/opt/${pkgname}"/{locales,LICENSE*}
+ rm -rf "${pkgdir}/opt/${pkgname}"/{usr,swiftshader,AppRun,${pkgname}.{desktop,png}}
+ rm -rf "${pkgdir}/opt/${pkgname}"/{libGLESv2.so,libEGL.so,libvk_swiftshader.so,libvulkan.so}
+ rm -rf "${pkgdir}/opt/${pkgname}"/{locales,LICENSE*}
}
diff --git a/changelog.md b/changelog.md
index ccd797b4a6d7..ac45034069cf 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,4 @@
-# Name: 1.3.3
+# Name: 1.3.3
### URL: https://github.com/mymonero/mymonero-app-js/releases/tag/v1.3.3
### published at '2022-11-09T04:49:34Z' by devinpearson
---
diff --git a/changelog_generator.sh b/changelog_generator.sh
deleted file mode 100755
index a03f8d60bf30..000000000000
--- a/changelog_generator.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-echo "# Name: $(gh release --repo https://github.com/mymonero/mymonero-app-js view --json name | jq -r .name)" >changelog.md
-echo "### URL: $(gh release --repo https://github.com/mymonero/mymonero-app-js view --json url | jq -r .url)" >>changelog.md
-echo "### published at '$(gh release --repo https://github.com/mymonero/mymonero-app-js view --json publishedAt | jq -r .publishedAt)' by $(gh release --repo https://github.com/mymonero/mymonero-app-js view --json author | jq -r .author.login)" >>changelog.md
-echo "---" >>changelog.md
-gh release --repo https://github.com/mymonero/mymonero-app-js view --json body | jq -r .body >>changelog.md