From f69ecd853c7b70752c85f5648517a2d1e7b8c347 Mon Sep 17 00:00:00 2001 From: nezu Date: Mon, 21 Oct 2024 16:49:05 +0200 Subject: [PATCH] initial --- .SRCINFO | 24 ++++++++++++++++++++++++ .gitignore | 5 +++++ PKGBUILD | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ lycheeslicer.sh | 3 +++ 4 files changed, 80 insertions(+) create mode 100644 .SRCINFO create mode 100644 .gitignore create mode 100644 PKGBUILD create mode 100644 lycheeslicer.sh diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..37ca203 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = lychee-slicer-patched + pkgdesc = A versatile and easy to use slicer for SLA 3D printers - plus version, patched + pkgver = 7.0.2 + pkgrel = 1 + url = https://mango3d.io/download-lychee-slicer + arch = x86_64 + license = unknown + makedepends = go + depends = gtk3 + depends = nss + depends = xdg-utils + depends = libxss + provides = lychee-slicer + conflicts = lychee-slicer + options = !debug + options = !strip + source = lychee-slicer-patched-1.1.tar.gz::https://vaclive.party/software/lychee-slicer/archive/v1.1.tar.gz + source = lychee-slicer-7.0.2.deb::https://mango-lychee.nyc3.digitaloceanspaces.com/LycheeSlicer-7.0.2.deb + source = lycheeslicer.sh + sha256sums = a804e3af0a92ad634a4b5bb7a95e509c4eab447285367272c9830cd9179f4dc8 + sha256sums = 2742f3dec76623fdad146559789710d4faa4e31e4d5d73b1b9740bc817243cf7 + sha256sums = b4c98d9cbc595801c2b36e1a59838eb6bd0f46394689ded48b0fa7649056849d + +pkgname = lychee-slicer-patched diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dd1f854 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +* +!.gitignore +!PKGBUILD +!.SRCINFO +!lycheeslicer.sh \ No newline at end of file diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..26d8f80 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: neuz +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" +} diff --git a/lycheeslicer.sh b/lycheeslicer.sh new file mode 100644 index 0000000..61f3f71 --- /dev/null +++ b/lycheeslicer.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +exec /opt/LycheeSlicer/lycheeslicer-launcher -program /opt/LycheeSlicer/lycheeslicer -proxy -- "$@" \ No newline at end of file