-
Notifications
You must be signed in to change notification settings - Fork 79
/
Makefile
62 lines (50 loc) · 1.38 KB
/
Makefile
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
55
56
57
58
59
60
61
62
#
# Copyright (C) 2014-2015 KyleRicardo
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=mentohust
PKG_VERSION:=0.3.1
PKG_RELEASE:=1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/mentohust
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libpcap
TITLE:=A Ruijie Client Daemon
URL:=https://github.com/KyleRicardo/MentoHUST-OpenWrt-ipk.git
SUBMENU:=Ruijie
endef
define Package/mentohust/description
A Ruijie Client Daemon,
Most usually used in Chinese universities.
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
$(SED) 's/dhclient/udhcpc -i/g' $(PKG_BUILD_DIR)/myconfig.c
endef
define Package/mentohust/conffiles
/etc/mentohust.conf
endef
define Build/Compile
#$(Build/Compile/$(PKG_NAME))
$(MAKE) -C $(PKG_BUILD_DIR)/ \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="$(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) -ldl"
endef
define Package/mentohust/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mentohust $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_CONF) ./files/mentohust.conf $(1)/etc/mentohust.conf
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/mentohust.init $(1)/etc/init.d/mentohust
endef
$(eval $(call BuildPackage,$(PKG_NAME)))