reorganize ltq-dsl-app
[openwrt.git] / package / ltq-dsl-app / Makefile
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
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_BASE_NAME:=dsl_cpe_control_danube
12 PKG_VERSION:=3.24.4.4
13 PKG_RELEASE:=1
14 PKG_SOURCE:=$(PKG_BASE_NAME)-$(PKG_VERSION).tar.gz
15 PKG_BUILD_DIR:=$(BUILD_DIR)/dsl_cpe_control-$(PKG_VERSION)
16 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
17 PKG_MD5SUM:=ee315306626b68794d3d3636dabfe161
18
19 PKG_CONFIG_DEPENDS:=\
20         CONFIG_LTQ_DSL_ENABLE_CLI \
21         CONFIG_LTQ_DSL_ENABLE_DSL_EVENT_POLLING
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/ltq-dsl-app
26   SECTION:=net
27   CATEGORY:=Network
28   TITLE:=Lantiq DSL userland tool
29   URL:=http://www.lantiq.com/
30   DEPENDS:=@TARGET_lantiq_danube +kmod-ltq-dsl +libpthread
31   MAINTAINER:=John Crispin <blogic@openwrt.org> 
32   MENU:=1
33 endef
34
35 define Package/ltq-dsl-app/description
36         Infineon DSL CPE API for Amazon SE, Danube and Vinax.
37 endef
38
39 define Package/ltq-dsl-app/config
40         source "$(SOURCE)/Config.in"
41 endef
42
43 LTQ_DSL_MAX_DEVICE=1
44 LTQ_DSL_LINES_PER_DEVICE=1
45 LTQ_DSL_CHANNELS_PER_LINE=1
46
47 CONFIGURE_ARGS += \
48         --with-max-device="$(LTQ_DSL_MAX_DEVICE)" \
49         --with-lines-per-device="$(LTQ_DSL_LINES_PER_DEVICE)" \
50         --with-channels-per-line="$(LTQ_DSL_CHANNELS_PER_LINE)" \
51         --enable-danube \
52         --enable-driver-include="-I$(STAGING_DIR)/usr/include" \
53         --enable-debug-prints \
54         --enable-add-appl-cflags="-DMAX_CLI_PIPES=2" \
55         --enable-cmv-scripts \
56         --enable-debug-tool-interface \
57         --enable-adsl-led \
58         --enable-dsl-ceoc \
59         --enable-script-notification \
60         --enable-dsl-pm \
61         --enable-dsl-pm-total \
62         --enable-dsl-pm-history \
63         --enable-dsl-pm-showtime \
64         --enable-dsl-pm-channel-counters \
65         --enable-dsl-pm-datapath-counters \
66         --enable-dsl-pm-line-counters \
67         --enable-dsl-pm-channel-thresholds \
68         --enable-dsl-pm-datapath-thresholds \
69         --enable-dsl-pm-line-thresholds \
70         --enable-dsl-pm-optional-parameters
71
72 ifeq ($(CONFIG_LTQ_DSL_ENABLE_CLI),y)
73 CONFIGURE_ARGS += \
74         --enable-cli-support \
75         --enable-soap-support
76 endif
77
78 ifeq ($(CONFIG_LTQ_DSL_ENABLE_DSL_EVENT_POLLING),y)
79 CONFIGURE_ARGS += \
80         --enable-dsl-event-polling
81 endif
82
83 TARGET_CFLAGS += -I$(LINUX_DIR)/include
84
85 define Package/ltq-dsl-app/install
86         $(INSTALL_DIR) $(1)/etc/init.d
87         $(INSTALL_BIN) ./files/ifx_cpe_control_init.sh $(1)/etc/init.d/
88
89         $(INSTALL_DIR) $(1)/sbin
90         $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dsl_cpe_control $(1)/sbin
91 endef
92
93 $(eval $(call BuildPackage,ltq-dsl-app))