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.

65 lines
1.7 KiB

  1. #
  2. # Copyright (C) 2007-2016 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.12
  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:=c168aeba175dbb92c615460a360cb1ea978de5d3
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  17. PKG_BUILD_DEPENDS:=python python-setuptools
  18. include $(INCLUDE_DIR)/package.mk
  19. $(call include_mk, python-package.mk)
  20. define Package/django
  21. SUBMENU:=Python
  22. SECTION:=lang
  23. CATEGORY:=Languages
  24. TITLE:=The web framework for perfectionists with deadlines.
  25. MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
  26. URL:=https://www.djangoproject.com/
  27. DEPENDS:=+python
  28. endef
  29. define Package/django/description
  30. The web framework for perfectionists with deadlines.
  31. endef
  32. define Build/Compile
  33. $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
  34. endef
  35. define Build/InstallDev
  36. $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
  37. $(INSTALL_DIR) $(1)/usr/bin
  38. $(CP) \
  39. $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
  40. $(1)$(PYTHON_PKG_DIR)
  41. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \
  42. $(1)/usr/bin
  43. endef
  44. define Package/django/install
  45. $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
  46. $(INSTALL_DIR) $(1)/usr/bin
  47. $(CP) \
  48. $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
  49. $(1)$(PYTHON_PKG_DIR)
  50. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \
  51. $(1)/usr/bin
  52. # fix python exec path
  53. sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/django-admin.py
  54. endef
  55. $(eval $(call BuildPackage,django))