Create shared / fast track for certain packages

This commit is contained in:
Ryan Hughes
2026-01-10 20:18:35 -05:00
parent 1dfa83863d
commit 45a356eb70
253 changed files with 566 additions and 458 deletions
-21
View File
@@ -1,21 +0,0 @@
pkgbase = typora
pkgdesc = A minimal markdown editor and reader.
pkgver = 1.12.4
pkgrel = 1
url = https://typora.io/
arch = x86_64
arch = aarch64
license = custom:"Copyright (c) 2015 Abner Lee All Rights Reserved."
depends = gtk3
depends = nss
depends = alsa-lib
optdepends = noto-fonts-emoji: Or some other emoji font to see emojis
optdepends = pandoc: Import/export for extra file formats
source = typora.sh
sha512sums = de9c883c63f3ea35bd551c8761e605f8e1a3468943e000abcbf94bb0c5cbb5f0f6c7fa4d49ab39c177f167e0e3d0b061c861bf828627b4a34f7f1589119c3d04
source_x86_64 = https://download.typora.io/linux/typora_1.12.4_amd64.deb
sha512sums_x86_64 = f2504c5ab4c80a1b4927b5498a7d8cb15509b1485111a886add75db35984daf49485db49e0fce9ec251be76b08ddf0dc7fd1150de4b7ffd284f67db60905c47a
source_aarch64 = https://download.typora.io/linux/typora_1.12.4_arm64.deb
sha512sums_aarch64 = 1bc6808b574f0073856daf2471a592cbee374384a60c6cc8f11fed4a6a80eab7512343e86083f60b995c439b323dc1c82582576d611dcd07072e7cf6507aa7eb
pkgname = typora
-4
View File
@@ -1,4 +0,0 @@
pkg/
src/
typora-*.pkg.*
typora_*.deb
-36
View File
@@ -1,36 +0,0 @@
# This will update the checksums and build the package
all: updateinfo
makepkg -sr
# Check if any files are world writable
find pkg/typora -type f -perm -o+w -printf "WARNING: '%p' has o+w set\n"
# This will do the same as all, but will install it to the local system as well
install: updateinfo
makepkg -sri
# Check if any files are world writable
find pkg/typora -type f -perm -o+w -printf "WARNING: '%p' has o+w set\n"
# This will update the checksums and .SRCINFO
updateinfo:
updpkgsums
makepkg --printsrcinfo > .SRCINFO
# This will update PKGBUILD with the latest version and build the package
update:
sed 's/^pkgver=.*$$/pkgver=$(shell curl -s https://downloads.typora.io/linux/Packages | grep Version | cut -f 2 -d ' ' | sort -V | cut -f 1 -d '-' | uniq | tail -n 1)/' -i PKGBUILD
sed 's/^pkgrel=.*$$/pkgrel=1/' -i PKGBUILD
$(MAKE)
# This will list the versions available in the Ubuntu repository
versions:
curl -s https://downloads.typora.io/linux/Packages | grep Version | cut -f 2 -d ' ' | sort -V | cut -f 1 -d '-' | uniq
# This will remove the files downloaded and created in the build process
clean:
rm -rf pkg src typora_*.deb typora-*.pkg.*
publish:
git add .
git commit -m "Update to version $(shell sed -n 's/^pkgver=\(.*\)$$/\1/p' PKGBUILD)"
# git push
-50
View File
@@ -1,50 +0,0 @@
# Maintainer: Jonas Bögle <aur@iwr.sh>
# Contributor: Jonathan Duck <duckbrain30@gmail.com>
pkgname=typora
pkgver=1.12.4
_pkgver_x86_64="$pkgver"
_pkgver_aarch64="$pkgver"
pkgrel=1
pkgdesc="A minimal markdown editor and reader."
arch=('x86_64' 'aarch64')
license=('custom:"Copyright (c) 2015 Abner Lee All Rights Reserved."')
url="https://typora.io/"
depends=('gtk3' 'nss' 'alsa-lib')
optdepends=(
'noto-fonts-emoji: Or some other emoji font to see emojis'
'pandoc: Import/export for extra file formats')
source=("$pkgname.sh")
_urlbase="https://download.typora.io/linux/typora_"
source_x86_64=("${_urlbase}${_pkgver_x86_64}_amd64.deb")
source_aarch64=("${_urlbase}${_pkgver_aarch64}_arm64.deb")
sha512sums=('de9c883c63f3ea35bd551c8761e605f8e1a3468943e000abcbf94bb0c5cbb5f0f6c7fa4d49ab39c177f167e0e3d0b061c861bf828627b4a34f7f1589119c3d04')
sha512sums_x86_64=('f2504c5ab4c80a1b4927b5498a7d8cb15509b1485111a886add75db35984daf49485db49e0fce9ec251be76b08ddf0dc7fd1150de4b7ffd284f67db60905c47a')
sha512sums_aarch64=('1bc6808b574f0073856daf2471a592cbee374384a60c6cc8f11fed4a6a80eab7512343e86083f60b995c439b323dc1c82582576d611dcd07072e7cf6507aa7eb')
package() {
# unpack archive
if [[ "$CARCH" == "x86_64" ]]; then
bsdtar -xf data.tar.zst -C "$pkgdir/"
elif [[ "$CARCH" == "aarch64" ]]; then
bsdtar -xf data.tar.xz -C "$pkgdir/"
fi
# remove lintian overrides
rm -rf "$pkgdir/usr/share/lintian/"
# replace bin link with custom launch script
rm -rf "$pkgdir/usr/bin/$pkgname"
install -m755 "$srcdir/$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
# move license to correct path
install -Dm644 "$pkgdir/usr/share/doc/$pkgname/copyright" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# delete previous copyright path
rm "$pkgdir/usr/share/doc/$pkgname/copyright"
# delete doc dir if empty
rmdir --ignore-fail-on-non-empty "$pkgdir/usr/share/doc/$pkgname" "$pkgdir/usr/share/doc"
# remove change log from application comment
sed -i '/Change Log/d' "$pkgdir/usr/share/applications/typora.desktop"
# fix permissions
chmod 644 "$pkgdir/usr/share/applications/typora.desktop"
chmod 644 "$pkgdir/usr/share/typora/resources/packages/node-spellchecker/vendor/hunspell_dictionaries/en_US.dic"
chmod 644 "$pkgdir/usr/share/typora/resources/packages/node-spellchecker/vendor/hunspell_dictionaries/en_US.aff"
find "$pkgdir" -type d -exec chmod 755 {} \;
}
-11
View File
@@ -1,11 +0,0 @@
#!/bin/bash
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-~/.config}
# Allow users to override command-line options
if [[ -f $XDG_CONFIG_HOME/typora-flags.conf ]]; then
TYPORA_USER_FLAGS="$(sed 's/#.*//' $XDG_CONFIG_HOME/typora-flags.conf | tr '\n' ' ')"
fi
# Launch
exec /usr/share/typora/Typora "$@" $TYPORA_USER_FLAGS