blob: 125fdf69b081dcae9902228fdde72f906780dedf (
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
|
# Maintainer: snemc <3112671039@qq.com>
pkgname=typora-cn
_pkgname=typora
pkgver=1.8.10
pkgrel=1
pkgdesc="A minimal markdown editor and reader."
arch=('x86_64')
license=('custom:"Copyright (c) 2015 Abner Lee All Rights Reserved."')
url="https://typoraio.cn/"
depends=('gtk3' 'nss' 'alsa-lib')
optdepends=(
'noto-fonts-emoji: Or some other emoji font to see emojis'
'pandoc: Import/export for extra file formats')
_filename="${_pkgname}_${pkgver}_amd64.deb"
source=("https://typoraio.cn/linux/$_filename" "$_pkgname.sh")
sha512sums=('6560774e283129fa556a916d412903893388194625472062a36dd84d771ae261974b0c6a3b4642b081e8e19a7bb9477720e00f39efa4934aa8301001127e69a6'
'de9c883c63f3ea35bd551c8761e605f8e1a3468943e000abcbf94bb0c5cbb5f0f6c7fa4d49ab39c177f167e0e3d0b061c861bf828627b4a34f7f1589119c3d04')
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 {} \;
}
|