hasufell-repository/packages/dev-lang/elixir/files/0001-Allow-to-set-BINDIR-for-binaries-and-SHARE_PREFIX-fo.patch

49 lines
1.9 KiB
Diff
Raw Normal View History

2016-06-25 11:07:45 +00:00
Author: Julian Ospald <hasufell@posteo.de>
Reason: Allow to set BINDIR for binaries and SHARE_PREFIX for manpages
Upstream: submitted, https://github.com/elixir-lang/elixir/pull/4887
2016-06-25 11:07:45 +00:00
--- elixir-1.3.0/Makefile
+++ elixir-1.3.0/Makefile
@@ -1,5 +1,6 @@
REBAR ?= "$(CURDIR)/rebar"
PREFIX ?= /usr/local
+SHARE_PREFIX ?= $(PREFIX)/share
2016-06-25 11:07:45 +00:00
DOCS := v1.3
CANONICAL := stable
ELIXIRC := bin/elixirc --verbose --ignore-module-conflict
2016-06-25 11:07:45 +00:00
@@ -8,6 +9,7 @@
VERSION := $(strip $(shell cat VERSION))
Q := @
LIBDIR := lib
+BINDIR := bin
INSTALL = install
INSTALL_DIR = $(INSTALL) -m755 -d
INSTALL_DATA = $(INSTALL) -m644
2016-06-25 11:07:45 +00:00
@@ -105,9 +107,9 @@
done
$(Q) $(INSTALL_DIR) "$(DESTDIR)$(PREFIX)/$(LIBDIR)/elixir/bin"
$(Q) $(INSTALL_PROGRAM) $(filter-out %.ps1, $(filter-out %.bat, $(wildcard bin/*))) "$(DESTDIR)$(PREFIX)/$(LIBDIR)/elixir/bin"
- $(Q) $(INSTALL_DIR) "$(DESTDIR)$(PREFIX)/bin"
+ $(Q) $(INSTALL_DIR) "$(DESTDIR)$(PREFIX)/$(BINDIR)"
$(Q) for file in "$(DESTDIR)$(PREFIX)"/$(LIBDIR)/elixir/bin/* ; do \
- ln -sf "../$(LIBDIR)/elixir/bin/$${file##*/}" "$(DESTDIR)$(PREFIX)/bin/" ; \
+ ln -sf "../$(LIBDIR)/elixir/bin/$${file##*/}" "$(DESTDIR)$(PREFIX)/$(BINDIR)/" ; \
done
$(MAKE) install_man
2016-06-25 11:07:45 +00:00
@@ -255,9 +257,9 @@
rm -f man/iex.1
install_man: build_man
- $(Q) mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
- $(Q) $(INSTALL_DATA) man/elixir.1 $(DESTDIR)$(PREFIX)/share/man/man1
- $(Q) $(INSTALL_DATA) man/elixirc.1 $(DESTDIR)$(PREFIX)/share/man/man1
- $(Q) $(INSTALL_DATA) man/iex.1 $(DESTDIR)$(PREFIX)/share/man/man1
- $(Q) $(INSTALL_DATA) man/mix.1 $(DESTDIR)$(PREFIX)/share/man/man1
+ $(Q) mkdir -p $(DESTDIR)$(SHARE_PREFIX)/man/man1
+ $(Q) $(INSTALL_DATA) man/elixir.1 $(DESTDIR)$(SHARE_PREFIX)/man/man1
+ $(Q) $(INSTALL_DATA) man/elixirc.1 $(DESTDIR)$(SHARE_PREFIX)/man/man1
+ $(Q) $(INSTALL_DATA) man/iex.1 $(DESTDIR)$(SHARE_PREFIX)/man/man1
+ $(Q) $(INSTALL_DATA) man/mix.1 $(DESTDIR)$(SHARE_PREFIX)/man/man1
$(MAKE) clean_man