source: packages/net/tor-alpha/Makefile @ 25260

Last change on this file since 25260 was 25260, checked in by swalker, 6 years ago

[packages] tor-alpha: update to 0.2.2.22-alpha, add archive mirror

File size: 2.9 KB
Line 
1#
2# Copyright (C) 2008-2011 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-alpha
11PKG_VERSION:=0.2.2.22-alpha
12PKG_RELEASE:=1
13
14PKG_SOURCE:=tor-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=https://www.torproject.org/dist \
16        http://archive.torproject.org/tor-package-archive
17PKG_MD5SUM:=482617714694340054b6669955e4271e
18PKG_BUILD_DIR=$(BUILD_DIR)/tor-$(PKG_VERSION)/
19
20PKG_INSTALL:=1
21
22include $(INCLUDE_DIR)/package.mk
23
24define Package/tor-alpha
25  SECTION:=net
26  CATEGORY:=Network
27  DEPENDS:=+libevent +libopenssl +libpthread +miniupnpc
28  TITLE:=An anonymous Internet communication system
29  URL:=http://www.torproject.org/
30endef
31
32define 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.
38endef
39
40define Package/tor-alpha/conffiles
41/etc/tor/torrc
42endef
43
44define Package/tor-alpha/postinst
45#!/bin/sh
46
47name=tor
48id=52
49
50# do not change below
51# # check if we are on real system
52if [ -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
57                        rm /etc/group
58                        cp /rom/etc/group /etc/group
59                fi
60                if [ -h /etc/passwd ]; then
61                        rm /etc/passwd
62                        cp /rom/etc/passwd /etc/passwd
63                fi
64        fi
65fi
66
67echo ""
68if [ -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
71fi
72
73if [ -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
76fi
77endef
78
79CONFIGURE_ARGS += \
80        --with-libevent-dir="$(STAGING_DIR)/usr" \
81        --with-ssl-dir="$(STAGING_DIR)/usr" \
82        --enable-upnp \
83        --with-libminiupnpc-dir="$(STAGING_DIR)/usr" \
84
85CONFIGURE_VARS += \
86        CROSS_COMPILE="yes" \
87
88# pass CFLAGS again to override -O2 set by configure
89MAKE_FLAGS += \
90        CFLAGS="$(TARGET_CFLAGS)" \
91
92define 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
99endef
100
101$(eval $(call BuildPackage,tor-alpha))
Note: See TracBrowser for help on using the repository browser.