aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-04-02 23:39:28 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-04-02 23:40:00 +0200
commit9ccdb70ea2b02aabb1dc27fd618fd1438fbd7ae2 (patch)
tree0392847f61af50dd92ae0249752e4bf84ae44024 /community
parent63900f59e4fd1c6d98030562281626efabe4c08f (diff)
downloadaports-9ccdb70ea2b02aabb1dc27fd618fd1438fbd7ae2.tar.bz2
aports-9ccdb70ea2b02aabb1dc27fd618fd1438fbd7ae2.tar.xz
community/shards: move from testing
Diffstat (limited to 'community')
-rw-r--r--community/shards/APKBUILD49
-rw-r--r--community/shards/makefile-install.patch52
-rw-r--r--community/shards/use-git-bare-instead-of-mirror.patch18
3 files changed, 119 insertions, 0 deletions
diff --git a/community/shards/APKBUILD b/community/shards/APKBUILD
new file mode 100644
index 0000000000..5cc2c15583
--- /dev/null
+++ b/community/shards/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=shards
+pkgver=0.7.2
+pkgrel=0
+_minitestver=0.3.6
+pkgdesc="Dependency manager for the Crystal language"
+url="https://github.com/crystal-lang/shards"
+arch="x86_64 aarch64" # limited by crystal aport
+license="Apache-2.0"
+depends="crystal git"
+makedepends="yaml-dev"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/crystal-lang/$pkgname/archive/v$pkgver.tar.gz
+ minitest.cr-$_minitestver.tar.gz::https://github.com/ysbaddaden/minitest.cr/archive/v$_minitestver.tar.gz
+ use-git-bare-instead-of-mirror.patch
+ makefile-install.patch
+ "
+builddir="$srcdir/$pkgname-$pkgver"
+
+export CRYSTAL_CACHE_DIR="$srcdir/.cache"
+
+prepare() {
+ default_prepare
+ cd "$builddir"
+
+ mkdir -p lib
+ ln -s ../../minitest.cr-$_minitestver lib/minitest
+}
+
+build() {
+ cd "$builddir"
+ make release CRFLAGS=""
+}
+
+check() {
+ cd "$builddir"
+ make test_integration
+}
+
+package() {
+ cd "$builddir"
+ make install DESTDIR="$pkgdir" PREFIX=/usr
+}
+
+sha512sums="a99648ae292095278578e47971b556a0da90743db62689a76aae9eab986ad2185ad7adc13c4340f12fce835c5383d8aac93e35258d01fa658e521314eafaf942 shards-0.7.2.tar.gz
+4f802475c6b1be0d1c8844fed1aeba09b8b2b893f413e25115c1687d35348357e9c0076169e38721bedc3cb31ac2463a7c1b243841554f3eca470608a62438a5 minitest.cr-0.3.6.tar.gz
+ab640ab81273042b303abcd23b459f45dfdb8a725bff41043118750d03e6ba0c6bb86a5507f90bb74bf83cb14288dd35ece83b12c63b300f01bf6110e67099cc use-git-bare-instead-of-mirror.patch
+6d5ff4cd2cdf41a4805f17459c614ddc6fbc98df49304067c927e27aaa6c43460409789c7871cfbead27a6d13d3d9b92b80b2aec9a76eefb9b11cf9feb17045b makefile-install.patch"
diff --git a/community/shards/makefile-install.patch b/community/shards/makefile-install.patch
new file mode 100644
index 0000000000..953a321176
--- /dev/null
+++ b/community/shards/makefile-install.patch
@@ -0,0 +1,52 @@
+From 92bca3f71124749e80fb7a41918a90287681785d Mon Sep 17 00:00:00 2001
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Wed, 28 Mar 2018 00:42:00 +0200
+Subject: [PATCH] Makefile: Add install rules
+
+Upstream-Issue: https://github.com/crystal-lang/shards/pull/197
+---
+ Makefile | 19 +++++++++++++++++++
+ README.md | 8 +++++---
+ 2 files changed, 24 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 0440a4b..4acf4d3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -4,6 +4,11 @@ VERSION := $(shell cat VERSION)
+ OS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
+ ARCH := $(shell uname -m)
+
++DESTDIR := /
++PREFIX := /usr/local
++BINDIR := $(DESTDIR)$(PREFIX)/bin
++MANDIR := $(DESTDIR)$(PREFIX)/share/man
++
+ ifeq ($(OS),linux)
+ CRFLAGS := --link-flags "-static -L/opt/crystal/embedded/lib"
+ endif
+@@ -12,6 +17,7 @@ ifeq ($(OS),darwin)
+ CRFLAGS := --link-flags "-L."
+ endif
+
++MANPAGES := $(wildcard src/man/*.[1-8])
+ SOURCES := $(wildcard src/*.cr src/**/*.cr)
+ TEMPLATES := $(wildcard src/templates/*.ecr)
+
+@@ -58,3 +64,16 @@ test_unit:
+ test_integration: all
+ $(CRYSTAL) run test/integration/*_test.cr -- --parallel=1
+
++.PHONY: install
++install: install-bin install-man
++
++.PHONY: install-bin
++install-bin: bin/shards
++ mkdir -p $(BINDIR)
++ cp bin/shards $(BINDIR)/
++
++.PHONY: install-man
++install-man:
++ mkdir -p $(MANDIR)/man1 $(MANDIR)/man5
++ cp $(filter %.1,$(MANPAGES)) $(MANDIR)/man1/
++ cp $(filter %.5,$(MANPAGES)) $(MANDIR)/man5/
diff --git a/community/shards/use-git-bare-instead-of-mirror.patch b/community/shards/use-git-bare-instead-of-mirror.patch
new file mode 100644
index 0000000000..fef88e5a7e
--- /dev/null
+++ b/community/shards/use-git-bare-instead-of-mirror.patch
@@ -0,0 +1,18 @@
+From 3a64a76b495708a7f3bf7969e85b26817e094cc8 Mon Sep 17 00:00:00 2001
+From: Julien Portalier <julien@portalier.com>
+Date: Tue, 12 Dec 2017 10:19:44 +0100
+Subject: [PATCH] Fix: use git --bare instead of --mirror
+
+Patch-Source: https://github.com/crystal-lang/shards/commit/3a64a76b495708a7f3bf7969e85b26817e094cc8
+
+--- a/src/resolvers/git.cr
++++ b/src/resolvers/git.cr
+@@ -178,7 +178,7 @@
+
+ private def clone_repository
+ Dir.mkdir_p(Shards.cache_path) unless Dir.exists?(Shards.cache_path)
+- run "git clone --mirror --quiet -- #{FileUtils.escape git_url} #{dependency.name}",
++ run "git clone --bare --quiet -- #{FileUtils.escape git_url} #{dependency.name}",
+ path: File.dirname(local_path)
+ rescue Error
+ raise Error.new("Failed to clone #{git_url}")