summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 7e402c6..d1db389 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2012-2014, 2016-2018 Luke Shumaker <lukeshu@parabola.nu>
+# Copyright (c) 2012-2014, 2016-2019 Luke Shumaker <lukeshu@parabola.nu>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -27,6 +27,7 @@ systemddir = $(prefix)/lib/systemd/system
uwsgidir = /etc/uwsgi
pkglibexecdir = $(libexecdir)/parabolaweb-utils
pkgconffile = $(sysconfdir)/parabolaweb
+sudoersdir = /etc/sudoers.d
webuser = parabolaweb
@@ -46,9 +47,10 @@ targets = \
$(systemddir)/parabolaweb-reporead-inotify.service \
$(systemddir)/parabolaweb-reporead-rsync.service \
$(systemddir)/parabolaweb-reporead-rsync.timer \
- $(uwsgidir)/parabolaweb.ini
+ $(uwsgidir)/parabolaweb.ini \
+ $(sudoersdir)/10-parabolaweb
-files.out.all = depends.txt $(filter-out $(files.src.src),$(notdir $(targets)))
+files.out.all = depends.txt $(filter-out $(files.src.src),$(notdir $(patsubst $(sudoersdir)/%,%.sudoers,$(targets))))
files.sys.all = $(targets) $(pkgconffile)
# Pattern rules
@@ -74,6 +76,12 @@ $(DESTDIR)$(systemddir)/%.timer: %.timer
$(DESTDIR)$(uwsgidir)/%: %
install -Dm644 $< $@
+$(DESTDIR)$(sudoersdir)/%: %.sudoers | $(DESTDIR)$(sudoersdir)
+ install -Dm644 $< $@
+
+$(DESTDIR)$(sudoersdir):
+ install -dm750 $@
+
# Specific rules
depends.txt: list-depends depends_static.txt