ASR_BASE
Change-Id: Icf3719cc0afe3eeb3edc7fa80a2eb5199ca9dda1
diff --git a/external/subpack/lang/python/django/Makefile b/external/subpack/lang/python/django/Makefile
new file mode 100644
index 0000000..2709770
--- /dev/null
+++ b/external/subpack/lang/python/django/Makefile
@@ -0,0 +1,48 @@
+#
+# Copyright (C) Alexandru Ardelean <ardeleanalex@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=django
+PKG_VERSION:=5.1
+PKG_RELEASE:=1
+
+PYPI_NAME:=Django
+PKG_HASH:=848a5980e8efb76eea70872fb0e4bc5e371619c70fffbe48e3e1b50b2c09455d
+
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Peter Stadler <peter.stadler@student.uibk.ac.at>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE LICENSE.python
+PKG_CPE_ID:=cpe:/a:djangoproject:django
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-django
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=The web framework for perfectionists with deadlines.
+ URL:=https://www.djangoproject.com/
+ DEPENDS:= +python3 +python3-pytz +python3-sqlparse +python3-asgiref
+ CONFLICTS:=python3-django1
+ PROVIDES:=django
+endef
+
+define Package/python3-django/description
+ The web framework for perfectionists with deadlines.
+endef
+
+define Py3Package/python3-django/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin $(1)/usr/bin
+endef
+
+$(eval $(call Py3Package,python3-django))
+$(eval $(call BuildPackage,python3-django))
+$(eval $(call BuildPackage,python3-django-src))
diff --git a/external/subpack/lang/python/django/test.sh b/external/subpack/lang/python/django/test.sh
new file mode 100644
index 0000000..40eecc1
--- /dev/null
+++ b/external/subpack/lang/python/django/test.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+[ "$1" = "python3-django" ] || exit 0
+
+GOT_VER=$(/usr/bin/django-admin version)
+[ "$GOT_VER" = "$2" ] || {
+ echo "Incorrect version: expected '$2' ; obtained '$GOT_VER'"
+ exit 1
+}
+
+python3 - << EOF
+import sys
+import django
+
+if (django.__version__) != "$GOT_VER":
+ print("Wrong version: " + django.__version__)
+ sys.exit(1)
+
+sys.exit(0)
+EOF
+