add changes from whiterussian
[openwrt.git] / openwrt / package / bind / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=bind
6 PKG_VERSION:=9.3.1
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=9ff3204eea27184ea0722f37e43fc95d
9
10 PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/bind9/9.3.1/
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,BIND,bind,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
22 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
23 ./configure \
24 --target=$(GNU_HOST_NAME) \
25 --host=$(GNU_HOST_NAME) \
26 --build=$(GNU_HOST_NAME) \
27 --program-prefix="" \
28 --program-suffix="" \
29 --prefix=/usr \
30 --exec-prefix=/usr \
31 --bindir=/usr/bin \
32 --datadir=/usr/share \
33 --includedir=/usr/include \
34 --libdir=/usr/lib \
35 --libexecdir=/usr/lib \
36 --localstatedir=/var \
37 --mandir=/usr/share/man \
38 --sbindir=/usr/sbin \
39 --sysconfdir=/etc \
40 --without-openssl \
41 --without-ipv6 \
42 $(DISABLE_LARGEFILE) \
43 $(DISABLE_NLS) \
44 );
45
46 $(MAKE) -C $(PKG_BUILD_DIR)/lib/isc
47 $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns
48 $(MAKE) -C $(PKG_BUILD_DIR)/lib/isc clean
49 cp $(PKG_BUILD_DIR)/lib/dns/gen $(PKG_BUILD_DIR)
50 $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns clean
51 cp $(PKG_BUILD_DIR)/gen $(PKG_BUILD_DIR)/lib/dns/gen
52 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
53 $(TARGET_CONFIGURE_OPTS) \
54 CFLAGS="$(strip $(TARGET_CFLAGS))" \
55 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
56 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
57 ./configure \
58 --target=$(GNU_TARGET_NAME) \
59 --host=$(GNU_TARGET_NAME) \
60 --build=$(GNU_HOST_NAME) \
61 --program-prefix="" \
62 --program-suffix="" \
63 --prefix=/usr \
64 --exec-prefix=/usr \
65 --bindir=/usr/bin \
66 --datadir=/usr/share \
67 --includedir=/usr/include \
68 --infodir=/usr/share/info \
69 --libdir=/usr/lib \
70 --libexecdir=/usr/lib \
71 --localstatedir=/var \
72 --mandir=/usr/share/man \
73 --sbindir=/usr/sbin \
74 --sysconfdir=/etc \
75 $(DISABLE_LARGEFILE) \
76 $(DISABLE_NLS) \
77 --enable-shared \
78 --enable-static \
79 --enable-ipv6 \
80 --with-randomdev=/dev/random \
81 --disable-threads \
82 --with-openssl=$(STAGING_DIR)/usr/ \
83 );
84 touch $(PKG_BUILD_DIR)/.configured
85
86 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
87 $(MAKE) -C $(PKG_BUILD_DIR)
88 mkdir -p $(PKG_INSTALL_DIR)
89 $(MAKE) -C $(PKG_BUILD_DIR) \
90 DESTDIR="$(PKG_INSTALL_DIR)" \
91 install
92 touch $(PKG_BUILD_DIR)/.built
93
94 $(IPKG_BIND):
95 install -d -m0755 $(IDIR_BIND)/usr/sbin
96 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/named $(IDIR_BIND)/usr/sbin/
97 $(RSTRIP) $(IDIR_BIND)
98 $(IPKG_BUILD) $(IDIR_BIND) $(PACKAGE_DIR)
This page took 0.045558 seconds and 5 git commands to generate.