2017-07-18 23:06:11 +02:00
|
|
|
PROGRAMS=motds32
|
|
|
|
CONFIGS=motds32.conf
|
|
|
|
|
|
|
|
|
|
|
|
usage:
|
2017-07-18 23:49:02 +02:00
|
|
|
@echo "This makefile allows you to:"
|
|
|
|
@echo " o install MOTDstat"
|
|
|
|
@echo " o unintall MOTDstat"
|
|
|
|
@echo
|
|
|
|
@echo Examples:
|
|
|
|
@echo " make install"
|
|
|
|
@echo " make uninstall"
|
2017-07-18 23:06:11 +02:00
|
|
|
|
|
|
|
|
2017-07-18 23:49:02 +02:00
|
|
|
install:
|
|
|
|
for prog in $(PROGRAMS); do \
|
|
|
|
install -m 0755 bin/$$prog /usr/bin; \
|
|
|
|
done
|
2017-07-18 23:06:11 +02:00
|
|
|
|
2017-07-31 15:09:29 +02:00
|
|
|
if test ! -d /etc/motds32; then mkdir -p /etc/motds32; touch /etc/motds32/Stats32.txt; chmod 777 /etc/motds32/Stats32.txt; fi
|
2017-07-18 23:49:02 +02:00
|
|
|
for config in $(CONFIGS); do \
|
|
|
|
if test ! -e /etc/motds32/$$config; then install -m 644 ./etc/motds32/$$config /etc/motds32; fi \
|
|
|
|
done
|
|
|
|
|
2017-07-31 15:09:29 +02:00
|
|
|
|
2017-07-18 23:06:11 +02:00
|
|
|
uninstall:
|
2017-07-18 23:49:02 +02:00
|
|
|
for prog in $(PROGRAMS); do \
|
|
|
|
rm -f /usr/bin/$$prog; \
|
|
|
|
done
|
|
|
|
rm -rf /etc/motds32/ /etc/motd.full
|
|
|
|
mv -f /etc/motd.orig /etc/motd
|