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.

107 lines
3.6 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_CPE_ID:=cpe:/a:radicale:radicale
  11. PKG_SOURCE:=Radicale-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/R/Radicale/
  13. PKG_HASH:=02273fcc6ae10e0f74aa12652e24d0001eec8dbf467d54ddb4dfcc2af7d7a5db
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/radicale2-$(BUILD_VARIANT)-$(PKG_VERSION)
  15. include $(INCLUDE_DIR)/package.mk
  16. include ../../lang/python/python3-package.mk
  17. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  18. define Package/radicale2/Default
  19. SECTION:=net
  20. CATEGORY:=Network
  21. SUBMENU:=Web Servers/Proxies
  22. URL:=http://radicale.org/
  23. TITLE:=Radicale 2.x CalDAV/CardDAV server
  24. MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
  25. endef
  26. define Package/radicale2
  27. $(call Package/radicale2/Default)
  28. USERID:=radicale2=225:radicale2=225
  29. DEPENDS:=+python3 +python3-dateutil +python3-vobject +python3-setuptools
  30. CONFLICTS:=radicale
  31. VARIANT:=python3
  32. endef
  33. define Package/radicale2-examples
  34. $(call Package/radicale2/Default)
  35. TITLE:=Radicale v2 example configs
  36. endef
  37. define Package/radicale2-meta/description
  38. 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.
  39. 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.
  40. endef
  41. define Package/radicale2/description
  42. $(call Package/radicale2-meta/description)
  43. .
  44. This package contains the python files.
  45. endef
  46. define Package/radicale2-examples/description
  47. $(call Package/radicale2-meta/description)
  48. .
  49. This package contains upstream configs for example purposes.
  50. endef
  51. define Package/radicale2/conffiles
  52. /etc/config/radicale2
  53. /etc/radicale2/config
  54. /etc/radicale2/users
  55. /etc/radicale2/rights
  56. /etc/radicale2/logging
  57. endef
  58. define Package/radicale2/preinst
  59. #!/bin/sh
  60. [ -n "$${IPKG_INSTROOT}" ] && exit 0 # if run within buildroot exit
  61. # stop service if PKG_UPGRADE
  62. [ "$${PKG_UPGRADE}" = "1" ] && /etc/init.d/radicale2 stop >/dev/null 2>&1
  63. exit 0 # suppress errors from stop command
  64. endef
  65. define Py3Package/radicale2/filespec
  66. +|$(PYTHON3_PKG_DIR)
  67. +|/usr/bin/radicale2|0755
  68. endef
  69. define Py3Package/radicale2/install
  70. $(INSTALL_DIR) $(1)/usr/bin
  71. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/radicale $(PKG_INSTALL_DIR)/usr/bin/radicale2
  72. $(SED) 's,^#!.*python.*,#!/usr/bin/python$(PYTHON3_VERSION),' $(PKG_INSTALL_DIR)/usr/bin/radicale2
  73. $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
  74. $(INSTALL_CONF) ./files/radicale2.config $(1)/etc/config/radicale2
  75. $(INSTALL_BIN) ./files/radicale2.init $(1)/etc/init.d/radicale2
  76. endef
  77. define Package/radicale2-examples/install
  78. $(INSTALL_DIR) $(1)/usr/share/radicale2
  79. $(INSTALL_DATA) $(PKG_BUILD_DIR)/config $(1)/usr/share/radicale2/config.example
  80. $(INSTALL_DATA) $(PKG_BUILD_DIR)/rights $(1)/usr/share/radicale2/rights.example
  81. $(INSTALL_DATA) $(PKG_BUILD_DIR)/logging $(1)/usr/share/radicale2/logging.example
  82. endef
  83. $(eval $(call Py3Package,radicale2))
  84. $(eval $(call BuildPackage,radicale2))
  85. $(eval $(call BuildPackage,radicale2-src))
  86. $(eval $(call BuildPackage,radicale2-examples))