summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2020-05-29 08:57:58 -0400
committerAndrew Cady <d@jerkface.net>2020-05-29 09:15:47 -0400
commitd0a968010ff1ee1d586abf47f71ada1d65217cf2 (patch)
tree937ba8707356e1b4a288cdef1684da7f9f80ac74 /Makefile
parentf8dbf7aef4f1b1648bd2980b62f2ef57d653e800 (diff)
split makefile in two
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 1 insertions, 28 deletions
diff --git a/Makefile b/Makefile
index 4653156..fa6129a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,33 +1,6 @@
1all: control equivs-stamp 1all: control equivs-stamp
2 2
3ARCH := $(shell dpkg-architecture -q DEB_BUILD_ARCH) 3include src/equivs.mk
4ifndef VERSION
5VERSION := $(shell TZ=UTC date -Is | tr -d :- | tr T . | sed 's/+.*//')
6endif
7export VERSION
8PKG ?= $(notdir $(PWD))
9
10PKG_FILE ?= $(PKG)_$(VERSION)_$(ARCH).deb
11export PKG_FILE
12
13$(PKG_FILE): control
14 equivs-build control
15
16equivs-stamp: control
17 $(MAKE) $(PKG_FILE)
18 $(MAKE) install-remove-equivs
19 rm $(PKG_FILE)
20 touch $@
21
22.PHONY: install-remove-equivs
23install-remove-equivs:
24ifneq (0,$(shell id -u))
25 sudo $(MAKE) PKG_FILE=$(PKG_FILE) MAKEFLAGS=$(MAKEFLAGS) $@
26else
27 dpkg -i $(PKG_FILE)
28 f=$(PKG_FILE); dpkg -r $${f%%_*}
29endif
30#.
31 4
32DD_USER = dyndns 5DD_USER = dyndns
33DD_GROUP = dyndns 6DD_GROUP = dyndns