diff options
author | Ondrej Čerman | 2019-12-29 17:34:07 +0100 |
---|---|---|
committer | Ondrej Čerman | 2019-12-29 17:34:07 +0100 |
commit | 600680d3ec25de8e6a7816447577ff3c2a5e185d (patch) | |
tree | 8447eef4a093448effdac6b533e6000134ab3f7f /makefile | |
parent | 495045ef2ac3c14e2eb2cf49b5c43a11ad5d247b (diff) |
Makefile: Added option for app installation
Diffstat (limited to 'makefile')
-rwxr-xr-x | makefile | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -1,5 +1,33 @@ +ifeq ($(PREFIX),) + PREFIX := /usr/local +endif + build: cc -Isrc/include `pkg-config --cflags gtk+-3.0` src/*.c src/ss/*.c -o zenmonitor `pkg-config --libs gtk+-3.0` -lm -no-pie -Wall +install: + mkdir -p $(DESTDIR)$(PREFIX)/bin + install -m 755 zenmonitor $(DESTDIR)$(PREFIX)/bin + + mkdir -p $(DESTDIR)$(PREFIX)/share/applications + sed -e "s|@APP_EXEC@|${DESTDIR}${PREFIX}/bin/zenmonitor|" \ + data/zenmonitor.desktop.in > \ + $(DESTDIR)$(PREFIX)/share/applications/zenmonitor.desktop + +install-polkit: + sed -e "s|@APP_EXEC@|${DESTDIR}${PREFIX}/bin/zenmonitor|" \ + data/zenmonitor-root.desktop.in > \ + $(DESTDIR)$(PREFIX)/share/applications/zenmonitor-root.desktop + + sed -e "s|@APP_EXEC@|${DESTDIR}${PREFIX}/bin/zenmonitor|" \ + data/org.pkexec.zenmonitor.policy.in > \ + $(DESTDIR)/usr/share/polkit-1/actions/org.pkexec.zenmonitor.policy + +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/zenmonitor + rm -f $(DESTDIR)$(PREFIX)/share/applications/zenmonitor.desktop + rm -f $(DESTDIR)$(PREFIX)/share/applications/zenmonitor-root.desktop + rm -f $(DESTDIR)/usr/share/polkit-1/actions/org.pkexec.zenmonitor.policy + clean: rm -f zenmonitor |