OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
1 | # |
2 | # Copyright (C) 2012 David Kuehling <dvdkhlng TA gmx TOD de> |
3 | # |
4 | # License GPLv2 or later. NO WARRANTY. |
5 | # |
6 | # OpenWRT package for Alpy: Allegro Game Library bindings for Python |
7 | |
8 | include $(TOPDIR)/rules.mk |
9 | |
10 | PKG_NAME:=alpy |
11 | PKG_VERSION:=0.1.5 |
12 | PKG_RELEASE:=2 |
13 | PKG_SOURCE:=Alpy-$(PKG_VERSION).tar.gz |
14 | PKG_SOURCE_URL:=@SF/project/pyallegro/alpy/alpy-$(PKG_VERSION) |
15 | PKG_MD5SUM:=862925d97931fc81d1e4c3b9159fe2b1 |
16 | PKG_BUILD_DIR:=$(BUILD_DIR)/Alpy-$(PKG_VERSION) |
17 | PKG_INSTALL:=1 |
18 | |
19 | include $(INCLUDE_DIR)/package.mk |
20 | $(call include_mk, python-package.mk) |
21 | |
22 | define Package/alpy/Default |
23 | SECTION:=libs |
24 | CATEGORY:=Languages |
25 | TITLE:=Alpy (Allegro bindings for Python) |
26 | URL:=http://pyallegro.sourceforge.net/alpy.php |
27 | DEPENDS:=+python-mini +liballegro +liballegro-png +liballegro-jpeg |
28 | MAINTAINER:="David Kuehling" <dvdkhlng TA gmx TOD de> |
29 | endef |
30 | |
31 | define Package/alpy/Default/description |
32 | Python bindings for the Allegro Game and Graphics Library |
33 | endef |
34 | |
35 | # note: needs thee the data-files from liballegro-demo for demo.py and others. |
36 | define Package/alpy |
37 | $(call Package/alpy/Default) |
38 | endef |
39 | |
40 | define Package/alpy/description |
41 | $(call Package/alpy/Default/description) |
42 | endef |
43 | |
44 | define Package/alpy-examples |
45 | $(call Package/alpy/Default) |
46 | TITLE:=Alpy Example Python Scripts |
47 | DEPENDS:=+alpy +liballegro-demo |
48 | endef |
49 | |
50 | define Package/alpy-examples/description |
51 | $(call Package/alpy/Default/description) |
52 | This package contains the example python scripts, installed to /usr/share/alpy. |
53 | First cd to the directory before running the scripts! |
54 | endef |
55 | |
56 | define Build/Compile |
57 | $(call Build/Compile/PyMod,,build) |
58 | endef |
59 | # --prefix="$(PKG_INSTALL_DIR)/usr" , \ |
60 | # LOCALBASE="$(STAGING_DIR)/usr" \ |
61 | # NO_SCRAP=1 \ |
62 | # ) |
63 | |
64 | # define Build/Configure |
65 | # # $(call Build/Configure/Default) |
66 | # endef |
67 | |
68 | # define Build/Compile |
69 | # CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CFLAGS) $(TARGET_LDFLAGS)" \ |
70 | # $(PKG_BUILD_DIR)/setup.py build |
71 | # endef |
72 | |
73 | # Note: this linking command will not work correctly when jpgalleg or loadpng |
74 | # are linked statically (Note how we patched allegro to make sure these are |
75 | # always compiled as dynamic libraries). The problem probably is, that |
76 | # Build/Compile adds these linking options to early in the command line, and |
77 | # static libraries won't resolve symbols of objects added later on. |
78 | # |
79 | # You won't even see a compiler error; the resulting _alpy.so would be going |
80 | # to segfault due to an unresolved (0-pointer) symbol. |
81 | TARGET_LDFLAGS += -ljpgalleg -lloadpng -lalleg -lpng -lz -lm -lpthread -ldl -lrt |
82 | |
83 | define Build/Install |
84 | $(call Build/Compile/PyMod,, \ |
85 | install --root $(PKG_INSTALL_DIR) --prefix=/usr) |
86 | endef |
87 | |
88 | # define Package/alpy/install |
89 | # $(INSTALL_DIR) $(1)/usr |
90 | # $(CP) $(PKG_INSTALL_DIR)/usr/* $(1)/usr/ |
91 | # endef |
92 | |
93 | define PyPackage/alpy/filespec |
94 | +|$(PYTHON_PKG_DIR)/alpy.py |
95 | +|$(PYTHON_PKG_DIR)/_alpy.so |
96 | endef |
97 | |
98 | define Package/alpy-examples/install |
99 | $(INSTALL_DIR) $(1)/usr/share/alpy/examples |
100 | $(CP) $(PKG_BUILD_DIR)/examples/* $(1)/usr/share/alpy/examples/ |
101 | endef |
102 | |
103 | $(eval $(call PyPackage,alpy)) |
104 | $(eval $(call BuildPackage,alpy)) |
105 | $(eval $(call BuildPackage,alpy-examples)) |
106 | |
107 | # The following comments configure the Emacs editor. Just ignore them. |
108 | # Local Variables: |
109 | # compile-command: "cd ~/src/nanonote/Alpy-0.1.5 && ~/bin/quilt-export target && make -C ~/h/src/qi/openwrt-xburst package/alpy/compile -j2 V=99" |
110 | # End: |
111 |