update fprobe to new packaging style
[openwrt.git] / openwrt / package / maradns / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=maradns
6 PKG_VERSION:=1.0.26
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=b3180ad1f250a4e3820613e711ae159b
9
10 PKG_SOURCE_URL:=http://www.maradns.org/download
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
12 PKG_CAT:=bzcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15
16 IPKG_MARADNS:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
17 IDIR_MARADNS:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)
18 INFO_MARADNS:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list
19
20 $(DL_DIR)/$(PKG_SOURCE):
21 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
22
23 $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
24 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
25 $(PATCH) $(PKG_BUILD_DIR) ./patches
26 touch $(PKG_BUILD_DIR)/.prepared
27
28 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
29 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
30 $(TARGET_CONFIGURE_OPTS) \
31 ./configure \
32 --target=$(GNU_TARGET_NAME) \
33 --host=$(GNU_TARGET_NAME) \
34 --build=$(GNU_HOST_NAME) \
35 --program-prefix="" \
36 --program-suffix="" \
37 --prefix=/usr \
38 --exec-prefix=/usr \
39 --bindir=/usr/bin \
40 --datadir=/usr/share \
41 --includedir=/usr/include \
42 --infodir=/usr/share/info \
43 --libdir=/usr/lib \
44 --libexecdir=/usr/lib \
45 --localstatedir=/var \
46 --mandir=/usr/share/man \
47 --sbindir=/usr/sbin \
48 --sysconfdir=/etc \
49 $(DISABLE_NLS) \
50 $(DISABLE_LARGEFILE) \
51 );
52 touch $(PKG_BUILD_DIR)/.configured
53
54 $(PKG_BUILD_DIR)/$(PKG_NAME): $(PKG_BUILD_DIR)/.configured
55 $(MAKE) -C $(PKG_BUILD_DIR) \
56 CFLAGS="$(TARGET_CFLAGS)" \
57 FLAGS="$(TARGET_CFLAGS)" \
58 CC=$(TARGET_CC) \
59 HOSTCC="$(HOSTCC)"
60
61 $(IPKG_MARADNS): $(PKG_BUILD_DIR)/$(PKG_NAME)
62 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_MARADNS) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
63 mkdir -p $(IDIR_MARADNS)/usr/bin
64 mkdir -p $(IDIR_MARADNS)/usr/sbin
65 cp $(PKG_BUILD_DIR)/server/maradns $(IDIR_MARADNS)/usr/sbin/
66 cp $(PKG_BUILD_DIR)/tuzona/getzone $(IDIR_MARADNS)/usr/bin/
67 cp $(PKG_BUILD_DIR)/tuzona/zoneserver $(IDIR_MARADNS)/usr/sbin/
68 cp $(PKG_BUILD_DIR)/tools/askmara $(IDIR_MARADNS)/usr/bin/
69 $(STRIP) $(IDIR_MARADNS)/usr/sbin/*
70 $(STRIP) $(IDIR_MARADNS)/usr/bin/*
71 cp -a ./files/* $(IDIR_MARADNS)/
72 find $(IDIR_MARADNS) -name CVS | xargs rm -rf
73 echo "/etc/maradns/maradnsrc" > $(IDIR_MARADNS)/CONTROL/conffiles
74 chmod 755 $(IDIR_MARADNS)/etc/init.d/*
75 mkdir -p $(PACKAGE_DIR)
76 $(IPKG_BUILD) $(IDIR_MARADNS) $(PACKAGE_DIR)
77
78 $(INFO_MARADNS): $(IPKG_MARADNS)
79 $(IPKG) install $(IPKG_MARADNS)
80
81 source: $(DL_DIR)/$(PKG_SOURCE)
82 prepare: $(PKG_BUILD_DIR)/.prepared
83 compile: $(IPKG_MARADNS)
84 install: $(INFO_MARADNS)
85
86 clean:
87 rm -rf $(PKG_BUILD_DIR) $(IPKG_MARADNS)
This page took 0.051694 seconds and 5 git commands to generate.