2019-04-08 05:05:08 -05:00
|
|
|
installDir = ${pkgdir}/usr/local/bin
|
2023-02-22 17:56:30 -06:00
|
|
|
list = ./maat
|
|
|
|
systemdList = ./maat.timer ./maat.service
|
2019-04-08 05:05:08 -05:00
|
|
|
serverRoot = /srv/maat/
|
2023-02-22 17:56:30 -06:00
|
|
|
owner=maat
|
2019-04-08 05:05:08 -05:00
|
|
|
perms=0755
|
2019-07-25 13:01:53 -05:00
|
|
|
fileperms=0644
|
2019-02-18 07:56:39 -06:00
|
|
|
|
|
|
|
compile: /bin/bash
|
|
|
|
@echo Nothing to compile.
|
|
|
|
|
2023-02-22 17:56:30 -06:00
|
|
|
install: ${list} MaatIcon.png
|
2019-04-08 05:05:08 -05:00
|
|
|
mkdir -p ${installDir}
|
|
|
|
mkdir -p ${pkgdir}${serverRoot}/src
|
|
|
|
mkdir -p ${pkgdir}${serverRoot}/pkg
|
2023-02-22 17:56:30 -06:00
|
|
|
install -m ${fileperms} -o ${owner} ./MaatIcon.png ${pkgdir}${serverRoot}/pkg
|
2019-07-25 13:01:53 -05:00
|
|
|
mkdir -p ${pkgdir}/usr/lib/systemd/system
|
2023-02-22 17:56:30 -06:00
|
|
|
for i in ${list}; do install -m ${perms} -o root $$i ${installDir}; done
|
|
|
|
install -m ${perms} -o ${owner} -d ${pkgdir}/usr/local/etc/Maat/
|
|
|
|
touch ${pkgdir}/usr/local/etc/Maat/aur.list; chown ${owner} ${pkgdir}/usr/local/etc/Maat/aur.list; chmod ${fileperms} ${pkgdir}/usr/local/etc/Maat/aur.list
|
2019-04-08 05:05:08 -05:00
|
|
|
for i in ${systemdList}; do install -m 0644 -o root $$i ${pkgdir}/usr/lib/systemd/system; done
|
2019-02-18 07:56:39 -06:00
|
|
|
|
|
|
|
clean:
|
2023-02-22 17:56:30 -06:00
|
|
|
cat .gitignore | sudo xargs rm -Rf
|
2019-02-18 07:56:39 -06:00
|
|
|
|
|
|
|
uninstall:
|
2019-04-08 05:05:08 -05:00
|
|
|
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
|
2019-02-18 07:56:39 -06:00
|
|
|
|
2019-07-25 13:01:53 -05:00
|
|
|
test: clean
|
2023-02-22 17:56:30 -06:00
|
|
|
sudo ./maat -u $$USER -T
|
2019-07-25 13:01:53 -05:00
|
|
|
test -d src
|
2023-02-22 17:56:30 -06:00
|
|
|
test -d src/ascii-invaders
|
|
|
|
test -d src/ascii-invaders/.git
|
2019-07-25 13:01:53 -05:00
|
|
|
test -d src/HelloWorld
|
|
|
|
test -d src/HelloWorld/.git
|
|
|
|
test -d pkg
|
|
|
|
test -d pkg/aur
|
|
|
|
test -f pkg/AniNIX.db
|
|
|
|
test -f pkg/AniNIX.db.sig
|
2023-02-22 17:56:30 -06:00
|
|
|
test -f pkg/HelloWorld*.tar.zst
|
2019-07-25 13:01:53 -05:00
|
|
|
test -f pkg/aur/aur.db
|
|
|
|
test -f pkg/aur/aur.db.sig
|
2023-02-22 17:56:30 -06:00
|
|
|
test -f pkg/aur/ascii-invaders*.tar.zst
|
2019-07-25 13:01:53 -05:00
|
|
|
[ `wc -l pkg/index.html | cut -f 1 -d ' '` -eq 24 ]
|
2023-02-22 17:56:30 -06:00
|
|
|
make clean
|
2019-07-25 13:01:53 -05:00
|
|
|
@echo
|
|
|
|
@echo Tests passed successfully.
|
2019-02-18 07:56:39 -06:00
|
|
|
|
|
|
|
diff:
|
2023-02-22 17:56:30 -06:00
|
|
|
for i in ${list}; do if [ -f ${installDir}/$$i ]; then diff "$$i" "${installDir}/$$i"; fi done
|
2019-02-18 07:56:39 -06:00
|
|
|
|
|
|
|
reverse:
|
2023-02-22 17:56:30 -06:00
|
|
|
for i in ${list}; do if [ -f ${installDir}/$$i ]; then cp "${installDir}/$$i" "$$i"; fi done
|
2019-02-18 07:56:39 -06:00
|
|
|
|
|
|
|
checkperm:
|
2019-04-08 05:05:08 -05:00
|
|
|
chown -R ${owner}: ${pkgdir}${serverRoot}/src
|
|
|
|
chown -R ${owner}: ${pkgdir}${serverRoot}/pkg
|
2023-02-22 17:56:30 -06:00
|
|
|
for i in ${list}; do chown -R ${owner}: "${installDir}/$$i"; sudo chmod ${perms} "${installDir}/$$i"; done
|