diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-04-02 23:39:28 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-04-02 23:40:00 +0200 |
commit | 9ccdb70ea2b02aabb1dc27fd618fd1438fbd7ae2 (patch) | |
tree | 0392847f61af50dd92ae0249752e4bf84ae44024 /community/shards/makefile-install.patch | |
parent | 63900f59e4fd1c6d98030562281626efabe4c08f (diff) | |
download | aports-9ccdb70ea2b02aabb1dc27fd618fd1438fbd7ae2.tar.bz2 aports-9ccdb70ea2b02aabb1dc27fd618fd1438fbd7ae2.tar.xz |
community/shards: move from testing
Diffstat (limited to 'community/shards/makefile-install.patch')
-rw-r--r-- | community/shards/makefile-install.patch | 52 |
1 files changed, 52 insertions, 0 deletions
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/ |