2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://tor.eff.org
/dist/ \
17 http
://ftp.se.linux.org
/crypto
/tor
/ \
18 http
://tor.meulie.net
/
19 PKG_MD5SUM
:=f340777b3f6c3175de976856d2d2e4be
21 include $(INCLUDE_DIR
)/package.mk
26 DEPENDS
:=+libevent
+libopenssl
+libpthread
+zlib
27 TITLE
:=An anonymous Internet communication system
29 Tor is a toolset for a wide range of organizations and people that want
\\\
30 to improve their safety and security on the Internet. Using Tor can
\\\
31 help you anonymize web browsing and publishing
, instant messaging
, \\\
32 IRC
, SSH
, and more. Tor also provides a platform on which software
\\\
33 developers can build new applications with built-in anonymity
, safety
, \\\
35 URL
:=http
://tor.eff.org
/
38 define Package
/tor
/conffiles
42 define Package
/tor
/postinst
49 # # check if we are on real system
50 if
[ -z
"$${IPKG_INSTROOT}" ]; then
51 # create copies of passwd and group, if we use squashfs
52 rootfs
=`mount |awk '/root/ { print $$5 }'`
53 if
[ "$$rootfs" = "squashfs" ]; then
54 if
[ -h
/etc
/group
]; then
56 cp
/rom
/etc
/group
/etc
/group
58 if
[ -h
/etc
/passwd
]; then
60 cp
/rom
/etc
/passwd
/etc
/passwd
66 if
[ -z
"$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/group)" ]; then
67 echo
"adding group $$name to /etc/group"
68 echo
"$${name}:x:$${id}:" >> $${IPKG_INSTROOT}/etc
/group
71 if
[ -z
"$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/passwd)" ]; then
72 echo
"adding user $name to /etc/passwd"
73 echo
"$${name}:x:$${id}:$${id}:$${name}:/tmp/.$${name}:/bin/false" >> $${IPKG_INSTROOT}/etc
/passwd
78 --with-libevent-dir
="$(STAGING_DIR)/usr" \
79 --with-ssl-dir
="$(STAGING_DIR)/usr" \
83 define Package
/tor
/install
84 $(INSTALL_DIR
) $(1)/usr
/sbin
85 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/or
/tor
$(1)/usr
/sbin
/
86 $(INSTALL_DIR
) $(1)/etc
/init.d
87 $(INSTALL_BIN
) .
/files
/tor.init
$(1)/etc
/init.d
/tor
88 $(INSTALL_DIR
) $(1)/etc
/tor
89 $(INSTALL_DATA
) .
/files
/torrc
$(1)/etc
/tor
/torrc
92 $(eval
$(call BuildPackage
,tor
))