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
11 PKG_VERSION
:=0.2.2.22-alpha
14 PKG_SOURCE
:=tor-
$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://www.torproject.org
/dist \
16 http
://archive.torproject.org
/tor-package-archive
17 PKG_MD5SUM
:=482617714694340054b6669955e4271e
18 PKG_BUILD_DIR
=$(BUILD_DIR
)/tor-
$(PKG_VERSION
)/
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/tor-alpha
27 DEPENDS
:=+libevent
+libopenssl
+libpthread
+miniupnpc
28 TITLE
:=An anonymous Internet communication system
29 URL
:=http
://www.torproject.org
/
32 define Package
/tor-alpha
/description
33 Tor is a toolset for a wide range of organizations and people that want to
34 improve their safety and security on the Internet. Using Tor can help you
35 anonymize web browsing and publishing
, instant messaging
, IRC
, SSH
, and
36 more. Tor also provides a platform on which software developers can build
37 new applications with built-in anonymity
, safety
, and privacy features.
40 define Package
/tor-alpha
/conffiles
44 define Package
/tor-alpha
/postinst
51 # # check if we are on real system
52 if
[ -z
"$${IPKG_INSTROOT}" ]; then
53 # create copies of passwd and group, if we use squashfs
54 rootfs
=`mount |awk '/root/ { print $$5 }'`
55 if
[ "$$rootfs" = "squashfs" ]; then
56 if
[ -h
/etc
/group
]; then
58 cp
/rom
/etc
/group
/etc
/group
60 if
[ -h
/etc
/passwd
]; then
62 cp
/rom
/etc
/passwd
/etc
/passwd
68 if
[ -z
"$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/group)" ]; then
69 echo
"adding group $$name to /etc/group"
70 echo
"$${name}:x:$${id}:" >> $${IPKG_INSTROOT}/etc
/group
73 if
[ -z
"$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/passwd)" ]; then
74 echo
"adding user $$name to /etc/passwd"
75 echo
"$${name}:x:$${id}:$${id}:$${name}:/tmp/.$${name}:/bin/false" >> $${IPKG_INSTROOT}/etc
/passwd
80 --with-libevent-dir
="$(STAGING_DIR)/usr" \
81 --with-ssl-dir
="$(STAGING_DIR)/usr" \
83 --with-libminiupnpc-dir
="$(STAGING_DIR)/usr" \
88 # pass CFLAGS again to override -O2 set by configure
90 CFLAGS
="$(TARGET_CFLAGS)" \
92 define Package
/tor-alpha
/install
93 $(INSTALL_DIR
) $(1)/usr
/sbin
94 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/tor
$(1)/usr
/sbin
/
95 $(INSTALL_DIR
) $(1)/etc
/init.d
96 $(INSTALL_BIN
) .
/files
/tor.init
$(1)/etc
/init.d
/tor
97 $(INSTALL_DIR
) $(1)/etc
/tor
98 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/tor
/torrc.sample
$(1)/etc
/tor
/torrc
101 $(eval
$(call BuildPackage
,tor-alpha
))