summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 36bd5773ae69d2596c1c34610446ce28fcf14ebb (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
# Maintainer: Filipe Bertelli <filipebertelli@tutanota.com>

pkgname=fname
pkgver=0.4.1
pkgrel=2
pkgdesc=' Generate random, human-friendly names.'
arch=('i686' 'x86_64' 'armv7h' 'aarch64')
url='https://github.com/Splode/fname'
license=('MIT')
depends=('glibc')
makedepends=('go')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('8e5a22556adc08877e67cecb710342d4d225edfcc4b11163b2abbe2ccecbcda7')

build() {
	cd "${pkgname}-${pkgver}/cmd/${pkgname}"

	# Build package
	go build -o "${pkgname}"
}

package() {
	# Install binary
	install -Dm755 "${pkgname}-${pkgver}/cmd/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"

	cd "${pkgname}-${pkgver}"

	# Install LICENSE
	install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

	# Install README.md
	install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}