diff --git a/src/Makefile b/src/Makefile index cf71c05..3724a2b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -9,7 +9,6 @@ APP_GUI_BINARY="wihotspot-gui" PREFIX=/usr BINDIR=$(PREFIX)/bin -APP_DIR=$(PREFIX)/share/$(APP_NAME) ODIR=../build @@ -42,15 +41,13 @@ wihotspot-gui: $(OBJ) $(CC) -o $(ODIR)/$@ $^ $(CFLAGS) $(LIBS) install: $(ODIR)/wihotspot-gui - mkdir -p $(DESTDIR)$(APP_DIR) - install -Dm644 desktop/hotspot.png $(DESTDIR)$(APP_DIR)/hotspot.png - install -Dm644 desktop/wifihotspot.desktop $(DESTDIR)$(APP_DIR)/$(APP_NAME).desktop + install -Dm644 desktop/hotspot.png $(DESTDIR)$(PREFIX)/share/pixmaps/wihotspot.png install -Dm644 desktop/wifihotspot.desktop $(DESTDIR)$(PREFIX)/share/applications/$(APP_NAME).desktop install -Dm755 $(ODIR)/wihotspot-gui $(DESTDIR)$(BINDIR)/$(APP_GUI_BINARY) cd scripts && $(MAKE) install uninstall: - rm -rf $(DESTDIR)$(APP_DIR) + rm -f $(DESTDIR)$(PREFIX)/share/pixmaps/wihotspot.png rm -f $(DESTDIR)$(PREFIX)/share/applications/$(APP_NAME).desktop rm -f $(DESTDIR)$(BINDIR)/$(APP_GUI_BINARY) cd scripts && $(MAKE) uninstall @@ -64,4 +61,5 @@ clean-old: clean: rm -f $(ODIR)/*.o rm -f ui/$(BUILT_SRC) - rm -f $(ODIR)/wihotspot-gui \ No newline at end of file + rm -f $(ODIR)/wihotspot-gui + diff --git a/src/desktop/wifihotspot.desktop b/src/desktop/wifihotspot.desktop index f7cb594..38cf58c 100644 --- a/src/desktop/wifihotspot.desktop +++ b/src/desktop/wifihotspot.desktop @@ -2,7 +2,7 @@ Type=Application Name=Wifi Hotspot Comment=feature-rich wifi hotspot creator -Icon=/usr/share/wihotspot/hotspot.png +Icon=wihotspot Exec=sh -c 'env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY /usr/bin/wihotspot' Terminal=false Categories=System diff --git a/src/scripts/Makefile b/src/scripts/Makefile index c57dc4d..b4415bc 100644 --- a/src/scripts/Makefile +++ b/src/scripts/Makefile @@ -9,7 +9,7 @@ all: install: install -CDm755 create_ap $(DESTDIR)$(BINDIR)/create_ap install -CDm644 create_ap.conf $(DESTDIR)/etc/create_ap.conf - [ ! -d $(DESTDIR)/lib/systemd/system ] || install -CDm644 create_ap.service $(DESTDIR)/lib/systemd/system/create_ap.service + install -CDm644 create_ap.service $(DESTDIR)$(PREFIX)/lib/systemd/system/create_ap.service install -CDm644 bash_completion $(DESTDIR)$(PREFIX)/share/bash-completion/completions/create_ap install -CDm644 README.md $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md install -CDm755 wihotspot $(DESTDIR)$(BINDIR)/wihotspot @@ -17,14 +17,14 @@ install: install-cli-only: install -CDm755 create_ap $(DESTDIR)$(BINDIR)/create_ap install -CDm644 create_ap.conf $(DESTDIR)/etc/create_ap.conf - [ ! -d $(DESTDIR)/lib/systemd/system ] || install -CDm644 create_ap.service $(DESTDIR)/lib/systemd/system/create_ap.service + install -CDm644 create_ap.service $(DESTDIR)$(PREFIX)/lib/systemd/system/create_ap.service install -CDm644 bash_completion $(DESTDIR)$(PREFIX)/share/bash-completion/completions/create_ap install -CDm644 README.md $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md uninstall: rm -f $(DESTDIR)$(BINDIR)/create_ap rm -f $(DESTDIR)/etc/create_ap.conf - [ ! -f $(DESTDIR)/lib/systemd/system/create_ap.service ] || rm -f $(DESTDIR)/lib/systemd/system/create_ap.service + rm -f $(DESTDIR)$(PREFIX)/lib/systemd/system/create_ap.service rm -f $(DESTDIR)$(PREFIX)/share/bash-completion/completions/create_ap rm -f $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md rm -f /etc/sudoers.d/create_ap # For older versions