mirror of
https://github.com/openwrt/packages.git
synced 2025-12-10 12:41:22 +00:00
shared-mime-info: fix post-install behaviour
Move post-install script to /etc/uci-defaults so it always runs on the target and doesn't require the host to provide 'update-mime-database'. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
@@ -36,6 +36,19 @@ define Package/shared-mime-info/description
|
|||||||
The shared-mime-info package contains a database of MIME types and their file extensions.
|
The shared-mime-info package contains a database of MIME types and their file extensions.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
MESON_ARG += \
|
||||||
|
-Dbuild-tests=false \
|
||||||
|
-Dupdate-mimedb=false \
|
||||||
|
-Dbuild-tools=true \
|
||||||
|
-Dbuild-translations=false
|
||||||
|
|
||||||
|
define Build/InstallDev
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||||
|
$(CP) \
|
||||||
|
$(PKG_INSTALL_DIR)/usr/share/pkgconfig/shared-mime-info.pc \
|
||||||
|
$(1)/usr/lib/pkgconfig/
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/shared-mime-info/install
|
define Package/shared-mime-info/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin/
|
$(INSTALL_DIR) $(1)/usr/bin/
|
||||||
$(CP) \
|
$(CP) \
|
||||||
@@ -45,12 +58,10 @@ define Package/shared-mime-info/install
|
|||||||
$(CP) \
|
$(CP) \
|
||||||
$(PKG_INSTALL_DIR)/usr/share/* \
|
$(PKG_INSTALL_DIR)/usr/share/* \
|
||||||
$(1)/usr/share/
|
$(1)/usr/share/
|
||||||
endef
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||||
|
$(INSTALL_DATA) \
|
||||||
define Package/shared-mime-info/postinst
|
./files/shared-mime-info.defaults \
|
||||||
#!/bin/sh
|
$(1)/etc/uci-defaults/90-shared-mime-info
|
||||||
|
|
||||||
update-mime-database /usr/share/mime/
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,shared-mime-info))
|
$(eval $(call BuildPackage,shared-mime-info))
|
||||||
|
|||||||
3
utils/shared-mime-info/files/shared-mime-info.defaults
Normal file
3
utils/shared-mime-info/files/shared-mime-info.defaults
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
update-mime-database /usr/share/mime/
|
||||||
Reference in New Issue
Block a user