You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.8 KiB

  1. #
  2. # Copyright (C) 2007-2017 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=django
  9. PKG_VERSION:=1.8.18
  10. PKG_RELEASE=1
  11. PKG_LICENSE:=BSD-3-Clause
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_URL:=https://github.com/django/django.git
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_SOURCE_VERSION:=2d4bc5a60aa8a076689667c550ded96b87bc463e
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  17. PKG_MIRROR_HASH:=c82c2cc338ae46ba8572d9960fc98dca932edc43a00f011fed102810a86185ae
  18. PKG_BUILD_DEPENDS:=python python-setuptools
  19. include $(INCLUDE_DIR)/package.mk
  20. $(call include_mk, python-package.mk)
  21. define Package/django
  22. SUBMENU:=Python
  23. SECTION:=lang
  24. CATEGORY:=Languages
  25. TITLE:=The web framework for perfectionists with deadlines.
  26. MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
  27. URL:=https://www.djangoproject.com/
  28. DEPENDS:=+python
  29. endef
  30. define Package/django/description
  31. The web framework for perfectionists with deadlines.
  32. endef
  33. define Build/Compile
  34. $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
  35. endef
  36. define Build/InstallDev
  37. $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
  38. $(INSTALL_DIR) $(1)/usr/bin
  39. $(CP) \
  40. $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
  41. $(1)$(PYTHON_PKG_DIR)
  42. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \
  43. $(1)/usr/bin
  44. endef
  45. define Package/django/install
  46. $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
  47. $(INSTALL_DIR) $(1)/usr/bin
  48. $(CP) \
  49. $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
  50. $(1)$(PYTHON_PKG_DIR)
  51. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \
  52. $(1)/usr/bin
  53. # fix python exec path
  54. sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/django-admin.py
  55. endef
  56. $(eval $(call BuildPackage,django))