Merge pull request #130 from yochananmarqos/master

Various fixes and improvements
This commit is contained in:
Lakindu Akash 2021-01-19 00:52:49 +05:30 committed by GitHub
commit 3754cb664d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 10 deletions

View File

@ -9,7 +9,6 @@ APP_GUI_BINARY="wihotspot-gui"
PREFIX=/usr PREFIX=/usr
BINDIR=$(PREFIX)/bin BINDIR=$(PREFIX)/bin
APP_DIR=$(PREFIX)/share/$(APP_NAME)
ODIR=../build ODIR=../build
@ -42,15 +41,13 @@ wihotspot-gui: $(OBJ)
$(CC) -o $(ODIR)/$@ $^ $(CFLAGS) $(LIBS) $(CC) -o $(ODIR)/$@ $^ $(CFLAGS) $(LIBS)
install: $(ODIR)/wihotspot-gui install: $(ODIR)/wihotspot-gui
mkdir -p $(DESTDIR)$(APP_DIR) install -Dm644 desktop/hotspot.png $(DESTDIR)$(PREFIX)/share/pixmaps/wihotspot.png
install -Dm644 desktop/hotspot.png $(DESTDIR)$(APP_DIR)/hotspot.png
install -Dm644 desktop/wifihotspot.desktop $(DESTDIR)$(APP_DIR)/$(APP_NAME).desktop
install -Dm644 desktop/wifihotspot.desktop $(DESTDIR)$(PREFIX)/share/applications/$(APP_NAME).desktop install -Dm644 desktop/wifihotspot.desktop $(DESTDIR)$(PREFIX)/share/applications/$(APP_NAME).desktop
install -Dm755 $(ODIR)/wihotspot-gui $(DESTDIR)$(BINDIR)/$(APP_GUI_BINARY) install -Dm755 $(ODIR)/wihotspot-gui $(DESTDIR)$(BINDIR)/$(APP_GUI_BINARY)
cd scripts && $(MAKE) install cd scripts && $(MAKE) install
uninstall: 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)$(PREFIX)/share/applications/$(APP_NAME).desktop
rm -f $(DESTDIR)$(BINDIR)/$(APP_GUI_BINARY) rm -f $(DESTDIR)$(BINDIR)/$(APP_GUI_BINARY)
cd scripts && $(MAKE) uninstall cd scripts && $(MAKE) uninstall
@ -64,4 +61,5 @@ clean-old:
clean: clean:
rm -f $(ODIR)/*.o rm -f $(ODIR)/*.o
rm -f ui/$(BUILT_SRC) rm -f ui/$(BUILT_SRC)
rm -f $(ODIR)/wihotspot-gui rm -f $(ODIR)/wihotspot-gui

View File

@ -2,7 +2,7 @@
Type=Application Type=Application
Name=Wifi Hotspot Name=Wifi Hotspot
Comment=feature-rich wifi hotspot creator 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' Exec=sh -c 'env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY /usr/bin/wihotspot'
Terminal=false Terminal=false
Categories=System Categories=System

View File

@ -9,7 +9,7 @@ all:
install: install:
install -CDm755 create_ap $(DESTDIR)$(BINDIR)/create_ap install -CDm755 create_ap $(DESTDIR)$(BINDIR)/create_ap
install -CDm644 create_ap.conf $(DESTDIR)/etc/create_ap.conf 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 bash_completion $(DESTDIR)$(PREFIX)/share/bash-completion/completions/create_ap
install -CDm644 README.md $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md install -CDm644 README.md $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md
install -CDm755 wihotspot $(DESTDIR)$(BINDIR)/wihotspot install -CDm755 wihotspot $(DESTDIR)$(BINDIR)/wihotspot
@ -17,14 +17,14 @@ install:
install-cli-only: install-cli-only:
install -CDm755 create_ap $(DESTDIR)$(BINDIR)/create_ap install -CDm755 create_ap $(DESTDIR)$(BINDIR)/create_ap
install -CDm644 create_ap.conf $(DESTDIR)/etc/create_ap.conf 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 bash_completion $(DESTDIR)$(PREFIX)/share/bash-completion/completions/create_ap
install -CDm644 README.md $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md install -CDm644 README.md $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md
uninstall: uninstall:
rm -f $(DESTDIR)$(BINDIR)/create_ap rm -f $(DESTDIR)$(BINDIR)/create_ap
rm -f $(DESTDIR)/etc/create_ap.conf 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/bash-completion/completions/create_ap
rm -f $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md rm -f $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md
rm -f /etc/sudoers.d/create_ap # For older versions rm -f /etc/sudoers.d/create_ap # For older versions