summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Lang <mlang@blind.guru>2017-12-06 11:09:06 (GMT)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-12-06 22:05:18 (GMT)
commit398859e815eae1a90fcc3f35599ad452495d985f (patch)
tree9d1d5113f462f85f941cc97f54a52b09d5725543
parent0284c82eb589d86decd5e0bdd15e04ccd4e4426f (diff)
downloadbuildroot-398859e815eae1a90fcc3f35599ad452495d985f.tar.gz
buildroot-398859e815eae1a90fcc3f35599ad452495d985f.tar.bz2
package/tor: Install default config and systemd .service file
Signed-off-by: Mario Lang <mlang@blind.guru> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/tor/tor.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/package/tor/tor.mk b/package/tor/tor.mk
index 6a42dbc..925e4d8 100644
--- a/package/tor/tor.mk
+++ b/package/tor/tor.mk
@@ -47,4 +47,16 @@ endif
# uses gnu extensions
TOR_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
+define TOR_INSTALL_CONF
+ $(INSTALL) -D -m 644 $(@D)/src/config/torrc.minimal \
+ $(TARGET_DIR)/etc/tor/torrc
+endef
+
+TOR_POST_INSTALL_TARGET_HOOKS += TOR_INSTALL_CONF
+
+define TOR_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -D -m 644 $(@D)/contrib/dist/tor.service \
+ $(TARGET_DIR)/usr/lib/systemd/system/tor.service
+endef
+
$(eval $(autotools-package))