3a8811686e67ab8b80b49c52622fd1b77cbf7b11
[openwrt.git] / package / wol / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=wol
6 PKG_VERSION:=0.7.1
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=c2fa9d7e771134ac8c89d56b8197d4ca
9
10 PKG_SOURCE_URL:=@SF/ahh
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,WOL,wol,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 $(PKG_BUILD_DIR)/.configured:
22         (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
23                 $(TARGET_CONFIGURE_OPTS) \
24                 CFLAGS="$(TARGET_CFLAGS)" \
25                 ./configure \
26                   ac_cv_func_malloc_0_nonnull=yes \
27                   ac_cv_func_realloc_0_nonnull=yes \
28                   ac_cv_func_mmap_fixed_mapped=yes \
29                   jm_cv_func_working_malloc=yes \
30                   ac_cv_func_alloca_works=yes \
31                   --target=$(GNU_TARGET_NAME) \
32                   --host=$(GNU_TARGET_NAME) \
33                   --build=$(GNU_HOST_NAME) \
34                   --program-prefix="" \
35                   --program-suffix="" \
36                   --prefix=/usr \
37                   --exec-prefix=/usr \
38                   --bindir=/usr/bin \
39                   --datadir=/usr/share \
40                   --includedir=/usr/include \
41                   --infodir=/usr/share/info \
42                   --libdir=/usr/lib \
43                   --libexecdir=/usr/lib \
44                   --localstatedir=/var \
45                   --mandir=/usr/share/man \
46                   --sbindir=/usr/sbin \
47                   --sysconfdir=/etc \
48                   $(DISABLE_NLS) \
49                   $(DISABLE_LARGEFILE) \
50         );
51         touch $@
52
53 $(PKG_BUILD_DIR)/.built:
54         rm -rf $(PKG_INSTALL_DIR)
55         mkdir -p $(PKG_INSTALL_DIR)
56         $(MAKE) -C $(PKG_BUILD_DIR) \
57                 CC=$(TARGET_CC) \
58                 DESTDIR="$(PKG_INSTALL_DIR)" \
59                 all install
60         touch $@
61
62 $(IPKG_WOL):
63         install -m0755 -d $(IDIR_WOL)/usr/bin
64         cp $(PKG_INSTALL_DIR)/usr/bin/wol $(IDIR_WOL)/usr/bin/
65         $(RSTRIP) $(IDIR_WOL)
66         $(IPKG_BUILD) $(IDIR_WOL) $(PACKAGE_DIR)