Revision f4124844

View differences:

.gitignore
31 31

  
32 32
# For *.pdf file generated by TEX
33 33
latex/note.pdf
34
latex/*.pdf
34 35

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

  
18
include $(TOPDIR)/rules.mk
19

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

  
27
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
28
PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/decorator/
29
PKG_MD5SUM:=dd3a0669e1e6f09699eefa2c7fbd9756
30

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

  
36

  
37
include $(INCLUDE_DIR)/package.mk
38

  
39

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

  
50
define Package/decorator/description
51
	The decorator module is over ten years old, but still alive and kicking. It is used by several frameworks (IPython, scipy, authkit, pylons, pycuda, sugar, ...) and has been stable for a long time. It is your best option if you want to preserve the signature of decorated functions in a consistent way across Python releases.
52
endef
53

  
54
# Specify what needs to be done to prepare for building the package.
55
# In our case, we need to specify PKG_SOURCE_URL and the PKG_SOURCE
56
# to download the source from the web. It was specified above.
57
define Build/Prepare
58
	$(call Build/Prepare/Default)
59
	mkdir -p $(PKG_BUILD_DIR)
60
endef
61

  
62
# We do not use the default Build/Configure or Build/Compile directives.
63
# Since decorator is the python library, there is nothing to compile.
64
# We will later want to copy the whole library into the appropriate location.
65

  
66
define Build/Configure
67
endef
68

  
69
define Build/Compile
70
endef
71

  
72
# Specify where and how to install the program. Since there is only 1
73
# decorator.py file, we simply copy this file into /usr/lib/python2.7 in
74
# the firmware image.
75

  
76
define Package/decorator/install
77
	mkdir $(1)/usr/
78
	mkdir $(1)/usr/lib
79
	mkdir $(1)/usr/lib/python2.7
80
	cp $(PKG_BUILD_DIR)/src/decorator.py $(1)/usr/lib/python2.7
81
endef
82

  
83

  
84
# This line executes the necessary commands to compile our program.
85
# The above define directives specify all the information needed, but this
86
# line calls BuildPackage which in turn actually uses this information to
87
# build a package.
88
$(eval $(call BuildPackage,decorator))
unused_packages/libboost/Makefile
1
##############################################
2
# OpenWrt Makefile for libboost 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:=libboost
23
PKG_RELEASE:=1
24

  
25
# This specifies the directory where we're going to build the program.
26
# The root build directory, $(BUILD_DIR), is by default the build_mipsel
27
# directory in your OpenWrt SDK directory
28
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
29

  
30

  
31
include $(INCLUDE_DIR)/package.mk
32

  
33

  
34
# Specify package information for this program.
35
# The variables defined here should be self explanatory.
36
define Package/libboost
37
	SECTION:=utils
38
	CATEGORY:=Utilities
39
	TITLE:=LibBoost Testing -- multiply number by 3
40
	MAINTAINER:=Quynh Nguyen <quynh.xq@gmail.com>
41
	DEPENDS:=+libstdcpp
42
endef
43

  
44
define Package/libboost/description
45
	A simple program to test one part of Boost library,
46
	more specifically, this execute the boost/lambda.
47
endef
48

  
49
# Specify what needs to be done to prepare for building the package.
50
# In our case, we need to copy the source files to the build directory.
51
# This is NOT the default.  The default uses the PKG_SOURCE_URL and the
52
# PKG_SOURCE which is not defined here to download the source from the web.
53
# In order to just build a simple program that we have just written, it is
54
# much easier to do it this way.
55
define Build/Prepare
56
	mkdir -p $(PKG_BUILD_DIR)
57
	$(CP) ./src/* $(PKG_BUILD_DIR)/
58
endef
59

  
60

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

  
64

  
65
# Specify where and how to install the program. Since we only have one file,
66
# the libboost executable, install it by copying it to the /bin directory on
67
# the router. The $(1) variable represents the root directory on the router running
68
# OpenWrt. The $(INSTALL_DIR) variable contains a command to prepare the install
69
# directory if it does not already exist.  Likewise $(INSTALL_BIN) contains the
70
# command to copy the binary file from its current location (in our case the build
71
# directory) to the install directory.
72
define Package/libboost/install
73
	$(INSTALL_DIR) $(1)/bin
74
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/libboost $(1)/bin/
75
endef
76

  
77

  
78
# This line executes the necessary commands to compile our program.
79
# The above define directives specify all the information needed, but this
80
# line calls BuildPackage which in turn actually uses this information to
81
# build a package.
82
$(eval $(call BuildPackage,libboost))
unused_packages/libboost/src/Makefile
1
##############################################
2
# Makefile for libboost program
3
##############################################
4

  
5
BOOST_PATH='/usr/local/boost'
6

  
7
libboost: libboost.o
8
	$(CXX) $(LDFLAGS) libboost.o -o libboost
9

  
10
libboost.o: libboost.cpp
11
	$(CXX) $(CXXFLAGS) -I $(BOOST_PATH) -c libboost.cpp
12

  
13
# remove object files and executable when user executes "make clean"
14
clean:
15
	rm *.o libboost
unused_packages/libboost/src/libboost.cpp
1
// http://www.boost.org/doc/libs/1_59_0/more/getting_started/unix-variants.html
2

  
3
#include <boost/lambda/lambda.hpp>
4
#include <iostream>
5
#include <iterator>
6
#include <algorithm>
7

  
8
int main()
9
{
10
    using namespace boost::lambda;
11
    typedef std::istream_iterator<int> in;
12

  
13
    std::for_each(
14
        in(std::cin), in(), std::cout << (_1 * 3) << " " );
15
}
unused_packages/libnetworkx/Makefile
1
##############################################
2
# OpenWrt Makefile for libnetworkx 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:=libnetworkx
23
PKG_RELEASE:=1
24

  
25
# This specifies the directory where we're going to build the program.
26
# The root build directory, $(BUILD_DIR), is by default the build_mipsel
27
# directory in your OpenWrt SDK directory
28
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
29

  
30

  
31
include $(INCLUDE_DIR)/package.mk
32

  
33

  
34
# Specify package information for this program.
35
# The variables defined here should be self explanatory.
36
define Package/libnetworkx
37
	SECTION:=utils
38
	CATEGORY:=Utilities
39
	TITLE:=Lib Networkx Testing -- output all the functions in networkx
40
	MAINTAINER:=Quynh Nguyen <quynh.xq@gmail.com>
41
	DEPENDS:=+python-light, networkx
42
endef
43

  
44
define Package/libnetworkx/description
45
	A simple program to output all the functions in networkx library.
46
endef
47

  
48
# Specify what needs to be done to prepare for building the package.
49
# In our case, we need to copy the source files to the build directory.
50
# This is NOT the default.  The default uses the PKG_SOURCE_URL and the
51
# PKG_SOURCE which is not defined here to download the source from the web.
52
# In order to just build a simple program that we have just written, it is
53
# much easier to do it this way.
54
define Build/Prepare
55
	mkdir -p $(PKG_BUILD_DIR)
56
	$(CP) ./src/* $(PKG_BUILD_DIR)/
57
endef
58

  
59

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

  
63

  
64
# Specify where and how to install the program. Since we only have one file,
65
# the libnetworkx executable, install it by copying it to the /bin directory on
66
# the router. The $(1) variable represents the root directory on the router running
67
# OpenWrt. The $(INSTALL_DIR) variable contains a command to prepare the install
68
# directory if it does not already exist.  Likewise $(INSTALL_BIN) contains the
69
# command to copy the binary file from its current location (in our case the build
70
# directory) to the install directory.
71
define Package/libnetworkx/install
72
	$(INSTALL_DIR) $(1)/bin
73
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/libnetworkx $(1)/bin/
74
endef
75

  
76

  
77
# This line executes the necessary commands to compile our program.
78
# The above define directives specify all the information needed, but this
79
# line calls BuildPackage which in turn actually uses this information to
80
# build a package.
81
$(eval $(call BuildPackage,libnetworkx))
unused_packages/libnetworkx/src/Makefile
1
libnetworkx: libnetworkx.py
2
	ln -s libnetworkx.py libnetworkx
3
	chmod +x libnetworkx
4

  
5
clean:
6
	rm libnetworkx
unused_packages/libnetworkx/src/libnetworkx
1
libnetworkx.py
unused_packages/libnetworkx/src/libnetworkx.py
1
#! /usr/bin/python
2
import networkx
3

  
4
if __name__ == '__main__':
5
    print "Success"
6
    print dir(networkx)
unused_packages/networkx/Makefile
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))

Also available in: Unified diff