source: packages/net/tor/Makefile @ 20747

Last change on this file since 20747 was 20747, checked in by swalker, 7 years ago

[packages] tor: update to 0.2.1.25

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
1#
2# Copyright (C) 2008-2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=tor
11PKG_VERSION:=0.2.1.25
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://www.torproject.org/dist
16PKG_MD5SUM:=f58540b3c5835ac4f5de1b02bbddc703
17
18PKG_INSTALL:=1
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/tor
23  SECTION:=net
24  CATEGORY:=Network
25  DEPENDS:=+libevent +libopenssl +libpthread
26  TITLE:=An anonymous Internet communication system
27  URL:=http://www.torproject.org/
28endef
29
30define Package/tor/description
31 Tor is a toolset for a wide range of organizations and people that want to
32 improve their safety and security on the Internet. Using Tor can help you
33 anonymize web browsing and publishing, instant messaging, IRC, SSH, and
34 more. Tor also provides a platform on which software developers can build
35 new applications with built-in anonymity, safety, and privacy features.
36endef
37
38define Package/tor/conffiles
39/etc/tor/torrc
40endef
41
42define Package/tor/postinst
43#!/bin/sh
44
45name=tor
46id=52
47
48# do not change below
49# # check if we are on real system
50if [ -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
55                        rm /etc/group
56                        cp /rom/etc/group /etc/group
57                fi
58                if [ -h /etc/passwd ]; then
59                        rm /etc/passwd
60                        cp /rom/etc/passwd /etc/passwd
61                fi
62        fi
63fi
64
65echo ""
66if [ -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
69fi
70
71if [ -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
74fi
75endef
76
77CONFIGURE_ARGS += \
78        --with-libevent-dir="$(STAGING_DIR)/usr" \
79        --with-ssl-dir="$(STAGING_DIR)/usr" \
80
81CONFIGURE_VARS += \
82        CROSS_COMPILE="yes" \
83
84# pass CFLAGS again to override -O2 set by configure
85MAKE_FLAGS += \
86        CFLAGS="$(TARGET_CFLAGS)" \
87
88define Package/tor/install
89        $(INSTALL_DIR) $(1)/usr/sbin
90        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor $(1)/usr/sbin/
91        $(INSTALL_DIR) $(1)/etc/init.d
92        $(INSTALL_BIN) ./files/tor.init $(1)/etc/init.d/tor
93        $(INSTALL_DIR) $(1)/etc/tor
94        $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/tor/torrc.sample $(1)/etc/tor/torrc
95endef
96
97$(eval $(call BuildPackage,tor))
Note: See TracBrowser for help on using the repository browser.