2 # Copyright (C) 2008-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
7 include $(TOPDIR
)/rules.mk
12 PKG_MAINTAINER
:=Christian Schoenebeck
<christian.schoenebeck@gmail.com
>
15 PKG_LICENSE_FILES
:=COPYING
17 PKG_SOURCE
:=Radicale-
$(PKG_VERSION
).
tar.gz
18 PKG_SOURCE_URL
:=http
://pypi.python.org
/packages
/source
/R
/Radicale
/
19 PKG_MD5SUM
:=a29dd538377ea24cec83237a636122ae
21 # needed for "r"adicale <-> "R"adicale
22 PKG_BUILD_DIR
:=$(BUILD_DIR
)/Radicale-
$(PKG_VERSION
)
24 include $(INCLUDE_DIR
)/package.mk
26 # no default dependencies
29 define Package
/$(PKG_NAME
)/Default
32 SUBMENU
:=Web Servers
/Proxies
33 URL
:=http
://radicale.org
/
35 USERID
:=radicale
=5232:radicale
=5232
37 define Package
/$(PKG_NAME
)-py2
38 $(call Package
/$(PKG_NAME
)/Default
)
40 TITLE
:=Radicale CalDAV
/CardDAV server
(Python
2)
42 DEPENDS
:=+python-logging
+python-openssl
+python-xml
+python-codecs
44 define Package
/$(PKG_NAME
)-py3
45 $(call Package
/$(PKG_NAME
)/Default
)
47 TITLE
:=Radicale CalDAV
/CardDAV server
(Python
3)
49 DEPENDS
:=+python3-logging
+python3-openssl
+python3-xml
+python3-codecs
+python3-email @BROKEN
52 # shown in LuCI package description
53 define Package
/$(PKG_NAME
)-py2
/description
54 Radicale CalDAV
/CardDAV server
(Python
2) - Homepage
: http
://radicale.org
/
56 define Package
/$(PKG_NAME
)-py3
/description
57 Radicale CalDAV
/CardDAV server
(Python
3) - Homepage
: http
://radicale.org
/
60 # shown in make menuconfig <Help>
61 define Package
/$(PKG_NAME
)-py2
/config
63 The Radicale Project is a CalDAV
(calendar
) and CardDAV
(contact
) server.
64 It aims to be a light solution
, easy to use
, easy to
install, easy to configure.
65 As a consequence
, it requires few software dependances and is pre-configured to work out-of-the-box.
66 !!! Will
install and use Python
$(PYTHON_VERSION
) !!!
68 Version
: $(PKG_VERSION
)
69 Homepage
: http
://radicale.org
/
73 Package
/$(PKG_NAME
)-py3
/config
= $(Package
/$(PKG_NAME
)-py2
/config
)
75 define Package
/$(PKG_NAME
)-py2
/conffiles
80 Package
/$(PKG_NAME
)-py3
/conffiles
= $(Package
/$(PKG_NAME
)-py2
/conffiles
)
82 define Build
/Configure
87 define Package
/$(PKG_NAME
)-py2
/preinst
89 [ -n
"$${IPKG_INSTROOT}" ] && exit
0 # if run within buildroot exit
91 # stop service if PKG_UPGRADE
92 [ "$${PKG_UPGRADE}" = "1" ] && /etc
/init.d
/$(PKG_NAME
) stop
>/dev
/null
2>&1
94 exit
0 # suppress errors from stop command
96 define Package
/$(PKG_NAME
)-py3
/preinst
97 $(call Package
/$(PKG_NAME
)-py2
/preinst
)
100 define Package
/$(PKG_NAME
)-py2
/install
101 $(INSTALL_DIR
) $(1)/etc
/init.d
102 $(INSTALL_BIN
) .
/files
/radicale.init
$(1)/etc
/init.d
/radicale
104 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/iface
105 $(INSTALL_BIN
) .
/files
/radicale.hotplug
$(1)/etc
/hotplug.d
/iface
/80-radicale
107 $(INSTALL_DIR
) $(1)/etc
/config
108 $(INSTALL_CONF
) .
/files
/radicale.config
$(1)/etc
/config
/radicale
110 $(INSTALL_DIR
) $(1)/lib
/upgrade
/keep.d
111 $(INSTALL_DATA
) .
/files
/radicale.upgrade
$(1)/lib
/upgrade
/keep.d
/radicale
113 $(INSTALL_DIR
) $(1)/etc
/radicale
/ssl
114 $(INSTALL_DATA
) .
/files
/config.template
$(1)/etc
/radicale
/config.template
115 $(INSTALL_DATA
) .
/files
/logging.template
$(1)/etc
/radicale
/logging.template
116 $(INSTALL_DATA
) .
/files
/radicale.users
$(1)/etc
/radicale
/users
117 $(INSTALL_DATA
) .
/files
/radicale.rights
$(1)/etc
/radicale
/rights
119 $(INSTALL_DIR
) $(1)/usr
/lib
/python
$(PYTHON_VERSION
)/site-packages
/radicale
121 $(PKG_BUILD_DIR
)/radicale
/* \
122 $(1)/usr
/lib
/python
$(PYTHON_VERSION
)/site-packages
/radicale
124 $(INSTALL_DIR
) $(1)/usr
/bin
125 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/bin
/radicale
$(1)/usr
/bin
/
127 define Package
/$(PKG_NAME
)-py3
/install
128 $(call Package
/$(PKG_NAME
)-py2
/install, $(1))
131 define Package
/$(PKG_NAME
)-py2
/postinst
133 # patch /usr/bin/radicale force run using python2
134 /bin
/sed
-i
's/python/python2/' $${IPKG_INSTROOT}/usr
/bin
/radicale
136 define Package
/$(PKG_NAME
)-py3
/postinst
138 # patch /usr/bin/radicale force run using python3
139 /bin
/sed
-i
's/python/python3/' $${IPKG_INSTROOT}/usr
/bin
/radicale
142 $(eval
$(call BuildPackage
,$(PKG_NAME
)-py2
))
143 $(eval
$(call BuildPackage
,$(PKG_NAME
)-py3
))