aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2024-09-24 19:57:24 -0400
committerB. Stack <bgstack15@gmail.com>2024-09-24 19:57:24 -0400
commit0f9ad0d0b810def89705d4c7fbbff962b16ba4c4 (patch)
tree3061220ed78cfe4f4c137e5973c451dd307f1bca /Makefile
parentadd image to readme (diff)
downloadfprintd-tk-0f9ad0d0b810def89705d4c7fbbff962b16ba4c4.tar.gz
fprintd-tk-0f9ad0d0b810def89705d4c7fbbff962b16ba4c4.tar.bz2
fprintd-tk-0f9ad0d0b810def89705d4c7fbbff962b16ba4c4.zip
dpkg build recipe and assetsHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile61
1 files changed, 61 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..33a658d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,61 @@
+# File: minimal Makefile for dependency resolution only
+# Author: bgstack15
+# Startdate: 2018-11-24
+# Dependencies:
+
+APPNAME = fprintd-tk
+APPVERSION = 0.0.1
+SRCDIR = $(CURDIR)
+prefix = /usr
+SYSCONFDIR = $(DESTDIR)/etc
+DEFAULTDIR = $(DESTDIR)/etc/sysconfig # for debian use '$(DESTDIR)/etc/default'
+BINDIR = $(DESTDIR)$(prefix)/bin
+LIBEXECDIR = $(DESTDIR)$(prefix)/libexec
+SBINDIR = $(DESTDIR)$(prefix)/sbin
+SHAREDIR = $(DESTDIR)$(prefix)/share
+DOCDIR = $(SHAREDIR)/doc/$(APPNAME)
+APPDIR = $(SHAREDIR)/$(APPNAME)
+APPSDIR = $(SHAREDIR)/applications
+ICONSDIR = $(SHAREDIR)/icons
+MIMEDIR = $(SHAREDIR)/mime
+MANDIR = $(SHAREDIR)/man
+XDGAUTODIR = $(SYSCONFDIR)/xdg/autostart
+SYSVDIR = $(SYSCONFDIR)/init.d
+SYSDDIR = $(DESTDIR)$(prefix)/lib/systemd/system
+
+# variables for deplist
+DEPTYPE = dep
+SEPARATOR = ,
+
+awkbin :=$(shell which awk)
+chmodbin :=$(shell which chmod)
+cpbin :=$(shell which cp)
+echobin :=$(shell which echo)
+falsebin :=$(shell which false)
+findbin :=$(shell which find)
+grepbin :=$(shell which grep)
+gzipbin :=$(shell which gzip)
+installbin :=$(shell which install)
+rmbin :=$(shell which rm)
+rmdirbin :=$(shell which rmdir)
+sedbin :=$(shell which sed)
+sortbin :=$(shell which sort)
+truebin :=$(shell which true)
+uniqbin :=$(shell which uniq)
+xargsbin :=$(shell which xargs)
+
+.PHONY: clean list deplist deplist_opts
+
+list:
+ @$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | ${awkbin} -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | ${sortbin} | ${grepbin} -E -v -e '^[^[:alnum:]]' -e '^$@$$'
+
+deplist:
+ @# deplist 2020-04-18 input must be comma separated
+ @# DEPTYPE( dep , rec , sug ) for depends, recommends, or suggests
+ @if test -z "${DISTRO}" ; then ${echobin} "Please run \`make deplist\` with DISTRO= one of: `make deplist_opts 2>&1 1>/dev/null | ${xargsbin}`. Aborted." 1>&2 ; exit 1 ; fi
+ @if ! ${echobin} "${DEPTYPE}" | grep -qE "^(dep|rec|sug)$$" ; then ${echobin} "Please run \`make deplist\` with DEPTYPE= one of: dep, rec, sug. Undefined will use \`dep\`. Aborted." 1>&2 ; exit 1; fi
+ @${grepbin} -h --exclude-dir='doc' -riIE "\<${DEPTYPE}-" ${SRCDIR} | ${awkbin} -v "domain=${DISTRO}" -v "deptype=${DEPTYPE}" 'tolower($$2) ~ deptype"-"domain {$$1="";$$2="";print}' | tr ',' '\n' | ${sortbin} | ${uniqbin} | ${sedbin} -r -e 's/^\s*//' -e "s/\s*\$$/${SEPARATOR}/" | ${xargsbin}
+
+deplist_opts:
+ @# deplist_opts 2020-04-18 find all available dependency domains
+ @${grepbin} -h -o -riIE '\<(dep|rec|sug)-[^\ :]+:' ${SRCDIR} | ${sedbin} -r -e 's/(dep|rec|sug)-//;' -e 's/:$$//;' | ${sortbin} | ${uniqbin} 1>&2
bgstack15