BINARY_PATH = $(DESTDIR)/usr/bin
MAN_PATH = $(DESTDIR)/usr/share/man/man1
+SYSTEMD_PATH = $(DESTDIR)/etc/systemd/system
PM_SLEEPD = $(DESTDIR)/usr/lib/pm-utils/sleep.d
CFLAGS = -Wall -D_GNU_SOURCE -ansi -pedantic $(OPTIMIZE_FLAG)
install: breezed $(DESTDIR)/etc/breezed.conf
install -m 755 breezed $(BINARY_PATH)
- install -m 755 breezed.sh $(DESTDIR)/etc/init.d/
install -m 644 breezed.1 $(MAN_PATH)
gzip $(MAN_PATH)/breezed.1
- install -m 755 breezed-pm-utils.sh $(PM_SLEEPD)/50breezed
- update-rc.d breezed.sh defaults
- $(DESTDIR)/etc/init.d/breezed.sh start
+ install -m 644 breezed.service $(SYSTEMD_PATH)
+ systemctl enable breezed
+ systemctl start breezed
uninstall:
- $(DESTDIR)/etc/init.d/breezed.sh stop
- update-rc.d -f breezed.sh remove
- rm $(PM_SLEEPD)/50breezed
+ systemctl stop breezed
+ systemctl disable breezed
+ rm $(SYSTEMD_PATH)/breezed.service
rm $(MAN_PATH)/breezed.1.gz
- rm $(DESTDIR)/etc/init.d/breezed.sh
rm $(BINARY_PATH)/breezed
-install-systemd: breezed $(DESTDIR)/etc/breezed.conf
+install-sysv: breezed $(DESTDIR)/etc/breezed.conf
install -m 755 breezed $(BINARY_PATH)
+ install -m 755 breezed.sh $(DESTDIR)/etc/init.d/
install -m 644 breezed.1 $(MAN_PATH)
gzip $(MAN_PATH)/breezed.1
- install -m 644 breezed.service /etc/systemd/system/
- systemctl start breezed
+ install -m 755 breezed-pm-utils.sh $(PM_SLEEPD)/50breezed
+ update-rc.d breezed.sh defaults
+ $(DESTDIR)/etc/init.d/breezed.sh start
-uninstall-systemd:
- systemctl stop breezed
- rm /etc/systemd/system/breezed.service
+uninstall-sysv:
+ $(DESTDIR)/etc/init.d/breezed.sh stop
+ update-rc.d -f breezed.sh remove
+ rm $(PM_SLEEPD)/50breezed
rm $(MAN_PATH)/breezed.1.gz
+ rm $(DESTDIR)/etc/init.d/breezed.sh
rm $(BINARY_PATH)/breezed
clean: