summaryrefslogtreecommitdiff
path: root/lang/python/django
diff options
context:
space:
mode:
authorAlexandru Ardelean <ardeleanalex@gmail.com>2019-06-03 15:25:39 +0300
committerAlexandru Ardelean <ardeleanalex@gmail.com>2019-06-18 15:12:19 +0300
commitf026dba26ee31877d5170b9cbfc68d0eddcdb305 (patch)
tree9aa06f1176ece11a757e3b5cd2eae96d4ab57a8d /lang/python/django
parent83277d8bf3365f2e8653d866163236d30faa3e2d (diff)
django: convert to python pkg format + add python3 variant
This also updates all dependencies to use the new `python-django` package. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Diffstat (limited to 'lang/python/django')
-rw-r--r--lang/python/django/Makefile66
1 files changed, 35 insertions, 31 deletions
diff --git a/lang/python/django/Makefile b/lang/python/django/Makefile
index 23a07585a..f280d3fca 100644
--- a/lang/python/django/Makefile
+++ b/lang/python/django/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=django
PKG_VERSION:=1.11.17
-PKG_RELEASE=3
+PKG_RELEASE=4
PKG_SOURCE:=Django-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/D/Django
@@ -21,46 +21,50 @@ PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE LICENSE.python
PKG_CPE_ID:=cpe:/a:djangoproject:django
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-django-$(PKG_VERSION)
+
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
-define Package/django
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- TITLE:=The web framework for perfectionists with deadlines.
- URL:=https://www.djangoproject.com/
- DEPENDS:=+python +python-pytz
+define Package/django/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=The web framework for perfectionists with deadlines.
+ URL:=https://www.djangoproject.com/
endef
-define Package/django/description
- The web framework for perfectionists with deadlines.
+define Package/python-django
+$(call Package/django/Default)
+ DEPENDS:= \
+ +PACKAGE_python-django:python \
+ +PACKAGE_python-django:python-pytz
+ VARIANT:=python
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python-django/description
+ The web framework for perfectionists with deadlines.
endef
-define Build/InstallDev
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(INSTALL_DIR) $(1)/usr/bin
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \
- $(1)/usr/bin
+define Package/python3-django
+$(call Package/django/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-django:python3 \
+ +PACKAGE_python3-django:python3-pytz
+ VARIANT:=python3
endef
-define Package/django/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(INSTALL_DIR) $(1)/usr/bin
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \
- $(1)/usr/bin
- # fix python exec path
- sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/django-admin.py
+define Package/python3-django/description
+$(call Package/python-django/description)
+.
+(Variant for Python3)
endef
-$(eval $(call BuildPackage,django))
+$(eval $(call PyPackage,python-django))
+$(eval $(call BuildPackage,python-django))
+
+$(eval $(call Py3Package,python3-django))
+$(eval $(call BuildPackage,python3-django))