[packages] tor: update to 0.2.2.36
[openwrt/svn-archive/archive.git] / net / tor / Makefile
1 #
2 # Copyright (C) 2008-2012 OpenWrt.org
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
11 PKG_VERSION:=0.2.2.36
12 PKG_RELEASE:=1
13
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:=620b2110086aba01236b57f1d5aba416
18
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/tor/Default
24 SECTION:=net
25 CATEGORY:=Network
26 URL:=https://www.torproject.org/
27 endef
28
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.
35 endef
36
37 define Package/tor
38 $(call Package/tor/Default)
39 TITLE:=An anonymous Internet communication system
40 DEPENDS:=+libevent2 +libopenssl +libpthread +librt
41 endef
42
43 define Package/tor-geoip
44 $(call Package/tor/Default)
45 TITLE:=GeoIP db for tor
46 DEPENDS:=+tor
47 endef
48
49 define Package/tor/conffiles
50 /etc/tor/torrc
51 endef
52
53 CONFIGURE_ARGS += \
54 --with-libevent-dir="$(STAGING_DIR)/usr" \
55 --with-ssl-dir="$(STAGING_DIR)/usr" \
56 --disable-asciidoc
57
58 CONFIGURE_VARS += \
59 CROSS_COMPILE="yes"
60
61 # pass CFLAGS again to override -O2 set by configure
62 MAKE_FLAGS += \
63 CFLAGS="$(TARGET_CFLAGS)"
64
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
72 endef
73
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/
77 endef
78
79 $(eval $(call BuildPackage,tor))
80 $(eval $(call BuildPackage,tor-geoip))