mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 06:58:39 +01:00
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>
(cherry-picked from commit f026dba26e)
This commit is contained in:
committed by
Josef Schlehofer
parent
88c3765a69
commit
f8ff5017d2
+34
-30
@@ -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
|
||||
|
||||
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
|
||||
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
|
||||
|
||||
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
|
||||
define Package/python-django
|
||||
$(call Package/django/Default)
|
||||
DEPENDS:= \
|
||||
+PACKAGE_python-django:python \
|
||||
+PACKAGE_python-django:python-pytz
|
||||
VARIANT:=python
|
||||
endef
|
||||
|
||||
define Package/python-django/description
|
||||
The web framework for perfectionists with deadlines.
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
|
||||
define Package/python3-django
|
||||
$(call Package/django/Default)
|
||||
DEPENDS:= \
|
||||
+PACKAGE_python3-django:python3 \
|
||||
+PACKAGE_python3-django:python3-pytz
|
||||
VARIANT:=python3
|
||||
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/description
|
||||
$(call Package/python-django/description)
|
||||
.
|
||||
(Variant for 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
|
||||
endef
|
||||
$(eval $(call PyPackage,python-django))
|
||||
$(eval $(call BuildPackage,python-django))
|
||||
|
||||
$(eval $(call BuildPackage,django))
|
||||
$(eval $(call Py3Package,python3-django))
|
||||
$(eval $(call BuildPackage,python3-django))
|
||||
|
||||
Reference in New Issue
Block a user