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.

108 lines
3.0 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=etesync-server
  3. PKG_VERSION:=0.3.0
  4. PKG_RELEASE:=2
  5. PKG_SOURCE:=etesync-server-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://github.com/etesync/server/archive/v$(PKG_VERSION)
  7. PKG_HASH:=d0728effa898a8b7afb4ce7439e0d0fd46bc819008925f21788d7e113435b579
  8. PKG_LICENSE:=AGPL-3.0-only
  9. PKG_LICENSE_FILES:=LICENSE
  10. PKG_MAINTAINER:=Peter Stadler <peter.stadler@student.uibk.ac.at>
  11. PKG_BUILD_PARALLEL:=1
  12. PYTHON3_PKG_BUILD:=0
  13. PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  14. include $(INCLUDE_DIR)/package.mk
  15. include ../../lang/python/python3-package.mk
  16. define Package/etesync-server
  17. SECTION:=net
  18. CATEGORY:=Network
  19. SUBMENU:=Web Servers/Proxies
  20. TITLE:=End-to-End Encrypted Secure Data Sync
  21. URL:=https://www.etesync.com/
  22. DEPENDS:=+nginx-ssl +python3-light +python3-django \
  23. +python3-django-restframework +python3-drf-nested-routers \
  24. +python3-django-cors-headers +python3-django-etesync-journal \
  25. +uwsgi +uwsgi-python3-plugin +uwsgi-syslog-plugin
  26. USERID:=etesync=44312
  27. endef
  28. define Package/etesync-server/description
  29. End-to-End Encrypted Secure Data Sync
  30. endef
  31. Build/Compile:=:
  32. define Py3Package/etesync-server/install
  33. $(INSTALL_DIR) $(1)/www/etesync/static/
  34. $(INSTALL_DIR) $(1)/etc/uci-defaults/
  35. $(CP) ./files/81_setup-etesync-server $(1)/etc/uci-defaults/
  36. $(INSTALL_DIR) $(1)/etc/nginx/conf.d/
  37. $(INSTALL_CONF) ./files/etesync.locations $(1)/etc/nginx/conf.d/
  38. $(INSTALL_DIR) $(1)/etc/config/
  39. $(INSTALL_CONF) ./files/uci.cfg $(1)/etc/config/etesync_server
  40. $(INSTALL_DIR) $(1)/usr/share/etesync-server/templates/
  41. $(INSTALL_DATA) $(PKG_BUILD_DIR)/templates/* \
  42. $(1)/usr/share/etesync-server/templates/
  43. $(INSTALL_DIR) $(1)/usr/share/etesync-server/etesync_server/
  44. $(INSTALL_DATA) $(PKG_BUILD_DIR)/manage.py \
  45. $(1)/usr/share/etesync-server/
  46. $(INSTALL_DATA) $(PKG_BUILD_DIR)/etesync_server/* \
  47. $(1)/usr/share/etesync-server/etesync_server/
  48. $(LN) /var/etc/etesync-server/etesync-server.ini \
  49. $(1)/usr/share/etesync-server/
  50. #init creates /var/etc/etesync-server/etesync-server.ini from uci.cfg
  51. $(INSTALL_DIR) $(1)/etc/uwsgi/vassals/
  52. $(INSTALL_CONF) ./files/uwsgi.ini \
  53. $(1)/etc/uwsgi/vassals/etesync-server.available
  54. $(LN) /var/etc/etesync-server/uwsgi.ini \
  55. $(1)/etc/uwsgi/vassals/etesync-server.ini
  56. #init links etesync-server.available /var/etc/etesync-server/uwsgi.ini
  57. $(INSTALL_DIR) $(1)/etc/init.d/
  58. $(INSTALL_BIN) ./files/uwsgi.init $(1)/etc/init.d/etesync-server
  59. endef
  60. Py3Package/etesync-server/filespec:=
  61. define Package/etesync-server/postrm
  62. #!/bin/sh
  63. [ -n "$${IPKG_INSTROOT}" ] && exit 0
  64. rmdir /usr/share/etesync-server/etesync_server
  65. [ "$${PKG_UPGRADE}" = "1" ] && exit 0
  66. rm -r /www/etesync/static
  67. rmdir /www/etesync
  68. exit 0
  69. endef
  70. define Package/etesync-server/conffiles
  71. /etc/config/etesync_server
  72. /etc/nginx/conf.d/etesync.locations
  73. /etc/uwsgi/vassals/etesync-server.available
  74. endef
  75. $(eval $(call Py3Package,etesync-server))
  76. $(eval $(call BuildPackage,etesync-server))
  77. $(eval $(call BuildPackage,etesync-server-src))