freeswitch-stable: added misc package builder
authorSebastian Kemper <sebastian_ml@gmx.net>
Sun, 11 Jun 2017 12:42:06 +0000 (14:42 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sun, 11 Jun 2017 12:42:08 +0000 (14:42 +0200)
- meant for packages where one only needs to copy files from one
  directory to another
- added three new packages using the new builder (dev, fonts, images)

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/freeswitch-stable/Makefile

index b57f9ce6abbd5411c0f3ae109707a2caa3a0efcb..4951c5320030258bdabafcc270da9b2ce5e4b93f 100644 (file)
@@ -404,6 +404,29 @@ endef
 $$(eval $$(call BuildPackage,$(PKG_NAME)-lang-$(1)))
 endef
 
+# The next package generator is for miscellaneous files that only
+# require being copied from PKG_INSTALL_DIR to the ipkg.
+define Package/$(PKG_NAME)/Misc
+define Package/$(PKG_NAME)-misc-$(1)
+$(call Package/$(PKG_NAME)/Default)
+  TITLE:=$(2)
+  DEPENDS:=$(PKG_NAME)
+endef
+define Package/$(PKG_NAME)-misc-$(1)/description
+$(subst \n,$(newline),$(3))
+endef
+define Package/$(PKG_NAME)-misc-$(1)/install
+$(call Package/$(PKG_NAME)/install/dir,$$(1)$(5),$(PKG_INSTALL_DIR)$(4))
+ifeq ($(1),dev)
+       $(INSTALL_DIR) $$(1)/usr/lib/pkgconfig
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/freeswitch.pc \
+                                               $$(1)/usr/lib/pkgconfig
+endif
+endef
+$$(eval $$(call BuildPackage,$(PKG_NAME)-misc-$(1)))
+endef
+
 define Package/$(PKG_NAME)/Module
 define Package/$(PKG_NAME)-mod-$(1)
 $(call Package/$(PKG_NAME)/Default)
@@ -652,6 +675,21 @@ $(eval $(call Package/$(PKG_NAME)/Language,pt,Portuguese))
 $(eval $(call Package/$(PKG_NAME)/Language,ru,Russian))
 $(eval $(call Package/$(PKG_NAME)/Language,sv,Swedish))
 
+################################
+# FreeSWITCH misc packages
+# Params:
+# 1 - Package subname
+# 2 - Package title
+# 3 - Package description
+# 4 - Source dir relative to
+#     PKG_INSTALL_DIR
+# 5 - Dest dir relative to ipkg
+################################
+
+$(eval $(call Package/$(PKG_NAME)/Misc,dev,Development files,This package includes the FreeSWITCH headers and pkgconfig file.,/usr/share/$(PRG_NAME)/include,/usr/include))
+$(eval $(call Package/$(PKG_NAME)/Misc,fonts,Fonts,This package includes the fonts bundled with FreeSWITCH.,/usr/share/$(PRG_NAME)/fonts,/usr/share/$(PRG_NAME)/fonts))
+$(eval $(call Package/$(PKG_NAME)/Misc,images,Images,This package includes the images bundled with FreeSWITCH.,/usr/share/$(PRG_NAME)/images,/usr/share/$(PRG_NAME)/images))
+
 ################################
 # FreeSWITCH modules
 # Params: