| 1 | # Maintainer: posprint contributors
|
| 2 | pkgname=posprint
|
| 3 | pkgver=0.1.0
|
| 4 | pkgrel=1
|
| 5 | pkgdesc="Designer for POS-print documents with live preview and USB ESC/POS printing"
|
| 6 | arch=('x86_64')
|
| 7 | url="https://gitlab.com/Timfa/posprint"
|
| 8 | license=('MIT')
|
| 9 | depends=(
|
| 10 | 'gcc-libs'
|
| 11 | 'libxkbcommon'
|
| 12 | 'libxcb'
|
| 13 | 'openssl'
|
| 14 | 'dbus-libs'
|
| 15 | 'wayland'
|
| 16 | 'libx11'
|
| 17 | 'fontconfig'
|
| 18 | 'freetype2'
|
| 19 | 'libglvnd'
|
| 20 | )
|
| 21 | makedepends=('rust' 'cargo' 'pkgconf' 'git')
|
| 22 | options=('!lto')
|
| 23 | source=()
|
| 24 | sha256sums=()
|
| 25 |
|
| 26 | prepare() {
|
| 27 | local root="$startdir/../.."
|
| 28 | mkdir -p "$srcdir/$pkgname-$pkgver"
|
| 29 | rsync -a \
|
| 30 | --exclude target \
|
| 31 | --exclude .git \
|
| 32 | --exclude packaging/arch/pkg \
|
| 33 | --exclude packaging/arch/src \
|
| 34 | --exclude 'packaging/arch/*.pkg.tar.zst' \
|
| 35 | --exclude 'packaging/arch/*.pkg.tar.zst.sig' \
|
| 36 | "$root/" "$srcdir/$pkgname-$pkgver/"
|
| 37 | }
|
| 38 |
|
| 39 | build() {
|
| 40 | cd "$srcdir/$pkgname-$pkgver"
|
| 41 | cargo build --release --locked
|
| 42 | }
|
| 43 |
|
| 44 | package() {
|
| 45 | cd "$srcdir/$pkgname-$pkgver"
|
| 46 | install -Dm755 target/release/posprint "$pkgdir/usr/bin/posprint"
|
| 47 | install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
| 48 | install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
|
| 49 | }
|