-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (41 loc) · 1.12 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
include $(TOPDIR)/rules.mk
PKG_NAME:=bsb_io
PKG_VERSION:=0.0.3
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
$(call include_mk, python-package.mk)
define Package/bsb_io
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
DEFAULT:=n
TITLE:=BlackSwift GPIO python module
URL:=http://black-swift.com
DEPENDS:=+python +libstdcpp
PKG_BUILD_DEPENDS:=+cython
endef
define Package/bsb_io/description
BlackSwift GPIO python module
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
define Build/Configure
$(call Build/Configure/Default,--with-linux-headers=$(LINUX_DIR))
endef
define Build/Compile
$(call Build/Compile/Default,)
$(call Build/Compile/PyMod,, build_ext )
$(call Build/Compile/PyMod,, install --prefix="$(PKG_INSTALL_DIR)/usr")
endef
define Package/bsb_io/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bsb_io $(1)/usr/bin/
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
$(CP) \
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
$(1)$(PYTHON_PKG_DIR)
endef
$(eval $(call BuildPackage,bsb_io))