2 # Copyright (C) 2008-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://www.torproject.org/dist \
16 https://archive.torproject.org/tor-package-archive
17 PKG_MD5SUM:=dcecf699c4b929319d5f1ce0358d4835
21 include $(INCLUDE_DIR)/package.mk
23 define Package/tor/Default
26 URL:=https://www.torproject.org/
29 define Package/tor/Default/description
30 Tor is a toolset for a wide range of organizations and people that want to
31 improve their safety and security on the Internet. Using Tor can help you
32 anonymize web browsing and publishing, instant messaging, IRC, SSH, and
33 more. Tor also provides a platform on which software developers can build
34 new applications with built-in anonymity, safety, and privacy features.
38 $(call Package/tor/Default)
39 TITLE:=An anonymous Internet communication system
40 DEPENDS:=+libevent2 +libopenssl +libpthread +librt
43 define Package/tor-geoip
44 $(call Package/tor/Default)
45 TITLE:=GeoIP db for tor
49 define Package/tor/conffiles
54 --with-libevent-dir="$(STAGING_DIR)/usr" \
55 --with-ssl-dir="$(STAGING_DIR)/usr" \
61 # pass CFLAGS again to override -O2 set by configure
63 CFLAGS="$(TARGET_CFLAGS)"
65 define Package/tor/install
66 $(INSTALL_DIR) $(1)/usr/sbin
67 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor $(1)/usr/sbin/
68 $(INSTALL_DIR) $(1)/etc/init.d
69 $(INSTALL_BIN) ./files/tor.init $(1)/etc/init.d/tor
70 $(INSTALL_DIR) $(1)/etc/tor
71 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/tor/torrc.sample $(1)/etc/tor/torrc
74 define Package/tor-geoip/install
75 $(INSTALL_DIR) $(1)/usr/share/tor
76 $(CP) $(PKG_INSTALL_DIR)/usr/share/tor/geoip $(1)/usr/share/tor/
79 $(eval $(call BuildPackage,tor))
80 $(eval $(call BuildPackage,tor-geoip))