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.

106 lines
3.5 KiB

  1. # This is free software, licensed under the GNU General Public License v2.
  2. # See /LICENSE for more information.
  3. include $(TOPDIR)/rules.mk
  4. PKG_NAME:=radicale2
  5. PKG_VERSION:=2.1.11
  6. PKG_RELEASE:=1
  7. PKG_MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
  8. PKG_LICENSE:=GPL-3.0
  9. PKG_LICENSE_FILES:=COPYING
  10. PKG_SOURCE:=Radicale-$(PKG_VERSION).tar.gz
  11. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/R/Radicale/
  12. PKG_HASH:=02273fcc6ae10e0f74aa12652e24d0001eec8dbf467d54ddb4dfcc2af7d7a5db
  13. PKG_BUILD_DIR:=$(BUILD_DIR)/radicale2-$(BUILD_VARIANT)-$(PKG_VERSION)
  14. include $(INCLUDE_DIR)/package.mk
  15. include ../../lang/python/python3-package.mk
  16. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  17. define Package/radicale2/Default
  18. SECTION:=net
  19. CATEGORY:=Network
  20. SUBMENU:=Web Servers/Proxies
  21. URL:=http://radicale.org/
  22. TITLE:=Radicale 2.x CalDAV/CardDAV server
  23. MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
  24. endef
  25. define Package/radicale2
  26. $(call Package/radicale2/Default)
  27. USERID:=radicale2=225:radicale2=225
  28. DEPENDS:=+python3 +python3-dateutil +python3-vobject +python3-setuptools
  29. CONFLICTS:=radicale
  30. VARIANT:=python3
  31. endef
  32. define Package/radicale2-examples
  33. $(call Package/radicale2/Default)
  34. TITLE:=Radicale v2 example configs
  35. endef
  36. define Package/radicale2-meta/description
  37. The Radicale Project is a CalDAV (calendar) and CardDAV (contact) server. It aims to be a light solution, easy to use, easy to install, easy to configure. As a consequence, it requires few software dependances and is pre-configured to work out-of-the-box.
  38. The Radicale Project runs on most of the UNIX-like platforms (Linux, BSD, MacOS X) and Windows. It is known to work with Evolution, Lightning, iPhone and Android clients. It is free and open-source software, released under GPL version 3.
  39. endef
  40. define Package/radicale2/description
  41. $(call Package/radicale2-meta/description)
  42. .
  43. This package contains the python files.
  44. endef
  45. define Package/radicale2-examples/description
  46. $(call Package/radicale2-meta/description)
  47. .
  48. This package contains upstream configs for example purposes.
  49. endef
  50. define Package/radicale2/conffiles
  51. /etc/config/radicale2
  52. /etc/radicale2/config
  53. /etc/radicale2/users
  54. /etc/radicale2/rights
  55. /etc/radicale2/logging
  56. endef
  57. define Package/radicale2/preinst
  58. #!/bin/sh
  59. [ -n "$${IPKG_INSTROOT}" ] && exit 0 # if run within buildroot exit
  60. # stop service if PKG_UPGRADE
  61. [ "$${PKG_UPGRADE}" = "1" ] && /etc/init.d/radicale2 stop >/dev/null 2>&1
  62. exit 0 # suppress errors from stop command
  63. endef
  64. define Py3Package/radicale2/filespec
  65. +|$(PYTHON3_PKG_DIR)
  66. +|/usr/bin/radicale2|0755
  67. endef
  68. define Py3Package/radicale2/install
  69. $(INSTALL_DIR) $(1)/usr/bin
  70. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/radicale $(PKG_INSTALL_DIR)/usr/bin/radicale2
  71. $(SED) 's,^#!.*python.*,#!/usr/bin/python$(PYTHON3_VERSION),' $(PKG_INSTALL_DIR)/usr/bin/radicale2
  72. $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
  73. $(INSTALL_CONF) ./files/radicale2.config $(1)/etc/config/radicale2
  74. $(INSTALL_BIN) ./files/radicale2.init $(1)/etc/init.d/radicale2
  75. endef
  76. define Package/radicale2-examples/install
  77. $(INSTALL_DIR) $(1)/usr/share/radicale2
  78. $(INSTALL_DATA) $(PKG_BUILD_DIR)/config $(1)/usr/share/radicale2/config.example
  79. $(INSTALL_DATA) $(PKG_BUILD_DIR)/rights $(1)/usr/share/radicale2/rights.example
  80. $(INSTALL_DATA) $(PKG_BUILD_DIR)/logging $(1)/usr/share/radicale2/logging.example
  81. endef
  82. $(eval $(call Py3Package,radicale2))
  83. $(eval $(call BuildPackage,radicale2))
  84. $(eval $(call BuildPackage,radicale2-src))
  85. $(eval $(call BuildPackage,radicale2-examples))