Always use -R flag with cp (to preserve symlinks)
[openwrt.git] / package / tor / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=tor
6 PKG_VERSION:=0.1.0.8rc
7 PKG_RELEASE:=1
8 PKG_UPSTREAM_VERSION=0.1.0.8-rc
9 PKG_MD5SUM:=22f5c162e1c09f8693a21826f6a9999f
10
11 PKG_SOURCE_URL:=http://tor.eff.org/dist/ \
12 http://ftp.se.linux.org/crypto/tor/ \
13 http://tor.meulie.net/
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.gz
15 PKG_CAT:=zcat
16
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_UPSTREAM_VERSION)
18 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
19
20 include $(TOPDIR)/package/rules.mk
21
22 $(eval $(call PKG_template,TOR,tor,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
23
24 $(PKG_BUILD_DIR)/.configured:
25 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
26 $(TARGET_CONFIGURE_OPTS) \
27 CFLAGS="$(TARGET_CFLAGS)" \
28 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
29 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
30 ac_cv_libevent_normal=yes \
31 ac_cv_openssldir="$(STAGING_DIR)/usr" \
32 tor_cv_null_is_zero=yes \
33 tor_cv_unaligned_ok=yes \
34 ./configure \
35 --target=$(GNU_TARGET_NAME) \
36 --host=$(GNU_TARGET_NAME) \
37 --build=$(GNU_HOST_NAME) \
38 --program-prefix="" \
39 --program-suffix="" \
40 --prefix=/usr \
41 --exec-prefix=/usr \
42 --bindir=/usr/sbin \
43 --datadir=/usr/share \
44 --includedir=/usr/include \
45 --infodir=/usr/share/info \
46 --libdir=/usr/lib \
47 --libexecdir=/usr/lib \
48 --localstatedir=/var \
49 --mandir=/usr/share/man \
50 --sbindir=/usr/sbin \
51 --sysconfdir=/etc \
52 $(DISABLE_LARGEFILE) \
53 $(DISABLE_NLS) \
54 --enable-shared \
55 --disable-static \
56 );
57 touch $@
58
59 $(PKG_BUILD_DIR)/.built:
60 rm -rf $(PKG_INSTALL_DIR)
61 mkdir -p $(PKG_INSTALL_DIR)
62 $(MAKE) -C $(PKG_BUILD_DIR) \
63 CFLAGS="$(TARGET_CFLAGS) -Wall" \
64 DESTDIR="$(PKG_INSTALL_DIR)" \
65 all install
66 touch $@
67
68 $(IPKG_TOR):
69 install -d -m0755 $(IDIR_TOR)/etc/init.d
70 install -m0755 ./files/tor.init $(IDIR_TOR)/etc/init.d/tor
71 install -d -m0755 $(IDIR_TOR)/etc/tor
72 install -m0644 ./files/torrc $(IDIR_TOR)/etc/tor/torrc
73 install -d -m0755 $(IDIR_TOR)/usr/sbin
74 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/tor $(IDIR_TOR)/usr/sbin/
75 $(RSTRIP) $(IDIR_TOR)
76 $(IPKG_BUILD) $(IDIR_TOR) $(PACKAGE_DIR)
77
This page took 0.044374 seconds and 5 git commands to generate.