blob: 84d12d40382d85d6e8c1efa5f2a1aad21ca4e22a (
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
|
# Maintainer: Odd-Harald Lillestø Myhren <knarkzel@cock.li>
pkgname=groffdown
pkgver=0.1.0
pkgrel=1
pkgdesc="wrapper for creating documents with markdown using groff as backend, because groff is fast and convenient"
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
url="https://gitlab.com/knarkzel/groffdown"
source=("git+$url")
license=('MIT')
makedepends=('rust' 'cargo' 'git')
depends=('gcc-libs')
md5sums=('SKIP')
build() {
cd "$pkgname"
if command -v rustup > /dev/null 2>&1; then
RUSTFLAGS="-C target-cpu=native" rustup run stable \
cargo build --release
elif rustc --version | grep -q stable; then
RUSTFLAGS="-C target-cpu=native" \
cargo build --release
else
cargo build --release
fi
}
pkgver() {
cd "$pkgname"
local tag=$(git tag --sort=-v:refname | grep '^[0-9]' | head -1)
local commits_since=$(git rev-list $tag..HEAD --count)
echo "$tag.r$commits_since.$(git log --pretty=format:'%h' -n 1)"
}
package() {
cd "$pkgname"
install -Dm755 "target/release/groffdown" "$pkgdir/usr/bin/groffdown"
}
|