Makefile to install & uninstall dbuscron added
authorKonstantin Stepanov <kstep@p-nut.info>
Sun, 12 Dec 2010 12:08:47 +0000 (14:08 +0200)
committerKonstantin Stepanov <kstep@p-nut.info>
Sun, 12 Dec 2010 12:11:49 +0000 (14:11 +0200)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..cf21aae
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+
+PYMODULES ?= /usr/lib/pymodules/python2.5
+PREFIX ?= /usr/bin
+PYSUFFIX = `test -e ./dbuscron/__init__.pyo && echo pyo || echo pyc`
+
+install:
+       install -o root -g root -m 0755 ./dbuscron.py $(PREFIX)/dbuscron
+       install -o root -g root -m 0755 ./dbuscrontab.py $(PREFIX)/dbuscrontab
+       install -o root -g root -m 0755 -d $(PYMODULES)/dbuscron
+       python -c 'import dbuscron'
+       install -o root -g root -m 0644 ./dbuscron/*.$(PYSUFFIX) $(PYMODULES)/dbuscron
+       install -o root -g root -m 0644 ./event.d/dbuscron /etc/event.d/dbuscron
+       touch /etc/dbuscrontab
+       @echo "Installation complete. Run \`dbuscrontab -e' to edit config file,"
+       @echo "then run \`initctl start dbuscron' to start dbuscron daemon."
+
+uninstall:
+       -initctl stop dbuscron
+       rm -rf $(PYMODULES)/dbuscron
+       rm -f $(PREFIX)/dbuscron $(PREFIX)/dbuscrontab
+       rm -f /etc/event.d/dbuscron