58 lines
2.9 KiB
Makefile
58 lines
2.9 KiB
Makefile
httpRoot = ${pkgdir}/srv/http/aninix.net
|
|
httpUser = http
|
|
syncList = vimrc bashrc tmux.conf profile pacman.conf
|
|
serviceList = tmux@.service ssh-agent@.service
|
|
pacmanHooks = mediawiki.hook tt-rss.hook shadowarch.hook
|
|
|
|
compile: ./shadowarch
|
|
@echo Nothing to compile
|
|
|
|
install: compile aninix.gpg
|
|
mkdir -p ${pkgdir}/opt/aninix/ShadowArch/etc/
|
|
mkdir -p ${pkgdir}/usr/lib/systemd/system
|
|
mkdir -p ${pkgdir}/etc/pacman.d/hooks
|
|
mkdir -p ${pkgdir}/usr/share/vim/vimfiles/plugin/
|
|
for i in ${syncList}; do cp "$$i" ${pkgdir}/opt/aninix/ShadowArch/etc/; done
|
|
for i in ${serviceList}; do cp "$$i" ${pkgdir}/usr/lib/systemd/system/"$$i"; done
|
|
for i in ${pacmanHooks}; do cp "$$i" ${pkgdir}/etc/pacman.d/hooks/"$$i"; done
|
|
cp ./shadowarch.vim ${pkgdir}/usr/share/vim/vimfiles/plugin/shadowarch.vim
|
|
mkdir -p ${pkgdir}/usr/share/pacman/keyrings
|
|
cp ./aninix.gpg ${pkgdir}/usr/share/pacman/keyrings
|
|
cp -pr ./skel ${pkgdir}/opt/aninix/ShadowArch/etc
|
|
|
|
repository: shadowarch ${httpRoot}
|
|
cp ./shadowarch ${httpRoot}
|
|
|
|
checkperm: ${syncList}
|
|
printf "What is your deprivileged user? "; read user; chown -R ${user}:${user} .
|
|
if [ -f ${httpRoot}/shadowarch ]; then chmod 0755 ${httpRoot}/shadowarch; chown ${httpUser} ${httpRoot}/shadowarch; fi
|
|
chown -R root:root ${syncList}
|
|
for i in ${syncList}; do if [ -f "${i}" ]; then chmod 0644 "${i}"; elif [ -d "${i}" ]; then chmod 0755 "${i}"; fi; done
|
|
|
|
test:
|
|
bash -n shadowarch
|
|
bash ./shadowarch -h
|
|
echo Success.
|
|
|
|
reverse: ${httpRoot}/shadowarch ${syncList}
|
|
cat ${httpRoot}/shadowarch > ./shadowarch
|
|
for i in ${syncList}; do rsync -avz ${syncList} .; done
|
|
for i in ${serviceList}; do rsync -avz ${serviceList} .; done
|
|
for i in ${pacmanHooks}; do rsync -avz ${pacmanHooks} .; done
|
|
rsync --delete-before -avz ${pkgdir}/opt/aninix/ShadowArch/etc/skel ./skel
|
|
|
|
clean:
|
|
@echo Nothing to do.
|
|
|
|
aninix.gpg:
|
|
gpg --export --armor --output ./aninix.gpg 904DE6275579CB589D85720C1CC1E3F4ED06F296
|
|
|
|
diff: ${syncList}
|
|
if [ -f ${httpRoot}/shadowarch ]; then diff ./shadowarch ${httpRoot}/shadowarch; echo; fi
|
|
for i in ${syncList}; do diff -rc "$$i" ./`echo $$i | rev | cut -f 1 -d '/' | rev`; echo; done
|
|
diff -rc ${pkgdir}/opt/aninix/ShadowArch/etc/skel ./skel; printf ""
|
|
|
|
find-missing-hooks-in-src:
|
|
@for i in `wget -q -O - https://aninix.net/foundation/ | grep toplevel-repo | cut -f 4 -d \'`; do if [ -z $$i ]; then continue; fi; for file in `find ../.. -type f -name Makefile | grep $$i`; do if [ -z "$$file" ]; then echo NO MAKEFILE FOR $$i; elif [ `grep -c -i 'hook for systemd' $$file` -eq 0 ]; then echo HOOK MISSING IN: $$file; else echo HOOK FOUND IN: $$file; fi; done; done
|
|
@for i in `wget -q -O - https://aninix.net/foundation/ | grep toplevel-repo | cut -f 4 -d \'`; do if [ -z $$i ]; then continue; fi; for file in `find ../.. -type f -name Makefile | grep $$i`; do if [ -z "$$file" ]; then echo NO MAKEFILE FOR $$i; elif [ `grep -c useradd $$file` -eq 0 ]; then echo DEPRIV MISSING IN: $$file; else echo DEPRIV FOUND IN: $$file; fi; done; done
|