summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD38
2 files changed, 52 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5213805c545b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = reflex
+ pkgdesc = Run a command when files change
+ pkgver = 0.2.0
+ pkgrel = 1
+ url = https://github.com/cespare/reflex
+ arch = x86_64
+ license = MIT
+ makedepends = go
+ depends = glibc
+ source = reflex-0.2.0.tar.gz::https://github.com/cespare/reflex/archive/v0.2.0.tar.gz
+ sha256sums = 528ef2a0160528d8514f86ce0353497ade0219017a6407e4c08878264b87d4a4
+
+pkgname = reflex
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f18f5b8163da
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Dimitris Kiziridis <ragouel at outlook dot com>
+
+pkgname=reflex
+pkgver=0.2.0
+pkgrel=1
+pkgdesc="Run a command when files change"
+arch=('x86_64')
+url='https://github.com/cespare/reflex'
+license=('MIT')
+depends=('glibc')
+makedepends=('go')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/cespare/reflex/archive/v${pkgver}.tar.gz")
+sha256sums=('528ef2a0160528d8514f86ce0353497ade0219017a6407e4c08878264b87d4a4')
+
+prepare() {
+ cd "${pkgname}-${pkgver}"
+ mkdir -p build/
+}
+
+build() {
+ cd "${pkgname}-${pkgver}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export GOPATH="${srcdir}"/go
+ export PATH=$PATH:$GOPATH/bin
+ export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+ go get -d -v ./...
+ go build -o build ./...
+ go clean -modcache # Clean go cache
+}
+
+package() {
+ cd "${pkgname}-${pkgver}"
+ install -Dm755 build/${pkgname}-${pkgver} "${pkgdir}/usr/bin/${pkgname}"
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+} \ No newline at end of file