move in Python submenu, misc cosmetic changes
[openwrt/svn-archive/archive.git] / lang / pymysql / Makefile
1 #
2 # Copyright (C) 2007-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=MySQL-python
12 PKG_VERSION:=1.2.2
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/mysql-python
17 PKG_MD5SUM:=532268f02870bea18c1d465e88afff30
18
19 PKG_BUILD_DEPENDS:=python
20
21 include $(INCLUDE_DIR)/package.mk
22 -include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
23 ifneq ($(MAKECMDGOALS),download)
24 $(if $(DUMP)$(Build/Compile/PyMod),,$(error Python packaging code not found.))
25 endif
26
27 define Package/python-mysql
28 SUBMENU:=Python
29 SECTION:=lang
30 CATEGORY:=Languages
31 TITLE:=MySQL database adapter for Python
32 URL:=http://mysql-python.sourceforge.net/
33 DEPENDS:=python-core +libmysqlclient
34 endef
35
36 define Package/python-mysql/description
37 MySQLdb is an thread-compatible interface to the popular MySQL database
38 server that provides the Python database API.
39 endef
40
41 define PyPackage/python-mysql/filespec
42 +|$(PYTHON_PKG_DIR)/_mysql.so
43 +|$(PYTHON_PKG_DIR)/_mysql_exceptions.py*
44 +|$(PYTHON_PKG_DIR)/MySQLdb
45 endef
46
47 define Build/Compile
48 $(call Build/Compile/PyMod,., \
49 install --prefix="$(PKG_INSTALL_DIR)/usr", \
50 )
51 endef
52
53 $(eval $(call PyPackage,python-mysql))
54 $(eval $(call BuildPackage,python-mysql))