packages/net/radicale/Makefile
Jeffery To 9c5a97c319 radicale: Remove Py2 variant, rename Py3 variant
This removes radicale-py2, the Py2 variant, and renames radicale-py3 to
radicale.

This also makes a number of changes:
* Actually use the Python package build system (from python3-package.mk)
* Download source from PyPI instead of GitHub git repo
* Remove unnecessary PKG_DEFAULT_DEPENDS definition
* Depend on python3-urllib instead of python3-email (now that urllib is
  separate from python3-light and has python3-email as a direct
  dependency)
* Move package description from menuconfig help to the actual
  description field
* Remove unnecessary preinst script (default prerm will stop the
  service now that the package name matches the init.d script name)
* Remove unnecessary lib/upgrade/keep.d entry (changed conffiles are
  preserved by sysupgrade by default)
* Remove unnecessary postinst script (Python build system will set the
  correct shebang)

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2019-05-27 23:45:23 +08:00

79 lines
2.3 KiB
Makefile

#
# Copyright (C) 2008-2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=radicale
PKG_VERSION:=1.1.6
PKG_RELEASE:=3
PKG_SOURCE:=Radicale-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/R/Radicale
PKG_HASH:=c007198ea45ef797344672c681d4c13f8b4aa85c15c41a1156225767a405c92b
PKG_BUILD_DIR:=$(BUILD_DIR)/Radicale-$(PKG_VERSION)
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
include ../../lang/python/python3-package.mk
define Package/radicale
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
TITLE:=Radicale CalDAV/CardDAV server
URL:=https://radicale.org/
DEPENDS:= \
+python3-light \
+python3-codecs \
+python3-logging \
+python3-openssl \
+python3-urllib \
+python3-xml
USERID:=radicale=5232:radicale=5232
PROVIDES:=radicale-py2 radicale-py3
VARIANT:=python3
endef
define Package/radicale/description
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.
endef
define Package/radicale/conffiles
/etc/config/radicale
/etc/radicale/users
/etc/radicale/rights
endef
define Py3Package/radicale/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/radicale.init $(1)/etc/init.d/radicale
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) ./files/radicale.hotplug $(1)/etc/hotplug.d/iface/80-radicale
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/radicale.config $(1)/etc/config/radicale
$(INSTALL_DIR) $(1)/etc/radicale/ssl
$(INSTALL_DATA) ./files/config.template $(1)/etc/radicale/config.template
$(INSTALL_DATA) ./files/logging.template $(1)/etc/radicale/logging.template
$(INSTALL_DATA) ./files/radicale.users $(1)/etc/radicale/users
$(INSTALL_DATA) ./files/radicale.rights $(1)/etc/radicale/rights
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/radicale $(1)/usr/bin/
endef
$(eval $(call Py3Package,radicale))
$(eval $(call BuildPackage,radicale))
$(eval $(call BuildPackage,radicale-src))