summaryrefslogtreecommitdiffstats
path: root/package/network/utils/rtkmib/Makefile
blob: dabf0c1ff4c03c16da0d540d37b2d90feb2cf201 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
include $(TOPDIR)/rules.mk

PKG_NAME:=rtkmib
PKG_VERSION:=f6e4b6dc
PKG_RELEASE:=1

PKG_SOURCE_MIRROR:=0
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
PKG_SOURCE_VERSION:=$(PKG_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://git.nprove.in/$(PKG_NAME)

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
PKG_ROOTFS_DIR:=/usr/bin

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk


define Package/$(PKG_NAME)
	SECTION:=utils
	CATEGORY:=Utilities
	VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
	TITLE:=Realtek MIB reader
	MAINTAINER:=Roman Yeryomin <roman@advem.lv>
	DEPENDS:=@TARGET_realtek
endef

define Package/$(PKG_NAME)/description
	Realtek MIB data (calibration, MAC addresses, etc.) reader utility
endef

define Build/Compile
	$(MAKE) -C $(PKG_BUILD_DIR) \
		CC="$(TARGET_CC) -fhonour-copts" \
		CROSS_COMPILE="$(TARGET_CROSS)" \
		EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
		ARCH="$(ARCH)" \
		AR="$(TARGET_CROSS)ar" \
		RANLIB="$(TARGET_CROSS)ranlib" \
		EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
		all
endef

define Package/$(PKG_NAME)/install
	$(INSTALL_DIR) $(1)$(PKG_ROOTFS_DIR)
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)$(PKG_ROOTFS_DIR)/
#	$(INSTALL_DIR) $(1)/etc/init.d
#	$(INSTALL_BIN) base-files/etc/init.d/rtkmib $(1)/etc/init.d/
endef

$(eval $(call HostBuild))
$(eval $(call BuildPackage,$(PKG_NAME)))