From 8a898aa77ccf8526a54b47fa072c462907926fcf Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 28 Mar 2018 01:27:21 +0200 Subject: testing/shards: new aport https://github.com/crystal-lang/shards Dependency manager for the Crystal language --- testing/shards/makefile-install.patch | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 testing/shards/makefile-install.patch (limited to 'testing/shards/makefile-install.patch') diff --git a/testing/shards/makefile-install.patch b/testing/shards/makefile-install.patch new file mode 100644 index 0000000000..953a321176 --- /dev/null +++ b/testing/shards/makefile-install.patch @@ -0,0 +1,52 @@ +From 92bca3f71124749e80fb7a41918a90287681785d Mon Sep 17 00:00:00 2001 +From: Jakub Jirutka +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/ -- cgit v1.2.3