add ser2net from hazimin fauzi, thx
[openwrt/svn-archive/archive.git] / openwrt / package / ser2net / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=ser2net
6 PKG_VERSION:=2.3
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=5f83a3e8aec18331cb61069dccdfba47
9
10 PKG_SOURCE_URL:=@SF/ser2net/
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,SER2NET,ser2net,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
22 (cd $(PKG_BUILD_DIR); \
23 $(TARGET_CONFIGURE_OPTS) \
24 CFLAGS="$(TARGET_CFLAGS)" \
25 ./configure \
26 --target=$(GNU_TARGET_NAME) \
27 --host=$(GNU_TARGET_NAME) \
28 --build=$(GNU_HOST_NAME) \
29 --prefix=/usr \
30 --sysconfdir=/etc \
31 );
32 touch $@
33
34 $(PKG_BUILD_DIR)/.built:
35 rm -rf $(PKG_INSTALL_DIR)
36 mkdir -p $(PKG_INSTALL_DIR)
37 $(MAKE) -C $(PKG_BUILD_DIR) \
38 $(TARGET_CONFIGURE_OPTS) \
39 DESTDIR="$(PKG_INSTALL_DIR)" \
40 all install
41 touch $@
42
43 $(IPKG_SER2NET):
44 install -d -m0755 $(IDIR_SER2NET)/usr/sbin
45 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/ser2net $(IDIR_SER2NET)/usr/sbin
46 install -d -m0755 $(IDIR_SER2NET)/etc
47 cp -fpR $(PKG_BUILD_DIR)/ser2net.conf $(IDIR_SER2NET)/etc
48 $(RSTRIP) $(IDIR_SER2NET)
49 $(IPKG_BUILD) $(IDIR_SER2NET) $(PACKAGE_DIR)