blob: 1ae67945dd3914c057a1ef2d2500cee799ec7b3d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# Maintainer: Jonas Bögle <aur@iwr.sh>
# Contributor: Jonathan Duck <duckbrain30@gmail.com>
pkgname=typora
pkgver=1.9.3
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/${pkgname}_${pkgver}"
source_x86_64=("${_urlbase}_amd64.deb")
source_aarch64=("${_urlbase}_arm64.deb")
sha512sums=('de9c883c63f3ea35bd551c8761e605f8e1a3468943e000abcbf94bb0c5cbb5f0f6c7fa4d49ab39c177f167e0e3d0b061c861bf828627b4a34f7f1589119c3d04')
sha512sums_x86_64=('da7714d8a2ef228d1df13bf2a6862f3be3fad51238657e8ee48350380267ecfed29b391e0c66653e3b4322e3dada02d2bea6e1041f5230988358645ea0cf4b28')
sha512sums_aarch64=('6a8623f44884d3ab564518b6c535079607aa97c10ba169447d05291a76d380e3b68cc7268b240d1ac7fd7cb30e64dd8c3752b889ac98c854006cc03e7f14bcb1')
package() {
# unpack archive
bsdtar -xf data.tar.xz -C "$pkgdir/"
# 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"
find "$pkgdir" -type d -exec chmod 755 {} \;
}
|