2019-04-08 05:05:08 -05:00
|
|
|
installDir = ${pkgdir}/usr/local/bin
|
|
|
|
list = ./maat-builder
|
|
|
|
systemdList = ./maat-builder.timer ./maat-builder.service
|
|
|
|
serverRoot = /srv/maat/
|
|
|
|
owner=root
|
|
|
|
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.
|
|
|
|
|
2019-04-08 05:05:08 -05:00
|
|
|
install: ${list}
|
|
|
|
mkdir -p ${installDir}
|
|
|
|
mkdir -p ${pkgdir}${serverRoot}/src
|
|
|
|
mkdir -p ${pkgdir}${serverRoot}/pkg
|
2019-07-25 13:01:53 -05:00
|
|
|
mkdir -p ${pkgdir}/usr/lib/systemd/system
|
2019-04-08 05:05:08 -05:00
|
|
|
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
|
2019-02-18 07:56:39 -06:00
|
|
|
|
|
|
|
clean:
|
|
|
|
cat .gitignore | xargs rm -Rf
|
|
|
|
|
|
|
|
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
|
|
|
|
./maat-builder -T
|
|
|
|
test -d src
|
|
|
|
test -d src/cower
|
|
|
|
test -d src/cower/.git
|
|
|
|
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
|
|
|
|
test -f pkg/helloworld*.tar.xz
|
|
|
|
test -f pkg/aur/aur.db
|
|
|
|
test -f pkg/aur/aur.db.sig
|
|
|
|
test -f pkg/aur/cower*.tar.xz
|
|
|
|
[ `wc -l pkg/index.html | cut -f 1 -d ' '` -eq 24 ]
|
|
|
|
@echo
|
|
|
|
@echo Tests passed successfully.
|
2019-02-18 07:56:39 -06:00
|
|
|
|
|
|
|
diff:
|
2019-04-08 05:05:08 -05: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:
|
2019-04-08 05:05:08 -05: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
|
|
|
|
for i in ${list}; do chown -R ${owner}: "${installDir}/$$i"; chmod ${perms} "${installDir}/$$i"; done
|