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.17
  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:=d3d12fc11da56e4ea8af37a22a9a0aa6579ab2d5
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  17. PKG_MIRROR_HASH:=7d8c4e58486c3a539f17437b3a802b67d53401971eceac2be50c47bcc756c27b
  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))