49 lines
1.7 KiB
Bash
49 lines
1.7 KiB
Bash
|
# Maintainer: neuz <nezu@nezu.cc>
|
||
|
pkgname=lychee-slicer-patched
|
||
|
_pkgname=lychee-slicer
|
||
|
pkgver=7.0.2
|
||
|
_patchver=1.1
|
||
|
pkgrel=1
|
||
|
pkgdesc="A versatile and easy to use slicer for SLA 3D printers - plus version, patched"
|
||
|
arch=(x86_64)
|
||
|
url="https://mango3d.io/download-lychee-slicer"
|
||
|
license=('unknown')
|
||
|
depends=('gtk3' 'nss' 'xdg-utils' 'libxss')
|
||
|
makedepends=('go')
|
||
|
provides=('lychee-slicer')
|
||
|
conflicts=('lychee-slicer')
|
||
|
options=(!debug !strip)
|
||
|
source=("$pkgname-$_patchver.tar.gz::https://vaclive.party/software/lychee-slicer/archive/v$_patchver.tar.gz"
|
||
|
"$_pkgname-$pkgver.deb::https://mango-lychee.nyc3.digitaloceanspaces.com/LycheeSlicer-$pkgver.deb"
|
||
|
"lycheeslicer.sh")
|
||
|
sha256sums=('a804e3af0a92ad634a4b5bb7a95e509c4eab447285367272c9830cd9179f4dc8'
|
||
|
'2742f3dec76623fdad146559789710d4faa4e31e4d5d73b1b9740bc817243cf7'
|
||
|
'b4c98d9cbc595801c2b36e1a59838eb6bd0f46394689ded48b0fa7649056849d')
|
||
|
|
||
|
prepare() {
|
||
|
mkdir -p "$srcdir/data"
|
||
|
tar -xf data.tar.xz -C "$srcdir/data"
|
||
|
cd "$_pkgname"
|
||
|
mkdir -p build/
|
||
|
}
|
||
|
|
||
|
build() {
|
||
|
cd "$_pkgname"
|
||
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||
|
export CGO_CFLAGS="${CFLAGS}"
|
||
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||
|
export CGO_LDFLAGS="${LDFLAGS}"
|
||
|
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
||
|
go build -o build .
|
||
|
|
||
|
# patch
|
||
|
./build/$_pkgname -program "$srcdir/data/opt/LycheeSlicer/lycheeslicer" -patch
|
||
|
sed -i 's|/opt/LycheeSlicer/lycheeslicer|lycheeslicer|' "$srcdir/data/usr/share/applications/lycheeslicer.desktop"
|
||
|
}
|
||
|
|
||
|
package() {
|
||
|
cp -a data/. "$pkgdir/"
|
||
|
install -Dm755 "$_pkgname/build/$_pkgname" "$pkgdir/opt/LycheeSlicer/lycheeslicer-launcher"
|
||
|
install -Dm755 lycheeslicer.sh "$pkgdir/usr/bin/lycheeslicer"
|
||
|
}
|