link against libnotimpl for ceilf (fix #5)
[openwrt.git] / package / rrdtool1 / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=rrdtool1
6 PKG_VERSION:=1.0.50
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=c466e2e7df95fa8e318e46437da87686
9
10 PKG_SOURCE_URL:=http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.0.x
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/rrdtool-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,LIBRRD1,librrd1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20 $(eval $(call PKG_template,RRDCGI1,rrdcgi1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
21 $(eval $(call PKG_template,RRDTOOL1,rrdtool1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
22
23 $(PKG_BUILD_DIR)/.configured:
24 (cd $(PKG_BUILD_DIR); rm -rf config.{status,cache} ; \
25 $(TARGET_CONFIGURE_OPTS) \
26 CFLAGS="$(TARGET_CFLAGS)" \
27 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
28 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
29 ac_cv_path_PERL=no \
30 rd_cv_ieee_works=yes \
31 shrext_cmds=".so" \
32 ./configure \
33 --target=$(GNU_TARGET_NAME) \
34 --host=$(GNU_TARGET_NAME) \
35 --build=$(GNU_HOST_NAME) \
36 --program-prefix="" \
37 --program-suffix="" \
38 --prefix=/usr \
39 --exec-prefix=/usr \
40 --bindir=/usr/bin \
41 --datadir=/usr/share \
42 --includedir=/usr/include \
43 --infodir=/usr/share/info \
44 --libdir=/usr/lib \
45 --libexecdir=/usr/lib \
46 --localstatedir=/var \
47 --mandir=/usr/share/man \
48 --sbindir=/usr/sbin \
49 --sysconfdir=/etc \
50 $(DISABLE_LARGEFILE) \
51 $(DISABLE_NLS) \
52 --enable-shared=yes \
53 --enable-static=yes \
54 --disable-rpath \
55 --with-gnu-ld \
56 --enable-local-zlib \
57 );
58 touch $@
59
60 $(PKG_BUILD_DIR)/.built:
61 rm -rf $(PKG_INSTALL_DIR)
62 mkdir -p $(PKG_INSTALL_DIR)
63 $(MAKE) -C $(PKG_BUILD_DIR) \
64 DESTDIR="$(PKG_INSTALL_DIR)" \
65 shrext_cmds=".so" \
66 all install
67 touch $@
68
69 $(IPKG_RRDTOOL1):
70 install -d -m0755 $(IDIR_RRDTOOL1)/usr/bin
71 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/rrdtool $(IDIR_RRDTOOL1)/usr/bin/
72 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/rrdupdate $(IDIR_RRDTOOL1)/usr/bin/
73 $(RSTRIP) $(IDIR_RRDTOOL1)
74 $(IPKG_BUILD) $(IDIR_RRDTOOL1) $(PACKAGE_DIR)
75
76 $(IPKG_RRDCGI1):
77 install -d -m0755 $(IDIR_RRDCGI1)/usr/bin
78 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(IDIR_RRDCGI1)/usr/bin/
79 $(RSTRIP) $(IDIR_RRDCGI1)
80 $(IPKG_BUILD) $(IDIR_RRDCGI1) $(PACKAGE_DIR)
81
82 $(IPKG_LIBRRD1):
83 install -d -m0755 $(IDIR_LIBRRD1)/usr/lib
84 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(IDIR_LIBRRD1)/usr/lib/
85 $(RSTRIP) $(IDIR_LIBRRD1)
86 $(IPKG_BUILD) $(IDIR_LIBRRD1) $(PACKAGE_DIR)
87
88 $(STAGING_DIR)/usr/lib/librrd.so: $(PKG_BUILD_DIR)/.built
89 mkdir -p $(STAGING_DIR)/usr/include
90 cp -fpR $(PKG_INSTALL_DIR)/usr/include/rrd.h $(STAGING_DIR)/usr/include/
91 mkdir -p $(STAGING_DIR)/usr/lib
92 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/librrd.a $(STAGING_DIR)/usr/lib/
93 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/librrd.so* $(STAGING_DIR)/usr/lib/
94 touch $@
95
96 install-dev: $(STAGING_DIR)/usr/lib/librrd.so
97
98 uninstall-dev:
99 rm -rf \
100 $(STAGING_DIR)/usr/include/rrd.h \
101 $(STAGING_DIR)/usr/lib/librrd.a \
102 $(STAGING_DIR)/usr/lib/librrd.so* \
103
104 compile-targets: install-dev
105 clean-targets: uninstall-dev
This page took 0.059982 seconds and 5 git commands to generate.