change cp to $(CP)
[openwrt.git] / openwrt / package / miredo / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=miredo
6 PKG_VERSION:=0.5.3
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=bbbbf60db1346af0bbba6602067ed7ab
9
10 PKG_SOURCE_URL:=http://people.via.ecp.fr/~rem/miredo/v0.5/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
12 PKG_CAT:=bzcat
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,MIREDO,miredo,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20 $(eval $(call PKG_template,MIREDO_SERVER,miredo-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
21
22 $(PKG_BUILD_DIR)/.configured:
23 ( cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
24 $(TARGET_CONFIGURE_OPTS) \
25 CFLAGS="$(TARGET_CFLAGS)" \
26 CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \
27 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
28 LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
29 LIBS="-luClibc++ -lc -lm" \
30 ac_cv_file__proc_self_maps=yes \
31 ./configure \
32 --target=$(GNU_TARGET_NAME) \
33 --host=$(GNU_TARGET_NAME) \
34 --build=$(GNU_HOST_NAME) \
35 --program-prefix="" \
36 --program-suffix="" \
37 --prefix=/usr \
38 --exec-prefix=/usr \
39 --bindir=/usr/bin \
40 --datadir=/usr/share \
41 --includedir=/usr/include \
42 --infodir=/usr/share/info \
43 --libdir=/usr/lib \
44 --libexecdir=/usr/lib \
45 --localstatedir=/var \
46 --mandir=/usr/share/man \
47 --sbindir=/usr/sbin \
48 --sysconfdir=/etc \
49 $(DISABLE_LARGEFILE) \
50 $(DISABLE_NLS) \
51 --disable-shared \
52 --enable-static \
53 --with-gnu-ld \
54 --disable-rpath \
55 --disable-chroot \
56 --enable-teredo-client \
57 --enable-teredo-relay \
58 --enable-teredo-server \
59 --enable-miredo-user=root \
60 );
61 touch $@
62
63 $(PKG_BUILD_DIR)/.built:
64 rm -rf $(PKG_INSTALL_DIR)
65 mkdir -p $(PKG_INSTALL_DIR)
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 CXXLINK="\$$(LINK)" \
68 DESTDIR="$(PKG_INSTALL_DIR)" \
69 all install
70 touch $@
71
72 $(IPKG_MIREDO):
73 install -d -m0755 $(IDIR_MIREDO)/etc
74 $(CP) $(PKG_INSTALL_DIR)/etc/miredo.conf-dist $(IDIR_MIREDO)/etc/miredo.conf
75 install -d -m0755 $(IDIR_MIREDO)/etc/init.d
76 install -m0755 ./files/miredo.init $(IDIR_MIREDO)/etc/init.d/miredo
77 install -d -m0755 $(IDIR_MIREDO)/usr/sbin
78 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/miredo $(IDIR_MIREDO)/usr/sbin/
79 $(RSTRIP) $(IDIR_MIREDO)
80 $(IPKG_BUILD) $(IDIR_MIREDO) $(PACKAGE_DIR)
81
82 $(IPKG_MIREDO_SERVER):
83 install -d -m0755 $(IDIR_MIREDO_SERVER)/etc/
84 $(CP) $(PKG_INSTALL_DIR)/etc/miredo-server.conf-dist $(IDIR_MIREDO_SERVER)/etc/miredo-server.conf
85 install -d -m0755 $(IDIR_MIREDO_SERVER)/etc/init.d
86 install -m0755 ./files/miredo-server.init $(IDIR_MIREDO_SERVER)/etc/init.d/miredo-server
87 install -d -m0755 $(IDIR_MIREDO_SERVER)/usr/sbin
88 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/miredo-server $(IDIR_MIREDO_SERVER)/usr/sbin/
89 $(RSTRIP) $(IDIR_MIREDO_SERVER)
90 $(IPKG_BUILD) $(IDIR_MIREDO_SERVER) $(PACKAGE_DIR)
91
92 mostlyclean:
93 -$(MAKE) -C $(PKG_BUILD_DIR) clean
94 rm -f $(PKG_BUILD_DIR)/.built
This page took 0.051386 seconds and 5 git commands to generate.