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.

64 lines
1.4 KiB

  1. #
  2. # Copyright (C) 2020-2021 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=tor-hs
  9. PKG_VERSION:=0.0.1
  10. PKG_RELEASE:=2
  11. PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
  12. PKG_LICENSE:=GPL-3.0-or-later
  13. include $(INCLUDE_DIR)/package.mk
  14. define Package/tor-hs
  15. SECTION:=net
  16. CATEGORY:=Network
  17. SUBMENU:=IP Addresses and Names
  18. TITLE:=Tor hidden service configurator
  19. DEPENDS:=+tor +rpcd
  20. endef
  21. define Package/tor-hs/description
  22. Tor Hidden Service configurator
  23. endef
  24. define Package/tor-hs/conffiles
  25. /etc/config/tor-hs
  26. endef
  27. define Build/Compile
  28. endef
  29. define Build/Install
  30. endef
  31. define Package/tor-hs/postinst
  32. #!/bin/sh
  33. [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/rpcd restart
  34. exit 0
  35. endef
  36. define Package/tor-hs/postrm
  37. #!/bin/sh
  38. [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/rpcd restart
  39. exit 0
  40. endef
  41. define Package/tor-hs/install
  42. $(INSTALL_DIR) $(1)/etc/config/
  43. $(CP) ./files/tor-hs.conf $(1)/etc/config/tor-hs
  44. $(INSTALL_DIR) $(1)/etc/init.d/
  45. $(INSTALL_BIN) ./files/tor-hs.init $(1)/etc/init.d/tor-hs
  46. $(INSTALL_DIR) $(1)/etc/tor/
  47. $(INSTALL_BIN) ./files/nextcloud-update.sh $(1)/etc/tor/
  48. $(INSTALL_DIR) $(1)/usr/libexec/rpcd
  49. $(INSTALL_BIN) ./files/tor_rpcd.sh $(1)/usr/libexec/rpcd/
  50. endef
  51. $(eval $(call BuildPackage,tor-hs))