mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-30 01:10:25 +01:00
Compressed man page is difficult to edit and also not suitable for tracking in version control system. Compress during install instead.
37 lines
1.2 KiB
Makefile
37 lines
1.2 KiB
Makefile
BASTILLE_BRANCH=$$(git branch --show-current)
|
|
BASTILLE_VERSION=$$(git rev-parse --short HEAD)
|
|
|
|
.PHONY: all
|
|
all:
|
|
@echo "Nothing to be done. Please use make install or make uninstall"
|
|
.PHONY: install
|
|
install:
|
|
@echo "Installing Bastille"
|
|
@echo
|
|
@echo "Updating Bastille version to match git revision."
|
|
@echo "BASTILLE_VERSION: ${BASTILLE_BRANCH}-${BASTILLE_VERSION}"
|
|
@sed -i '' "s/BASTILLE_VERSION=.*/BASTILLE_VERSION=${BASTILLE_BRANCH}-${BASTILLE_VERSION}/" usr/local/bin/bastille
|
|
@cp -Rv usr /
|
|
@gzip -n /usr/local/share/man/man8/bastille.8
|
|
@echo
|
|
@echo "This method is for testing & development."
|
|
@echo "Please report any issues to https://github.com/BastilleBSD/bastille/issues"
|
|
|
|
.PHONY: uninstall
|
|
uninstall:
|
|
@echo "Removing Bastille command"
|
|
@rm -vf /usr/local/bin/bastille
|
|
@echo
|
|
@echo "Removing Bastille sub-commands"
|
|
@rm -rvf /usr/local/share/bastille
|
|
@echo
|
|
@echo "removing man page"
|
|
@rm -rvf /usr/local/share/man/man8/bastille.8.gz
|
|
@echo
|
|
@echo "removing configuration file"
|
|
@rm -rvf /usr/local/etc/bastille/bastille.conf.sample
|
|
@echo
|
|
@echo "removing startup script"
|
|
@rm -vf /usr/local/etc/rc.d/bastille
|
|
@echo "You may need to manually remove /usr/local/etc/bastille/bastille.conf if it is no longer needed."
|