2 # Copyright (C) 2008 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
12 PKG_VERSION
:=0.2.0.26-rc
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://www.torproject.org
/dist/
17 PKG_MD5SUM
:=aa1179fab4dc69a10278e70729681053
19 include $(INCLUDE_DIR
)/package.mk
24 DEPENDS
:=+libevent
+libopenssl
+libpthread
+zlib
25 TITLE
:=An anonymous Internet communication system
26 URL
:=http
://tor.eff.org
/
29 define Package
/tor
/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.
37 define Package
/tor
/conffiles
41 define Package
/tor
/postinst
48 # # check if we are on real system
49 if
[ -z
"$${IPKG_INSTROOT}" ]; then
50 # create copies of passwd and group, if we use squashfs
51 rootfs
=`mount |awk '/root/ { print $$5 }'`
52 if
[ "$$rootfs" = "squashfs" ]; then
53 if
[ -h
/etc
/group
]; then
55 cp
/rom
/etc
/group
/etc
/group
57 if
[ -h
/etc
/passwd
]; then
59 cp
/rom
/etc
/passwd
/etc
/passwd
65 if
[ -z
"$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/group)" ]; then
66 echo
"adding group $$name to /etc/group"
67 echo
"$${name}:x:$${id}:" >> $${IPKG_INSTROOT}/etc
/group
70 if
[ -z
"$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/passwd)" ]; then
71 echo
"adding user $name to /etc/passwd"
72 echo
"$${name}:x:$${id}:$${id}:$${name}:/tmp/.$${name}:/bin/false" >> $${IPKG_INSTROOT}/etc
/passwd
77 --with-libevent-dir
="$(STAGING_DIR)/usr" \
78 --with-ssl-dir
="$(STAGING_DIR)/usr" \
83 # pass CFLAGS again to override -O2 set by configure
85 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
86 CFLAGS
="$(TARGET_CFLAGS)" \
87 DESTDIR
="$(PKG_INSTALL_DIR)" \
91 define Package
/tor
/install
92 $(INSTALL_DIR
) $(1)/usr
/sbin
93 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/or
/tor
$(1)/usr
/sbin
/
94 $(INSTALL_DIR
) $(1)/etc
/init.d
95 $(INSTALL_BIN
) .
/files
/tor.init
$(1)/etc
/init.d
/tor
96 $(INSTALL_DIR
) $(1)/etc
/tor
97 $(INSTALL_DATA
) .
/files
/torrc
$(1)/etc
/tor
/torrc
100 $(eval
$(call BuildPackage
,tor
))