Statistics
| Branch: | Revision:

root / unused_packages / networkx / Makefile @ f4124844

History | View | Annotate | Download (4.9 KB)

1
##############################################
2
# OpenWrt Makefile for networkx program
3
#
4
#
5
# Most of the variables used here are defined in
6
# the include directives below. We just need to
7
# specify a basic description of the package,
8
# where to build our program, where to find
9
# the source files, and where to install the
10
# compiled program on the router.
11
#
12
# Be very careful of spacing in this file.
13
# Indents should be tabs, not spaces, and
14
# there should be no trailing whitespace in
15
# lines that are not commented.
16
#
17
##############################################
18

    
19
include $(TOPDIR)/rules.mk
20

    
21
# Name and release number of this package
22
PKG_NAME:=networkx
23
PKG_VERSION:=1.10
24
PKG_RELEASE:=1
25
PKG_LICENSE:=GPL-3.0+
26
PKG_LICENSE_FILES:=COPYING
27

    
28
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
29
PKG_SOURCE_URL:=http://pypi.python.org/packages/source/n/networkx/
30
PKG_MD5SUM:=eb7a065e37250a4cc009919dacfe7a9d
31

    
32

    
33
# This specifies the directory where we're going to build the program.
34
# The root build directory, $(BUILD_DIR), is by default the build_mipsel
35
# directory in your OpenWrt SDK directory
36
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
37

    
38

    
39
include $(INCLUDE_DIR)/package.mk
40

    
41

    
42
# Specify package information for this program.
43
# The variables defined here should be self explanatory.
44
define Package/networkx
45
	SECTION:=utils
46
	CATEGORY:=PythonLibraries
47
	TITLE:=Networkx
48
	MAINTAINER:=Quynh Nguyen <quynh.xq@gmail.com>
49
	DEPENDS:=+python-light +python-logging +python-openssl +python-codecs +python-decimal +decorator
50
endef
51

    
52
define Package/networkx/description
53
	NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.
54
endef
55

    
56
# Specify what needs to be done to prepare for building the package.
57
# In our case, we need to copy the source files to the build directory.
58
# This is NOT the default.  The default uses the PKG_SOURCE_URL and the
59
# PKG_SOURCE which is not defined here to download the source from the web.
60
# In order to just build a simple program that we have just written, it is
61
# much easier to do it this way.
62

    
63
# 4:53pm Oct 7, 2015 ==> download the package online, so comment out this part
64
# define Build/Prepare
65
# 	mkdir -p $(PKG_BUILD_DIR)
66
# 	$(CP) ./src/* $(PKG_BUILD_DIR)/
67
# endef
68

    
69

    
70
# ERROR
71
# make[4]: Entering directory `/home/quynh/Thesis/cc-openwrt/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/networkx-1.10'
72
# make[4]: *** No targets specified and no makefile found.  Stop.
73
# SOLUTION ==> Create empty Makefile
74

    
75
# ERROR
76
# make[4]: Entering directory `/home/quynh/Thesis/cc-openwrt/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/networkx-1.10'
77
# make[4]: *** No targets.  Stop.
78

    
79
# 12:02 Oct 9, 2015 ==> Create empty Makefile
80
define Build/Prepare
81
	echo "XXXXXXXXXXXXXX Build Prepare"
82
	$(call Build/Prepare/Default)
83
	mkdir -p $(PKG_BUILD_DIR)
84
	echo "" > $(PKG_BUILD_DIR)/Makefile
85
endef
86

    
87
# We do not need to define Build/Configure or Build/Compile directives
88
# The defaults are appropriate for compiling a simple program such as this one
89

    
90
# Oct 19, 2015 define Build/Configure and Build/Compile so that it won't do anything
91
define Build/Configure
92
endef
93

    
94
define Build/Compile
95
endef
96

    
97
# Specify where and how to install the program. Since we only have one file,
98
# the networkx executable, install it by copying it to the /bin directory on
99
# the router. The $(1) variable represents the root directory on the router running
100
# OpenWrt. The $(INSTALL_DIR) variable contains a command to prepare the install
101
# directory if it does not already exist.  Likewise $(INSTALL_BIN) contains the
102
# command to copy the binary file from its current location (in our case the build
103
# directory) to the install directory.
104

    
105

    
106
# define Package/networkx/install
107
# 	$(INSTALL_DIR) $(1)/bin
108
# 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/networkx $(1)/bin
109
# endef
110

    
111

    
112

    
113

    
114

    
115

    
116
# define Package/networkx/install
117
# 	mkdir $(1)/usr/local
118
# 	mkdir $(1)/usr/local/lib
119
# 	mkdir $(1)/usr/local/lib/python2.7
120
# 	mkdir $(1)/usr/local/lib/python2.7/dist-packages
121
# 	cp -r $(PKG_BUILD_DIR)/networkx $(1)/usr/local/lib/python2.7/dist-packages/
122
# endef
123

    
124

    
125
# 3:43 pm Oct 9, 2015 ==> Try to copy file to a folder
126
define Package/networkx/install
127
	echo "XXXXXXXXXXXXXXXXX networkx/install"
128
	mkdir $(1)/usr/
129
	mkdir $(1)/usr/lib
130
	mkdir $(1)/usr/lib/python2.7
131
	# mkdir $(1)/usr/local/lib/python2.7/dist-packages
132
	# cp -r $(PKG_BUILD_DIR)/networkx $(1)/usr/local/lib/python2.7/dist-packages/
133

    
134
	# added 4:24 pm, to see if it can help with ERROR make[4]: *** No targets.  Stop.
135
	# $(INSTALL_DIR) $(1)/bin
136
	cp -r $(PKG_BUILD_DIR)/networkx $(1)/usr/lib/python2.7
137
	# $(INSTALL_DATA) $(PKG_BUILD_DIR)/networkx $(1)/usr/lib/python2.7/
138
	# $(INSTALL_DATA) $(PKG_BUILD_DIR)/networkx $(1)/usr/python2.7/
139
endef
140

    
141

    
142
# This line executes the necessary commands to compile our program.
143
# The above define directives specify all the information needed, but this
144
# line calls BuildPackage which in turn actually uses this information to
145
# build a package.
146
$(eval $(call BuildPackage,networkx))