rtl-sdr: switch to git tarball
[feed/packages.git] / net / tor-hs / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=tor-hs
11 PKG_VERSION:=0.0.1
12 PKG_RELEASE:=3
13
14 PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
15 PKG_LICENSE:=GPL-3.0-or-later
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define Package/tor-hs
20 SECTION:=net
21 CATEGORY:=Network
22 SUBMENU:=IP Addresses and Names
23 TITLE:=Tor hidden service configurator
24 DEPENDS:=+tor +rpcd
25 endef
26
27 define Package/tor-hs/description
28 Tor Hidden Service configurator
29 endef
30
31 define Package/tor-hs/conffiles
32 /etc/config/tor-hs
33 endef
34
35 define Build/Compile
36 endef
37
38 define Build/Install
39 endef
40
41 define Package/tor-hs/postinst
42 #!/bin/sh
43 [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/rpcd restart
44 exit 0
45 endef
46
47 define Package/tor-hs/postrm
48 #!/bin/sh
49 [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/rpcd restart
50 exit 0
51 endef
52
53 define Package/tor-hs/install
54 $(INSTALL_DIR) $(1)/etc/config/
55 $(CP) ./files/tor-hs.conf $(1)/etc/config/tor-hs
56 $(INSTALL_DIR) $(1)/etc/init.d/
57 $(INSTALL_BIN) ./files/tor-hs.init $(1)/etc/init.d/tor-hs
58 $(INSTALL_DIR) $(1)/etc/tor/
59 $(INSTALL_BIN) ./files/nextcloud-update.sh $(1)/etc/tor/
60 $(INSTALL_DIR) $(1)/usr/libexec/rpcd
61 $(INSTALL_BIN) ./files/tor_rpcd.sh $(1)/usr/libexec/rpcd/tor-hs-rpc
62 endef
63
64 $(eval $(call BuildPackage,tor-hs))