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
:=ea99aba49694bb982d2fccc57a70d58e
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
53 define Package
/tor
/postinst
60 # # check if we are on real system
61 if
[ -z
"$${IPKG_INSTROOT}" ]; then
62 # create copies of passwd and group, if we use squashfs
63 rootfs
=`mount |awk '/root/ { print $$5 }'`
64 if
[ "$$rootfs" = "squashfs" ]; then
65 if
[ -h
/etc
/group
]; then
67 cp
/rom
/etc
/group
/etc
/group
69 if
[ -h
/etc
/passwd
]; then
71 cp
/rom
/etc
/passwd
/etc
/passwd
77 if
[ -z
"$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/group)" ]; then
78 echo
"adding group $$name to /etc/group"
79 echo
"$${name}:x:$${id}:" >> $${IPKG_INSTROOT}/etc
/group
82 if
[ -z
"$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/passwd)" ]; then
83 echo
"adding user $$name to /etc/passwd"
84 echo
"$${name}:x:$${id}:$${id}:$${name}:/tmp/.$${name}:/bin/false" >> $${IPKG_INSTROOT}/etc
/passwd
89 --with-libevent-dir
="$(STAGING_DIR)/usr" \
90 --with-ssl-dir
="$(STAGING_DIR)/usr" \
96 # pass CFLAGS again to override -O2 set by configure
98 CFLAGS
="$(TARGET_CFLAGS)"
100 define Package
/tor
/install
101 $(INSTALL_DIR
) $(1)/usr
/sbin
102 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/tor
$(1)/usr
/sbin
/
103 $(INSTALL_DIR
) $(1)/etc
/init.d
104 $(INSTALL_BIN
) .
/files
/tor.init
$(1)/etc
/init.d
/tor
105 $(INSTALL_DIR
) $(1)/etc
/tor
106 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/tor
/torrc.sample
$(1)/etc
/tor
/torrc
109 define Package
/tor-geoip
/install
110 $(INSTALL_DIR
) $(1)/usr
/share
/tor
111 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/tor
/geoip
$(1)/usr
/share
/tor
/
114 $(eval
$(call BuildPackage
,tor
))
115 $(eval
$(call BuildPackage
,tor-geoip
))