change cp to $(CP)
[openwrt.git] / package / tinyproxy / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=tinyproxy
6 PKG_VERSION:=1.6.3
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=bd14d029b12621bcfd7ee71b2f4893da
9
10 PKG_SOURCE_URL:=@SF/tinyproxy
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,TINYPROXY,tinyproxy,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 ifeq ($(BR2_COMPILE_TINYPROXY_WITH_TRANSPARENT_PROXY),y)
22 ENABLE_TRANSPARENT:=--enable-transparent-proxy
23 endif
24 ifneq ($(BR2_COMPILE_TINYPROXY_WITH_UPSTREAM),y)
25 DISABLE_UPSTREAM:=--disable-upstream
26 endif
27 ifneq ($(BR2_COMPILE_TINYPROXY_WITH_FILTER),y)
28 DISABLE_FILTER:=--disable-filter
29 endif
30
31 $(PKG_BUILD_DIR)/.configured:
32 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
33 $(TARGET_CONFIGURE_OPTS) \
34 CFLAGS="$(strip $(TARGET_CFLAGS))" \
35 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
36 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
37 ./configure \
38 --target=$(GNU_TARGET_NAME) \
39 --host=$(GNU_TARGET_NAME) \
40 --build=$(GNU_HOST_NAME) \
41 --program-prefix="" \
42 --program-suffix="" \
43 --prefix=/usr \
44 --exec-prefix=/usr \
45 --bindir=/usr/bin \
46 --datadir=/usr/share \
47 --includedir=/usr/include \
48 --infodir=/usr/share/info \
49 --libdir=/usr/lib \
50 --libexecdir=/usr/lib \
51 --localstatedir=/var \
52 --mandir=/usr/share/man \
53 --sbindir=/usr/sbin \
54 --sysconfdir=/etc \
55 $(DISABLE_NLS) \
56 --disable-static \
57 $(ENABLE_TRANSPARENT) \
58 $(DISABLE_UPSTREAM) \
59 $(DISABLE_FILTER) \
60 );
61 touch $(PKG_BUILD_DIR)/.configured
62
63 $(PKG_BUILD_DIR)/.built:
64 $(MAKE) -C $(PKG_BUILD_DIR)
65 mkdir -p $(PKG_INSTALL_DIR)
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 DESTDIR="$(PKG_INSTALL_DIR)" \
68 install
69 find $(PKG_INSTALL_DIR) -name '*dist' | xargs rm -f
70 touch $(PKG_BUILD_DIR)/.built
71
72 $(IPKG_TINYPROXY):
73 install -d -m0755 $(IDIR_TINYPROXY)/usr/sbin \
74 $(IDIR_TINYPROXY)/etc/tinyproxy \
75 $(IDIR_TINYPROXY)/etc/init.d \
76 $(IDIR_TINYPROXY)/var/log \
77 $(IDIR_TINYPROXY)/usr/share
78 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/tinyproxy $(IDIR_TINYPROXY)/usr/sbin/
79 $(CP) $(PKG_INSTALL_DIR)/usr/share/tinyproxy $(IDIR_TINYPROXY)/usr/share/
80 $(CP) $(PKG_INSTALL_DIR)/etc/tinyproxy $(IDIR_TINYPROXY)/etc/
81 $(CP) files/$(PKG_NAME).init $(IDIR_TINYPROXY)/etc/init.d/$(PKG_NAME)
82 $(RSTRIP) $(IDIR_TINYPROXY)
83 $(IPKG_BUILD) $(IDIR_TINYPROXY) $(PACKAGE_DIR)
This page took 0.054735 seconds and 5 git commands to generate.