mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-13 20:08:05 +08:00
48 lines
1.4 KiB
Makefile
48 lines
1.4 KiB
Makefile
# Copyright (C) 2016 Openwrt.org
|
|
#
|
|
# This is free software, licensed under the Apache License, Version 2.0 .
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
LUCI_TITLE:=LuCI support for ddnsto
|
|
LUCI_DEPENDS:=+ddnsto +block-mount
|
|
LUCI_PKGARCH:=all
|
|
PKG_VERSION:=4.2.2-r3
|
|
PKG_RELEASE:=4
|
|
|
|
define Package/luci-app-ddnsto/postinst
|
|
#!/bin/sh
|
|
# Maintain the old desktop entry without a second manifest or file owner.
|
|
root="$${IPKG_INSTROOT:-}"
|
|
sh "$${root}/usr/share/ddnsto/register-desktop.sh" || exit $$?
|
|
icon="$${root}/usr/share/linkeasefull/app-meta/ddnsto/logo.png"
|
|
if [ "$$(readlink "$${icon}" 2>/dev/null)" = "/www/luci-static/resources/app-icons/ddnsto.png" ]; then
|
|
rm -f "$${icon}"
|
|
fi
|
|
rmdir "$${root}/usr/share/linkeasefull/app-meta/ddnsto" "$${root}/usr/share/linkeasefull/app-meta" 2>/dev/null || true
|
|
if [ -z "$${IPKG_INSTROOT}" ]; then
|
|
rm -f /tmp/luci-indexcache /tmp/luci-indexcache.*
|
|
rm -rf /tmp/luci-modulecache/
|
|
fi
|
|
exit 0
|
|
endef
|
|
|
|
define Package/luci-app-ddnsto/prerm
|
|
#!/bin/sh
|
|
root="$${IPKG_INSTROOT:-}"
|
|
for directory in /usr/share/linkease/apps.d /usr/share/linkeasefull/desktop-apps.d; do
|
|
registration="$${root}$${directory}/16-ddnsto.json"
|
|
if [ "$$(readlink "$${registration}" 2>/dev/null)" = "/usr/share/ddnsto/ddnsto-plugin.json" ]; then
|
|
rm -f "$${registration}"
|
|
fi
|
|
done
|
|
rmdir "$${root}/usr/share/linkeasefull/desktop-apps.d" 2>/dev/null || true
|
|
exit 0
|
|
endef
|
|
|
|
include $(TOPDIR)/feeds/luci/luci.mk
|
|
|
|
# call BuildPackage - OpenWrt buildroot signature
|
|
|