-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathruffd_makefile
executable file
·66 lines (53 loc) · 1.41 KB
/
ruffd_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
63
64
65
66
#
# Copyright (C) 2015 NanChao.Inc
#
# This software is created by nanchao.org
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ruffd
PKG_VERSION:=0.8.0
PKG_RELEASE:=1
ifdef GIT_BRANCH
BRANCH:=$(GIT_BRANCH:origin/%=%)
else
BRANCH:=$(strip $(shell git rev-parse --abbrev-ref HEAD))
endif
ifeq ($(findstring release,$(BRANCH)),release)
BRANCH:=release
endif
BASE_PROJECT_NAME=ruffd
ifeq ($(BRANCH), master)
PROJECT_NAME:=$(BASE_PROJECT_NAME)
else
PROJECT_NAME:=$(BASE_PROJECT_NAME)-$(BRANCH)
endif
PKG_SOURCE:=ruffd.zip
PKG_SOURCE_URL:=file:///$(TOPDIR)/dist/deps/
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/ruffd
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Ruffd Main Process
DEPENDS:=+libc +libpthread +libm +libdl
endef
#rm -f $(DL_DIR)/$(PKG_SOURCE)
#rm -rf $(PKG_BUILD_DIR)
define Build/Prepare
unzip $(DL_DIR)/$(PKG_SOURCE) -d $(PKG_BUILD_DIR)/
cp $(TOPDIR)/template/Makefile $(PKG_BUILD_DIR)
endef
define Package/ruffd/description
RUFFD
endef
define Package/ruffd/install
echo "Here is Package/install"
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ruffd/scripts/ruffd $(1)/etc/init.d/
$(INSTALL_DIR) $(1)/etc/ruff/
$(INSTALL_DIR) $(1)/ruff/ruffd/src
$(CP) $(PKG_BUILD_DIR)/ruffd/src/* $(1)/ruff/ruffd/src
$(CP) $(PKG_BUILD_DIR)/ruffd/package.json $(1)/ruff/ruffd/
endef
$(eval $(call BuildPackage,ruffd))