various ccache fixes (closes: #1599), thanks to Bartman007
[openwrt/svn-archive/archive.git] / net / wol / 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:=wol
12 PKG_VERSION:=0.7.1
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=c2fa9d7e771134ac8c89d56b8197d4ca
15
16 PKG_SOURCE_URL:=@SF/ahh
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_CAT:=zcat
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/wol
26 SECTION:=net
27 CATEGORY:=Network
28 TITLE:=Wake On LAN client
29 DESCRIPTION:=\
30 wol implements Wake On LAN functionality in a small program.\
31 It wakes up hardware that is Magic Packet compliant.
32 URL:=http://ahh.sourceforge.net/wol/
33 endef
34
35
36 define Build/Configure
37 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
38 $(TARGET_CONFIGURE_OPTS) \
39 CFLAGS="$(TARGET_CFLAGS)" \
40 ./configure \
41 ac_cv_func_malloc_0_nonnull=yes \
42 ac_cv_func_realloc_0_nonnull=yes \
43 ac_cv_func_mmap_fixed_mapped=yes \
44 jm_cv_func_working_malloc=yes \
45 ac_cv_func_alloca_works=yes \
46 --target=$(GNU_TARGET_NAME) \
47 --host=$(GNU_TARGET_NAME) \
48 --build=$(GNU_HOST_NAME) \
49 --program-prefix="" \
50 --program-suffix="" \
51 --prefix=/usr \
52 --exec-prefix=/usr \
53 --bindir=/usr/bin \
54 --datadir=/usr/share \
55 --includedir=/usr/include \
56 --infodir=/usr/share/info \
57 --libdir=/usr/lib \
58 --libexecdir=/usr/lib \
59 --localstatedir=/var \
60 --mandir=/usr/share/man \
61 --sbindir=/usr/sbin \
62 --sysconfdir=/etc \
63 $(DISABLE_NLS) \
64 $(DISABLE_LARGEFILE) \
65 );
66 endef
67
68 define Build/Compile
69 rm -rf $(PKG_INSTALL_DIR)
70 mkdir -p $(PKG_INSTALL_DIR)
71 $(MAKE) -C $(PKG_BUILD_DIR) \
72 CC="$(TARGET_CC)" \
73 DESTDIR="$(PKG_INSTALL_DIR)" \
74 all install
75 endef
76
77 define Package/wol/install
78 $(INSTALL_DIR) $(1)/usr/bin
79 $(CP) $(PKG_INSTALL_DIR)/usr/bin/wol $(1)/usr/bin/
80 $(RSTRIP) $(1)
81 endef
82
83 $(eval $(call BuildPackage,wol))