blob: e6994918bb01eccbf4c0191c7e67d4255749a31d (
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: "Amhairghin" Oscar Garcia Amor (https://ogarcia.me)
pkgname=lesma
pkgver=1.2.2
pkgrel=1
pkgdesc='Simple paste app friendly with browser and command line written in Rust'
arch=('arm' 'armv6h' 'armv7h' 'aarch64' 'i686' 'x86_64')
url='https://gitlab.com/ogarcia/lesma'
license=('GPL-3.0-or-later')
depends=('gcc-libs')
makedepends=('rust')
options=('!lto')
backup=("etc/${pkgname}.toml")
source=("https://gitlab.com/ogarcia/${pkgname}/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.bz2"
"${pkgname}.service")
b2sums=('885bb2c99385a8da125c5fb85ac1b97e69a30914d7efaa016764c9a3b413f45e469e63a0015216cb2efdcf7a0806e048ffda4598f96a8531322963a46653b93d'
'6512f2d4fc6852cbcb96469890d15ab922d46eeeb6f25b234b074966f3a17b5748936fd5898a0e3c914b59f5b526595cff17f8abc856e58fb5cb4acd83ef2515')
build() {
cd "${pkgbase}-${pkgver}"
cargo build --release --locked --target-dir=target
}
package() {
# binary
install -Dm755 "${srcdir}/${pkgbase}-${pkgver}/target/release/${pkgname}" \
"${pkgdir}/usr/bin/${pkgname}"
# service
install -Dm644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
# conf
install -Dm644 "${srcdir}/${pkgbase}-${pkgver}/${pkgname}.toml.example" \
"${pkgdir}/etc/${pkgname}.toml"
# templates and static directories
install -dm755 "${pkgdir}/usr/lib/${pkgname}"
cp -r "${srcdir}/${pkgbase}-${pkgver}/templates" \
"${srcdir}/${pkgbase}-${pkgver}/static" \
"${pkgdir}/usr/lib/${pkgname}"
}
|