add maradns
[openwrt.git] / package / haserl / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME := haserl
6 PKG_VERSION := 0.8.0
7 PKG_RELEASE := 1
8 PKG_MD5SUM := bd9195d086566f56634c0bcbbbcbebea
9
10 PKG_SOURCE_URL := \
11 @SF/haserl \
12 http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
13 PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_CAT := zcat
15
16 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
18
19 IPKG_HASERL:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
20 IDIR_HASERL:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)
21 INFO_HASERL:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list
22
23 $(DL_DIR)/$(PKG_SOURCE):
24 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
25
26 $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
27 rm -rf $(PKG_BUILD_DIR)
28 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
29 touch $(PKG_BUILD_DIR)/.prepared
30
31 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
32 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
33 $(TARGET_CONFIGURE_OPTS) \
34 CFLAGS="$(TARGET_CFLAGS) -DMAX_UPLOAD_KB=8192" \
35 ./configure \
36 --target=$(GNU_TARGET_NAME) \
37 --host=$(GNU_TARGET_NAME) \
38 --build=$(GNU_HOST_NAME) \
39 --program-prefix="" \
40 --program-suffix="" \
41 --prefix=/usr \
42 --exec-prefix=/usr \
43 --bindir=/usr/bin \
44 --datadir=/usr/share \
45 --includedir=/usr/include \
46 --infodir=/usr/share/info \
47 --libdir=/usr/lib \
48 --libexecdir=/usr/lib \
49 --localstatedir=/var \
50 --mandir=/usr/share/man \
51 --sbindir=/usr/sbin \
52 --sysconfdir=/etc \
53 $(DISABLE_LARGEFILE) \
54 $(DISABLE_NLS) \
55 )
56 touch $(PKG_BUILD_DIR)/.configured
57
58 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
59 $(MAKE) -C $(PKG_BUILD_DIR)
60 touch $(PKG_BUILD_DIR)/.built
61
62 $(PKG_INSTALL_DIR)/usr/bin/haserl: $(PKG_BUILD_DIR)/.built
63 mkdir -p $(PKG_INSTALL_DIR)
64 $(MAKE) -C $(PKG_BUILD_DIR) \
65 DESTDIR="$(PKG_INSTALL_DIR)" \
66 install
67
68 $(IPKG_HASERL): $(PKG_INSTALL_DIR)/usr/bin/haserl
69 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_HASERL) ./ipkg/$(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
70 install -m0755 -d $(IDIR_HASERL)/usr/bin
71 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/haserl $(IDIR_HASERL)/usr/bin/
72 $(RSTRIP) $(IDIR_HASERL)
73 $(IPKG_BUILD) $(IDIR_HASERL) $(PACKAGE_DIR)
74
75 $(INFO_HASERL): $(IPKG_HASERL)
76 $(IPKG) install $(IPKG_HASERL)
77
78 source: $(DL_DIR)/$(PKG_SOURCE)
79 prepare: $(PKG_BUILD_DIR)/.prepared
80 compile: $(IPKG_HASERL)
81 install: $(INFO_HASERL)
82
83 clean:
84 rm -rf $(PKG_BUILD_DIR)
85 rm -rf $(IPKG_HASERL)
This page took 0.043047 seconds and 5 git commands to generate.