-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (47 loc) · 1.13 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
63
64
include $(TOPDIR)/rules.mk
PKG_NAME:=clock_gcat_set_autorun
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
TITLE:=clock_gcat
endef
define Package/$(PKG_NAME)/description
clock_gcat is for I2C LCD 1602
endef
define Build/Compile
$(MAKE) -v
endef
define Package/$(PKG_NAME)/preinst
#!/bin/sh
echo "ready to install $(PKG_NAME)"
endef
define Package/$(PKG_NAME)/postinst
#!/bin/sh
echo "ok to install $(PKG_NAME)"
if [ -z "$${IPKG_INSTROOT}" ]; then
/etc/init.d/clock_gcat enable
fi
endef
define Package/$(PKG_NAME)/prerm
#!/bin/sh
echo "ready to remove $(PKG_NAME)"
if [ -z "$${IPKG_INSTROOT}" ]; then
/etc/init.d/clock_gcat disable
fi
endef
define Package/$(PKG_NAME)/postrm
#!/bin/sh
echo "ok to remove $(PKG_NAME)"
endef
#define Build/Prepare
# mkdir -p $(PKG_BUILD_DIR)
# $(CP) ./src/* $(PKG_BUILD_DIR)
#endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) ./files/clock_gcat.autorun $(1)/etc/init.d/clock_gcat
endef
$(eval $(call BuildPackage,$(PKG_NAME)))