mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-30 06:36:39 -04:00
60 lines
2.5 KiB
Makefile
60 lines
2.5 KiB
Makefile
INCLUDE_SYSTEMD ?= $(shell [ -d /run/systemd/system ] && echo 1 || echo 0)
|
|
# Enable the systemd service after installation
|
|
ENABLE_SERVICE ?= 1
|
|
|
|
install:
|
|
@echo "===> Installing..."
|
|
|
|
install -Dm755 artifacts/usr/bin/gpclient $(DESTDIR)/usr/bin/gpclient
|
|
install -Dm755 artifacts/usr/bin/gpservice $(DESTDIR)/usr/bin/gpservice
|
|
install -Dm755 artifacts/usr/bin/gpauth $(DESTDIR)/usr/bin/gpauth
|
|
install -Dm755 artifacts/usr/bin/gpgui-helper $(DESTDIR)/usr/bin/gpgui-helper
|
|
|
|
if [ -f artifacts/usr/bin/gpgui ]; then \
|
|
install -Dm755 artifacts/usr/bin/gpgui $(DESTDIR)/usr/bin/gpgui; \
|
|
fi
|
|
|
|
install -Dm644 artifacts/usr/share/applications/gpgui.desktop $(DESTDIR)/usr/share/applications/gpgui.desktop
|
|
install -Dm644 artifacts/usr/share/icons/hicolor/scalable/apps/gpgui.svg $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/gpgui.svg
|
|
install -Dm644 artifacts/usr/share/icons/hicolor/32x32/apps/gpgui.png $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/gpgui.png
|
|
install -Dm644 artifacts/usr/share/icons/hicolor/128x128/apps/gpgui.png $(DESTDIR)/usr/share/icons/hicolor/128x128/apps/gpgui.png
|
|
install -Dm644 artifacts/usr/share/icons/hicolor/256x256@2/apps/gpgui.png $(DESTDIR)/usr/share/icons/hicolor/256x256@2/apps/gpgui.png
|
|
install -Dm644 artifacts/usr/share/polkit-1/actions/com.yuezk.gpgui.policy $(DESTDIR)/usr/share/polkit-1/actions/com.yuezk.gpgui.policy
|
|
|
|
# Install the service
|
|
if [ $(INCLUDE_SYSTEMD) -eq 1 ]; then \
|
|
install -Dm644 artifacts/usr/lib/systemd/system/gp-suspend.service $(DESTDIR)/usr/lib/systemd/system/gp-suspend.service; \
|
|
if [ $(ENABLE_SERVICE) -eq 1 ]; then \
|
|
systemctl --system daemon-reload; \
|
|
systemctl enable gp-suspend.service; \
|
|
fi; \
|
|
fi
|
|
|
|
@echo "===> Done."
|
|
|
|
uninstall:
|
|
@echo "===> Uninstalling from $(DESTDIR)..."
|
|
|
|
# Disable the systemd service
|
|
if [ -d /run/systemd/system ]; then \
|
|
systemctl disable gp-suspend.service >/dev/null || true; \
|
|
fi
|
|
|
|
rm -f $(DESTDIR)/lib/systemd/system/gp-suspend.service
|
|
rm -f $(DESTDIR)/usr/lib/systemd/system/gp-suspend.service
|
|
|
|
rm -f $(DESTDIR)/usr/bin/gpclient
|
|
rm -f $(DESTDIR)/usr/bin/gpservice
|
|
rm -f $(DESTDIR)/usr/bin/gpauth
|
|
rm -f $(DESTDIR)/usr/bin/gpgui-helper
|
|
rm -f $(DESTDIR)/usr/bin/gpgui
|
|
|
|
rm -f $(DESTDIR)/usr/share/applications/gpgui.desktop
|
|
rm -f $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/gpgui.svg
|
|
rm -f $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/gpgui.png
|
|
rm -f $(DESTDIR)/usr/share/icons/hicolor/128x128/apps/gpgui.png
|
|
rm -f $(DESTDIR)/usr/share/icons/hicolor/256x256@2/apps/gpgui.png
|
|
rm -f $(DESTDIR)/usr/share/polkit-1/actions/com.yuezk.gpgui.policy
|
|
|
|
@echo "===> Done."
|