summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-04-22 09:03:47 +0200
committerMichał Górny <mgorny@gentoo.org>2017-04-22 09:27:26 +0200
commitec76f6e000bdfdc91f4b5da7fa05c57a39cc3f27 (patch)
tree7b8acd30aa609405c4e36db42dea68bc9a95bac1 /Makefile
parentMove patches from ::gentoo (diff)
downloadelt-patches-ec76f6e000bdfdc91f4b5da7fa05c57a39cc3f27.tar.gz
elt-patches-ec76f6e000bdfdc91f4b5da7fa05c57a39cc3f27.tar.bz2
elt-patches-ec76f6e000bdfdc91f4b5da7fa05c57a39cc3f27.zip
Add application script, and a Makefile20170422
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile47
1 files changed, 47 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..05a8b7e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESTDIR =
+prefix = /usr
+bindir = $(prefix)/bin
+libdirname = lib
+datadir = $(prefix)/share
+patchdir = $(datadir)/elt-patches
+
+all: eltpatch
+install: install-bin install-patch
+distclean: clean
+
+eltpatch: eltpatch.in
+ rm -f $@ $@.tmp
+ sed -e 's^@ELT_patchdir@^$(patchdir)^' \
+ -e 's^@ELT_libdir@^$(libdirname)^' \
+ $< > $@.tmp
+ chmod +x $@.tmp
+ mv $@.tmp $@
+
+clean:
+ rm -f eltpatch
+
+install-bin: eltpatch
+ install -d $(DESTDIR)$(bindir)
+ install -m0755 $< $(DESTDIR)$(bindir)
+
+install-patch:
+ install -d $(DESTDIR)$(patchdir)
+ cd patches && \
+ for dir in */; do \
+ install -d $(DESTDIR)$(patchdir)/$${dir} || exit 1; \
+ for file in $${dir}/*; do \
+ install -m0644 $${file} $(DESTDIR)$(patchdir)/$${dir} \
+ || exit 1; \
+ done; \
+ done
+
+dist:
+ rm -f elt-patches-$$(date +%Y%m%d).tar.xz elt-patches-$$(date +%Y%m%d).tar
+ git archive -o elt-patches-$$(date +%Y%m%d).tar \
+ --prefix=elt-patches-$$(date +%Y%m%d)/ \
+ --format=tar \
+ HEAD
+ xz -9 elt-patches-$$(date +%Y%m%d).tar