summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO22
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD41
3 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b7c14ed2a526
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = shards-git
+ pkgdesc = The package manager for the Crystal language (git version)
+ pkgver = v0.4.0.r0.gff83fe9
+ pkgrel = 1
+ url = https://github.com/ysbaddaden/shards
+ arch = i686
+ arch = x86_64
+ license = Apache
+ makedepends = crystal
+ depends = libyaml
+ depends = git
+ depends = libpcl
+ depends = libunwind
+ depends = libevent
+ depends = gc
+ provides = shards
+ conflicts = shards
+ source = git+https://github.com/ysbaddaden/shards.git
+ sha256sums = SKIP
+
+pkgname = shards-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..b0140e422d96
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+shards/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6c295e1b32b4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Jonne Haß <me@jhass.eu>
+pkgname=shards-git
+pkgver=v0.4.0.r0.gff83fe9
+pkgrel=1
+pkgdesc="The package manager for the Crystal language (git version)"
+arch=('i686' 'x86_64')
+url="https://github.com/ysbaddaden/shards"
+license=('Apache')
+conflicts=('shards')
+provides=('shards')
+depends=('libyaml' 'git' 'libpcl' 'libunwind' 'libevent' 'gc')
+makedepends=('crystal')
+source=("git+https://github.com/ysbaddaden/shards.git")
+
+pkgver() {
+ cd "$srcdir/${pkgname/-git/}"
+ ( set -o pipefail
+ git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+build() {
+ cd "${pkgname/-git/}"
+
+ crystal build --release -o bin/shards src/shards.cr
+}
+
+check() {
+ cd "${pkgname/-git/}"
+ ./bin/shards install
+ make -j1 test
+}
+
+package() {
+ cd "${pkgname/-git/}"
+
+ install -Dm755 bin/shards "$pkgdir/usr/bin/shards"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+sha256sums=('SKIP')