misc cosmetic fixes:
[openwrt/svn-archive/archive.git] / net / amwall / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=amwall
12 PKG_VERSION:=0.1.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.amselinux.net/source/
17 PKG_MD5SUM:=a8b6438e7fd9ccadc9f68824ae62349c
18 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/amwall
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libamsel
29 TITLE:=PF to iptables
30 URL:=http://www.amselinux.net/
31 endef
32
33 define Build/Compile
34 rm -rf $(PKG_INSTALL_DIR)
35 mkdir -p $(PKG_INSTALL_DIR)
36 $(MAKE) -C $(PKG_BUILD_DIR) \
37 $(TARGET_CONFIGURE_OPTS) \
38 V= \
39 LDIR="$(PKG_BUILD_DIR)" \
40 AMSEL_INCLUDE="$(STAGING_DIR)/usr/include" \
41 OPT_LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
42 PREFIX="/usr" \
43 CONFIG="$(PKG_BUILD_DIR)/etc/amsel" \
44 DESTDIR="$(PKG_INSTALL_DIR)" \
45 all install
46 endef
47
48 define Package/amwall/install
49 $(INSTALL_DIR) $(1)/usr/bin
50 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
51 $(INSTALL_DIR) $(1)/usr/sbin
52 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
53 $(INSTALL_DIR) $(1)/etc/amsel
54 $(CP) $(PKG_INSTALL_DIR)/etc/amsel* $(1)/etc/
55 endef
56
57 $(eval $(call BuildPackage,amwall))