summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorOlav Vitters <olav@vitters.nl>2020-07-29 11:58:14 +0200
committerOlav Vitters <olav@vitters.nl>2020-07-29 11:58:14 +0200
commitd5fc0ca6fd9270ed6a4d6fbd716dd22fb52df44b (patch)
treef0074eefd94999d165ef4db5e4d23e7a70db3fbd /Makefile
parenta8a33eff9de7ba836c5e187019dc5036f2b243f0 (diff)
downloadsetup-d5fc0ca6fd9270ed6a4d6fbd716dd22fb52df44b.tar
setup-d5fc0ca6fd9270ed6a4d6fbd716dd22fb52df44b.tar.gz
setup-d5fc0ca6fd9270ed6a4d6fbd716dd22fb52df44b.tar.bz2
setup-d5fc0ca6fd9270ed6a4d6fbd716dd22fb52df44b.tar.xz
setup-d5fc0ca6fd9270ed6a4d6fbd716dd22fb52df44b.zip
Makefile: support standard GNU Makefile variables, similar to Makefile from initscripts
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile44
1 files changed, 38 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index faf52ad..2d7535b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,38 @@
+# Basic Makefile for compiling & installing the files.
+#
+# Supports standard GNU Makefile variables for specifying the paths:
+# * prefix
+# * exec_prefix
+# * bindir
+# * sbindir
+# * libdir
+# * datarootdir
+# * datadir
+# * mandir
+# * sysconfdir
+# * localstatedir
+# * DESTDIR
+#
+
+SHELL = /bin/bash
+
+# Normally /usr/local is used. However, it does not make sense for us to use it
+# here, as it just complicates things even further.
+prefix = /usr
+exec_prefix = $(prefix)
+bindir = $(prefix)/bin
+sbindir = $(prefix)/sbin
+libdir = $(prefix)/lib
+libexecdir = $(exec_prefix)/libexec
+datarootdir = $(prefix)/share
+datadir = $(datarootdir)
+mandir = $(datadir)/man
+sysconfdir = /etc
+localstatedir = /var
+sharedstatedir = $(localstatedir)/lib
+
NAME = setup
VERSION = 2.7.24
-SVNPATH = svn+ssh://svn.mageia.org/svn/soft/$(PACKAGE)
LIST = csh.cshrc csh.login gshadow group host.conf hosts.allow hosts.deny inputrc \
motd passwd printcap protocols securetty services shadow shells profile \
@@ -17,13 +49,13 @@ clean:
rm -f *~ \#*\#
install:
- install -d -m 755 $(DESTDIR)/etc/
- install -d -m 755 $(DESTDIR)/var/log/
+ install -d -m 755 $(DESTDIR)$(sysconfdir)
+ install -d -m 755 $(DESTDIR)$(localstatedir)/log/
for i in $(LIST); do \
- cp -avf $$i $(DESTDIR)/etc/$$i; \
+ cp -avf $$i $(DESTDIR)$(sysconfdir)/$$i; \
done
- chmod 0600 $(DESTDIR)/etc/securetty
- echo -n '' > $(DESTDIR)/var/log/lastlog
+ chmod 0600 $(DESTDIR)$(sysconfdir)/securetty
+ echo -n '' > $(DESTDIR)$(localstatedir)/log/lastlog
dist:
@git archive --format=tar --prefix=$(NAME)-$(VERSION)/ HEAD | xz > $(NAME)-$(VERSION).tar.xz