Ticket #9208: Makefile

File Makefile, 2.0 KB (added by dexter@…, 6 years ago)

chan_datacard Makefile

Line 
1#
2# Copyright (C) 2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=asterisk18-chan-datacard
11PKG_REV:=315
12PKG_VERSION:=1.0.r$(PKG_REV)
13PKG_RELEASE:=203
14
15PKG_SOURCE_URL:=http://datacard.googlecode.com/svn/trunk/
16PKG_SOURCE_VERSION:=$(PKG_RELEASE)
17PKG_SOURCE:=chan_datacard-$(PKG_VERSION).tar.gz
18PKG_SOURCE_PROTO:=svn
19PKG_FIXUP:=autoreconf   
20PKG_INSTALL:=1
21
22PKG_SOURCE_SUBDIR:=chan_datacard-$(PKG_VERSION)
23PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
24
25WITH_ASTERISK=asterisk-1.8.3.2
26
27include $(INCLUDE_DIR)/package.mk
28
29define Package/asterisk18-chan-datacard
30        SUBMENU:=asterisk18 (Complete Open Source PBX), v1.8.x
31        SECTION:=net
32        CATEGORY:=Network
33        URL:=http://www.asterisk.org/
34        MAINTAINER:=Hans Zandbelt <hans.zandbelt@gmail.com>
35        DEPENDS:= +asterisk18 +libiconv-full
36        TITLE:=Huawei UMTS 3G datacards support
37endef
38
39define Package/asterisk18-chan-datacard/description
40        Asterisk channel driver for Huawei UMTS 3G datacards
41endef
42
43MAKE_ARGS:= \
44        CC="$(TARGET_CC)" \
45        LD="$(TARGET_CC)" \
46        CFLAGS="$(TARGET_CFLAGS) -DLOW_MEMORY $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libiconv-full/include -I$(BUILD_DIR)/$(WITH_ASTERISK)/include -DHAVE_CONFIG_H -I. $(FPIC)" \
47        LDFLAGS="$(TARGET_LDFLAGS)" \
48        DESTDIR="$(PKG_INSTALL_DIR)/usr/lib/asterisk/modules"
49
50define Build/Compile
51        mkdir -p $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules
52        $(MAKE) -C "$(PKG_BUILD_DIR)" $(MAKE_ARGS) all install
53endef
54
55define Package/asterisk18-chan-datacard/conffiles
56/etc/asterisk/datacard.conf
57endef
58
59define Package/asterisk18-chan-datacard/install
60        $(INSTALL_DIR) $(1)/etc/asterisk
61        $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/datacard.conf $(1)/etc/asterisk/
62        $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
63        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_datacard.so $(1)/usr/lib/asterisk/modules/
64endef
65
66$(eval $(call BuildPackage,asterisk18-chan-datacard))