1#
2# Copyright (C) 2007 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:=admswconfig
11PKG_VERSION:=0.1
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
16PKG_MD5SUM:=faafd4618f970119a665b11b21ac6a26
17
18PKG_FLAGS:=nonshared
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/admswconfig
23  SECTION:=utils
24  CATEGORY:=Utilities
25  TITLE:=ADM5120 Switch configuration tool
26  DEPENDS:=@TARGET_adm5120
27  URL:=http://sharon.esrac.ele.tue.nl/users/pe1rxq/linux-adm/admswconfig/
28  MAINTAINER:=Florian Fainelli <florian@openwrt.org>
29endef
30
31define Package/admswconfig/description
32 A program to configure the internal ethernet switch of an ADM5120 processor.
33 You need the corresponding driver for the switch in the kernel. 
34 With this program you can configure which ports of the switch belong 
35 to the different ethernet devices.
36endef
37
38define Build/Configure
39endef
40
41define Build/Compile
42	$(TARGET_CC) $(TARGET_CFLAGS) -Os $(PKG_BUILD_DIR)/admswconfig.c -o $(PKG_BUILD_DIR)/$(PKG_NAME)
43endef
44
45define Package/admswconfig/install
46	$(INSTALL_DIR) $(1)/sbin
47	$(INSTALL_BIN) $(PKG_BUILD_DIR)/admswconfig $(1)/sbin/
48	$(INSTALL_DIR) $(1)/lib/network/
49	$(INSTALL_DATA) ./files/admswswitch.sh $(1)/lib/network/admswswitch.sh
50	$(INSTALL_DIR) $(1)/etc/init.d
51	$(INSTALL_BIN) ./files/admswconfig $(1)/etc/init.d/admswconfig
52endef
53
54$(eval $(call BuildPackage,admswconfig))
55