First Commit
[librecmc/package-feed.git] / lang / python-setuptools / Makefile
1 #
2 # Copyright (C) 2014-2016 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:=python-setuptools
11 PKG_VERSION:=27.2.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=setuptools-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://pypi.python.org/packages/87/ba/54197971d107bc06f5f3fbdc0d728a7ae0b10cafca46acfddba65a0899d8/
16 PKG_MD5SUM:=b39715612fdc0372dbfd7b3fcf5d4fe5
17
18 HOST_BUILD_DEPENDS:=python python/host
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
22
23 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
24 HOST_UNPACK=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
25
26 include $(INCLUDE_DIR)/host-build.mk
27 include $(INCLUDE_DIR)/package.mk
28 $(call include_mk, python-package.mk)
29 $(call include_mk, python-host.mk)
30
31 define Package/python-setuptools
32   SUBMENU:=Python
33   SECTION:=lang
34   CATEGORY:=Languages
35   TITLE:=Tool for installing Python packages.
36   URL:=https://bitbucket.org/pypa/setuptools
37   DEPENDS:=+python +ca-certificates
38   MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
39 endef
40
41 define Package/python-setuptools/description
42   Easily download, build, install, upgrade, and uninstall Python packages
43 endef
44
45 define Build/Compile
46         $(call Build/Compile/PyMod,,\
47                 install --root="$(PKG_INSTALL_DIR)" --prefix="/usr" \
48                 --single-version-externally-managed \
49         )
50 endef
51
52 define Build/InstallDev
53         $(INSTALL_DIR) $(PYTHON_LIB_DIR)
54         $(CP) \
55                 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
56                 $(PYTHON_LIB_DIR)
57 endef
58
59 define PyPackage/python-setuptools/install
60         $(INSTALL_DIR) $(1)/usr/bin
61         $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
62 endef
63
64 define Host/Compile
65         $(call Build/Compile/HostPyMod,,\
66                 install --root="$(HOST_BUILD_PREFIX)" --prefix="" \
67                 --single-version-externally-managed \
68         )
69 endef
70
71 define Host/Install
72 endef
73
74 $(eval $(call HostBuild))
75
76 $(eval $(call PyPackage,python-setuptools))
77 $(eval $(call BuildPackage,python-setuptools))
78