40bd912504afd7554f4a64b40832a7b14a13ad78
[packages.git] / net / amwall / Makefile
1 # Copyright (C) 2006 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6 # $Id$
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=amwall
11 PKG_VERSION:=0.1.0
12 PKG_RELEASE:=1
13 PKG_MD5SUM:=a8b6438e7fd9ccadc9f68824ae62349c
14
15 PKG_SOURCE_URL:=ftp://ftp.amselinux.net/source/
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_CAT:=bzcat
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/amwall
25   SECTION:=net
26   CATEGORY:=Network
27   DEPENDS:=+libamsel
28   TITLE:=PF to iptables
29   DESCRIPTION:=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 -d -m0755 $(1)/usr/bin
50         $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
51         install -d -m0755 $(1)/usr/sbin
52         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin
53         install -d -m0755 $(1)/etc/amsel
54         $(CP) $(PKG_INSTALL_DIR)/etc/amsel* $(1)/etc
55 endef
56
57 $(eval $(call BuildPackage,amwall))