blob: 4704b1850697c2b605deb423987e6948cad565ee (
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
43
44
45
46
47
48
49
50
51
52
53
|
# Maintainer: nippy <nippy@tuta.io>
# Contributor: Caleb Maclennan <caleb@alerque.com>
pkgname=vectorcraft
pkgver=0.12.0
pkgrel=2
url="https://getartcraft.com/apps/$pkgname"
_url="https://github.com/storytold/$pkgname"
pkgdesc='vibe coded clean-room reimplementation of Adobe Illustrator'
arch=(x86_64)
license=(MIT Apache-2.0)
depends=(glibc # libc.so libm.so
hicolor-icon-theme
libgcc)
makedepends=(cargo)
_archive="$pkgname-$pkgver"
source=("$_url/archive/refs/tags/v$pkgver/$_archive.tar.gz")
sha256sums=('266cc34c93b68d3bec847452674fce99b5695e2f233451957eef8ce39a5ce325')
_srcenv() {
cd "$_archive"
export CARGO_HOME="$srcdir"
export CARGO_PROFILE_RELEASE_OPT_LEVEL=3
export CARGO_TARGET_DIR=target
export RUSTUP_TOOLCHAIN=stable
CFLAGS+=' -fno-lto'
}
_icons=(512 256 128 64 48 32 16)
prepare() {
_srcenv
cargo fetch --locked --target host-tuple
}
build() {
_srcenv
cargo build --frozen --release -j2
}
package() {
depends+=(libgcc_s.so)
cd "$_archive"
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"{,-cli}
install -Dm0644 -t "$pkgdir/usr/share/applications/" "packaging/linux/ai.storyteller.$pkgname.desktop"
install -Dm0644 -t "$pkgdir/usr/share/mime/packages/" "packaging/linux/ai.storyteller.$pkgname.mime.xml"
install -Dm0644 -t "$pkgdir/usr/share/icons/hicolor/scalable/" assets/app-icon/hicolor/scalable/apps/ai.storyteller.$pkgname.svg
for s in ${_icons[@]}; do
local dim="${s}x${s}"
install -Dm0644 -t "$pkgdir/usr/share/icons/hicolor/$dim/apps/" assets/app-icon/hicolor/$dim/apps/ai.storyteller.$pkgname.png
done
install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE-{APACHE,MIT}
}
|