udptunnel: new package
[feed/packages.git] / lang / python / python-yaml / Makefile
1 #
2 # Copyright (C) 2008-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=PyYAML
11 PKG_VERSION:=3.13
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://pypi.python.org/packages/source/P/PyYAML
16 PKG_HASH:=3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf
17
18 PKG_LICENSE:=MIT
19 PKG_LICENSE_FILES:=COPYING
20 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
21
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
23 PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
24
25 include $(INCLUDE_DIR)/package.mk
26 include ../python-package.mk
27 include ../python3-package.mk
28
29 define Package/python-yaml/Default
30 SUBMENU:=Python
31 SECTION:=lang
32 CATEGORY:=Languages
33 URL:=https://pyyaml.org/wiki/PyYAML
34 DEPENDS:=+libyaml
35 endef
36
37 define Package/python-yaml
38 $(call Package/python-yaml/Default)
39 TITLE:=YAML parser and emitter for Python
40 DEPENDS+=+PACKAGE_python-yaml:python-light +PACKAGE_python-yaml:python-codecs
41 VARIANT:=python
42 endef
43
44 define Package/python3-yaml
45 $(call Package/python-yaml/Default)
46 TITLE:=YAML parser and emitter for Python3
47 DEPENDS+=+PACKAGE_python3-yaml:python3-light
48 VARIANT:=python3
49 endef
50
51 define PyBuild/Compile
52 $(call Build/Compile/PyMod,,\
53 --with-libyaml install --prefix="$(PKG_INSTALL_DIR)/usr" \
54 )
55 endef
56
57 define Py3Build/Compile
58 $(call Build/Compile/Py3Mod,,\
59 --with-libyaml install --prefix="$(PKG_INSTALL_DIR)/usr" \
60 )
61 endef
62
63 $(eval $(call PyPackage,python-yaml))
64 $(eval $(call BuildPackage,python-yaml))
65 $(eval $(call Py3Package,python3-yaml))
66 $(eval $(call BuildPackage,python3-yaml))