diff options
author | B Stack <bgstack15@gmail.com> | 2020-03-11 08:34:06 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-03-11 08:34:06 -0400 |
commit | b278cce1e12a7ce9dcd49bfbab7cf2fa7e3b1d35 (patch) | |
tree | 8f9359b6f42d8541a4a4f2887319e5caae80b0dc /src/Makefile | |
parent | add DRYRUN and bash_completion to lm-helper (diff) | |
download | logout-manager-b278cce1e12a7ce9dcd49bfbab7cf2fa7e3b1d35.tar.gz logout-manager-b278cce1e12a7ce9dcd49bfbab7cf2fa7e3b1d35.tar.bz2 logout-manager-b278cce1e12a7ce9dcd49bfbab7cf2fa7e3b1d35.zip |
add usage of sudo
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Makefile b/src/Makefile index 9fdad77..fa385cb 100644 --- a/src/Makefile +++ b/src/Makefile @@ -14,6 +14,7 @@ # bgscripts Makefile # Improve: # Document: +# Includes a nice way to dynamically generate dependencies as self-reported by all the files. # Dependencies: APPNAME = logout-manager @@ -30,6 +31,7 @@ DOCDIR = $(SHAREDIR)/doc/$(APPNAME) APPDIR = $(SHAREDIR)/$(APPNAME) APPSDIR = $(SHAREDIR)/applications BASHCDIR = $(SYSCONFDIR)/bash_completion.d +SUDOERSDIR = $(SYSCONFDIR)/sudoers.d awkbin :=$(shell which awk) cpbin :=$(shell which cp) @@ -55,7 +57,7 @@ list: deplist: @if test -z "$(DISTRO)" ; then ${echobin} "Please run \`make deplist\` with DISTRO= one of: `make deplist_opts 2>&1 1>/dev/null | ${xargsbin}`. Aborted." ; exit 1 ; fi - @${grepbin} -h --exclude='Makefile' --exclude-dir='doc' -A5 -riIE dependencies $(SRCDIR) | ${awkbin} -v 'distro=$(DISTRO)' 'tolower($$0) ~ distro {$$1="";$$2="";print}' | ${sortbin} | ${uniqbin} | ${xargsbin} + @${grepbin} -h --exclude='Makefile' --exclude-dir='doc' -A5 -riIE dependencies $(SRCDIR) | ${awkbin} -v 'distro=$(DISTRO)' 'tolower($$0) ~ distro {$$1="";$$2="";print}' | awk 'BEGIN{cmd="${xargsbin} -n1"} $$0 !~ /\(/{print $$0 | cmd ; close(cmd);} $$0 ~ /\(/{print;}' | ${sortbin} | ${uniqbin} | ${xargsbin} deplist_opts: @${echobin} "el7" 1>&2 @@ -63,7 +65,7 @@ deplist_opts: install: @${echobin} Installing files to ${DESTDIR} - ${installbin} -d ${SYSCONFDIR} ${DEFAULTDIR} ${BINDIR} ${APPSDIR} ${APPDIR} ${DOCDIR} ${BASHCDIR} + ${installbin} -d ${SYSCONFDIR} ${DEFAULTDIR} ${BINDIR} ${APPSDIR} ${APPDIR} ${DOCDIR} ${BASHCDIR} ${SUDOERSDIR} ${cpbin} -pr ${SRCDIR}/etc/*.* ${SYSCONFDIR} ${cpbin} -pr ${SRCDIR}/etc/bash_completion.d/* ${BASHCDIR} ${cpbin} -pr ${SRCDIR}/etc/sysconfig/* ${DEFAULTDIR} @@ -71,6 +73,7 @@ install: ${cpbin} -pr ${SRCDIR}/usr/share/applications/* ${APPSDIR} ${cpbin} -pr ${SRCDIR}/usr/share/${APPNAME}/*.* ${APPDIR} ${cpbin} -pr ${SRCDIR}/usr/share/doc/${APPNAME}/* ${DOCDIR} + ${installbin} -m 0640 -t ${SUDOERSDIR} ${SRCDIR}/etc/sudoers.d/* # symlink, when alternatives is not being used ${lnbin} -s logout-manager-gtk.py ${BINDIR}/logout-manager |