- Cosmetic: change version from 1.0 to git checkout date.
- Remove dependency on asterisk, as otherwise the package won't be
built by the build bots.
- Without asterisk in the staging directory the asterisk headers are
now taken from an archive in $(DL_DIR), which is stored there by the
asterisk package.
- The naming of the package needs to be changed, as without the
dependency on asterisk it would otherwise mess with asterisk's
menuconfig layout.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
include $(TOPDIR)/rules.mk
PKG_NAME:=chan-lantiq
include $(TOPDIR)/rules.mk
PKG_NAME:=chan-lantiq
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
+# WARNING: Because this module is target specific ("nonshared") it cannot depend
+# on the shared Asterisk package. Asterisk needs to be built _before_ this
+# package, though, to generate the necessary headers.
+
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/version.mk
define Package/$(PKG_NAME)/Default
SUBMENU:=Telephony
define Package/$(PKG_NAME)/Default
SUBMENU:=Telephony
DEPENDS:=@(TARGET_lantiq_falcon||TARGET_lantiq_xway||TARGET_lantiq_xrx200) +kmod-ltq-vmmc
endef
DEPENDS:=@(TARGET_lantiq_falcon||TARGET_lantiq_xway||TARGET_lantiq_xrx200) +kmod-ltq-vmmc
endef
-define Package/asterisk13-$(PKG_NAME)
+define Package/$(PKG_NAME)-asterisk13
$(call Package/$(PKG_NAME)/Default)
$(call Package/$(PKG_NAME)/Default)
VARIANT:=asterisk13
endef
VARIANT:=asterisk13
endef
An implementation of a Lantiq TAPI channel driver for Asterisk.
endef
An implementation of a Lantiq TAPI channel driver for Asterisk.
endef
-Package/asterisk13-$(PKG_NAME)/description = $(Package/description/Default)
+Package/$(PKG_NAME)-asterisk13/description = $(Package/description/Default)
define Package/conffiles/Default
/etc/asterisk/lantiq.conf
endef
define Package/conffiles/Default
/etc/asterisk/lantiq.conf
endef
-Package/asterisk13-$(PKG_NAME)/conffiles = $(Package/conffiles/Default)
+Package/$(PKG_NAME)-asterisk13/conffiles = $(Package/conffiles/Default)
define Package/Install/Default
$(INSTALL_DIR) $(1)/etc/asterisk
define Package/Install/Default
$(INSTALL_DIR) $(1)/etc/asterisk
$(1)/usr/lib/asterisk/modules
endef
$(1)/usr/lib/asterisk/modules
endef
-Package/asterisk13-$(PKG_NAME)/install = $(Package/Install/Default)
-
-ifeq ($(BUILD_VARIANT),asterisk13)
-CHAN_LANTIQ_AST_INCLUDES:=-I$(STAGING_DIR)/usr/include/asterisk-13/include
-endif
+Package/$(PKG_NAME)-asterisk13/install = $(Package/Install/Default)
define Build/Prepare
$(CP) $(SOURCE)/files/chan_lantiq-$(BUILD_VARIANT).c $(PKG_BUILD_DIR)/chan_lantiq.c
$(CP) $(SOURCE)/files/default.exports $(PKG_BUILD_DIR)/chan_lantiq.exports
define Build/Prepare
$(CP) $(SOURCE)/files/chan_lantiq-$(BUILD_VARIANT).c $(PKG_BUILD_DIR)/chan_lantiq.c
$(CP) $(SOURCE)/files/default.exports $(PKG_BUILD_DIR)/chan_lantiq.exports
+ $(TAR) --extract --no-same-owner --no-same-permissions --xz \
+ --file=$(DL_DIR)/$(BUILD_VARIANT)-$(call qstrip,$(CONFIG_TARGET_ARCH_PACKAGES))-headers-for-chan-lantiq-$(VERSION_NUMBER).tar.xz \
+ --directory=$(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Configure
cd $(PKG_BUILD_DIR) && \
$(TARGET_CC) -o chan_lantiq.o -c chan_lantiq.c -MD -MT chan_lantiq.o \
-MF .chan_lantiq.o.d -MP -pthread \
cd $(PKG_BUILD_DIR) && \
$(TARGET_CC) -o chan_lantiq.o -c chan_lantiq.c -MD -MT chan_lantiq.o \
-MF .chan_lantiq.o.d -MP -pthread \
- $(CHAN_LANTIQ_AST_INCLUDES) \
+ -I$(PKG_BUILD_DIR)/include \
$(TARGET_CPPFLAGS) \
-Wall -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations $(FPIC) -DAST_MODULE=\"chan_lantiq\" && \
$(TARGET_CPPFLAGS) \
-Wall -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations $(FPIC) -DAST_MODULE=\"chan_lantiq\" && \
-$(eval $(call BuildPackage,asterisk13-$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)-asterisk13))