[arch-commits] Commit in shards/repos/community-x86_64 (3 files)
Anatol Pomozov
anatolik at archlinux.org
Sun May 3 19:04:10 UTC 2020
Date: Sunday, May 3, 2020 @ 19:04:10
Author: anatolik
Revision: 624607
archrelease: copy trunk to community-x86_64
Added:
shards/repos/community-x86_64/PKGBUILD
(from rev 624606, shards/trunk/PKGBUILD)
shards/repos/community-x86_64/fix_build.patch
(from rev 624606, shards/trunk/fix_build.patch)
Deleted:
shards/repos/community-x86_64/PKGBUILD
-----------------+
PKGBUILD | 72 ++++++++++++++++++++++++++++--------------------------
fix_build.patch | 64 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 102 insertions(+), 34 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2020-05-03 19:03:45 UTC (rev 624606)
+++ PKGBUILD 2020-05-03 19:04:10 UTC (rev 624607)
@@ -1,34 +0,0 @@
-# Maintainer: Anatol Pomozov <anatol.pomozov at gmail.com>
-# Contributor: Jonne Haß <me at jhass.eu>
-
-pkgname=shards
-pkgver=0.9.0
-pkgrel=2
-pkgdesc='The package manager for the Crystal language'
-arch=(x86_64)
-url='https://github.com/crystal-lang/shards'
-license=(Apache)
-depends=(libyaml git pcre libevent gc)
-makedepends=(crystal)
-source=(shards-$pkgver.tar.gz::https://github.com/crystal-lang/shards/archive/v$pkgver.tar.gz)
-sha256sums=('90f230c87cc7b94ca845e6fe34f2523edcadb562d715daaf98603edfa2a94d65')
-
-build() {
- cd shards-$pkgver
- crystal build --release -o bin/shards src/shards.cr
-}
-
-check() {
- cd shards-$pkgver
- ./bin/shards install
- # currently tests fail because they try to write to read-only directory
- #make test
-}
-
-package() {
- cd shards-$pkgver
-
- install -Dm755 bin/shards "$pkgdir/usr/bin/shards"
- install -Dm755 man/shards.1 "$pkgdir/usr/share/man/man1/shards.1"
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
Copied: shards/repos/community-x86_64/PKGBUILD (from rev 624606, shards/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2020-05-03 19:04:10 UTC (rev 624607)
@@ -0,0 +1,38 @@
+# Maintainer: Anatol Pomozov <anatol.pomozov at gmail.com>
+# Contributor: Jonne Haß <me at jhass.eu>
+
+pkgname=shards
+pkgver=0.10.0
+pkgrel=1
+pkgdesc='The package manager for the Crystal language'
+arch=(x86_64)
+url='https://github.com/crystal-lang/shards'
+license=(Apache)
+depends=(libyaml git pcre libevent gc)
+makedepends=(crystal)
+source=(shards-$pkgver.tar.gz::https://github.com/crystal-lang/shards/archive/v$pkgver.tar.gz
+ fix_build.patch) # a few upstream changes to fix the build
+sha256sums=('3aea420df959552d1866d473c878ab1ed0b58489c4c9881ef40a170cfb775459'
+ '61f1a81bd3d6e386de8746fffd7f9bc1ac6db6b5a82f18fd901fd5c5edf7a09c')
+
+prepare() {
+ cd shards-$pkgver
+ patch -p1 < ../fix_build.patch
+}
+
+build() {
+ cd shards-$pkgver
+ CRYSTAL_OPTS=--release make -j1
+}
+
+check() {
+ cd shards-$pkgver
+ # tests are currently failing. TODO: fix it
+ # make test -j1 # https://github.com/crystal-lang/shards/issues/347
+}
+
+package() {
+ cd shards-$pkgver
+ PREFIX=/usr DESTDIR="$pkgdir" make install
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
Copied: shards/repos/community-x86_64/fix_build.patch (from rev 624606, shards/trunk/fix_build.patch)
===================================================================
--- fix_build.patch (rev 0)
+++ fix_build.patch 2020-05-03 19:04:10 UTC (rev 624607)
@@ -0,0 +1,64 @@
+diff --git a/Makefile b/Makefile
+index 0d0b989..35d5543 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,26 +1,29 @@
+ .POSIX:
+
+ CRYSTAL = crystal
+-CRFLAGS =
++SHARDS = shards
+ SHARDS_SOURCES = $(shell find src -name '*.cr')
+-MOLINILLO_SOURCES = $(shell find lib/molinillo -name '*.cr')
++MOLINILLO_SOURCES = $(shell find lib/molinillo -name '*.cr' 2> /dev/null)
+ SOURCES = $(SHARDS_SOURCES) $(MOLINILLO_SOURCES)
+ TEMPLATES = src/templates/*.ecr
+
+-DESTDIR =
+-PREFIX = /usr/local
+-BINDIR = $(DESTDIR)$(PREFIX)/bin
+-MANDIR = $(DESTDIR)$(PREFIX)/share/man
+-INSTALL = /usr/bin/install
++DESTDIR ?=
++PREFIX ?= /usr/local
++BINDIR ?= $(DESTDIR)$(PREFIX)/bin
++MANDIR ?= $(DESTDIR)$(PREFIX)/share/man
++INSTALL ?= /usr/bin/install
++
++MOLINILLO_VERSION = $(shell $(CRYSTAL) eval 'require "yaml"; puts YAML.parse(File.read("shard.lock"))["shards"]["molinillo"]["version"]')
++MOLINILLO_URL = "https://github.com/crystal-lang/crystal-molinillo/archive/v$(MOLINILLO_VERSION).tar.gz"
+
+ all: bin/shards
+
+ clean: phony
+ rm -f bin/shards
+
+-bin/shards: $(SOURCES) $(TEMPLATES)
++bin/shards: $(SOURCES) $(TEMPLATES) lib
+ @mkdir -p bin
+- $(CRYSTAL) build src/shards.cr -o bin/shards $(CRFLAGS)
++ $(CRYSTAL) build src/shards.cr -o bin/shards
+
+ install: bin/shards phony
+ $(INSTALL) -m 0755 -d "$(BINDIR)" "$(MANDIR)/man1" "$(MANDIR)/man5"
+@@ -35,10 +38,17 @@ uninstall: phony
+
+ test: test_unit test_integration
+
+-test_unit: phony
+- $(CRYSTAL) spec ./spec/unit/*_spec.cr
++test_unit: phony lib
++ $(CRYSTAL) spec ./spec/unit/
+
+ test_integration: bin/shards phony
+- $(CRYSTAL) spec ./spec/integration/*_spec.cr
++ $(CRYSTAL) spec ./spec/integration/
++
++lib: shard.lock
++ mkdir -p lib/molinillo
++ $(SHARDS) install || (curl -L $(MOLINILLO_URL) | tar -xzf - -C lib/molinillo --strip-components=1)
++
++shard.lock: shard.yml
++ $(SHARDS) update
+
+ phony:
More information about the arch-commits
mailing list