installDir = ${pkgdir}/usr/local/bin list = ./maat-builder systemdList = ./maat-builder.timer ./maat-builder.service serverRoot = /srv/maat/ owner=root perms=0755 compile: /bin/bash @echo Nothing to compile. install: ${list} mkdir -p ${installDir} mkdir -p ${pkgdir}${serverRoot}/src mkdir -p ${pkgdir}${serverRoot}/pkg for i in ${list}; do install -m ${perms} -o ${owner} $$i ${installDir}; done for i in ${systemdList}; do install -m 0644 -o root $$i ${pkgdir}/usr/lib/systemd/system; done clean: cat .gitignore | xargs rm -Rf uninstall: for i in ${list}; do rm -Rf ${installDir}/$$i; done for i in ${systemdList}; do rm /usr/lib/systemd/system/$$i; done rmdir -p ${pkgdir}${serverRoot}/src rmdir -p ${pkgdir}${serverRoot}/pkg test: ./maat-builder -T -U ${USER} make clean diff: for i in ${list}; do if [ -f ${installDir}/$$i ]; then diff "$$i" "${installDir}/$$i"; fi done reverse: for i in ${list}; do if [ -f ${installDir}/$$i ]; then cp "${installDir}/$$i" "$$i"; fi done checkperm: chown -R ${owner}: ${pkgdir}${serverRoot}/src chown -R ${owner}: ${pkgdir}${serverRoot}/pkg for i in ${list}; do chown -R ${owner}: "${installDir}/$$i"; chmod ${perms} "${installDir}/$$i"; done