Convert monit to new packaging style
[openwrt.git] / openwrt / package / gmp / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=gmp
6 PKG_VERSION:=4.1.4
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=0aa7d3b3f5b5ec5951e7dddd6f65e891
9
10 PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/gmp/
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 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16 include $(TOPDIR)/package/rules.mk
17
18 $(eval $(call PKG_template,LIBGMP,libgmp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
19
20 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
21 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
22 $(TARGET_CONFIGURE_OPTS) \
23 CFLAGS="$(TARGET_CFLAGS)" \
24 ./configure \
25 --target=$(GNU_TARGET_NAME) \
26 --host=$(GNU_TARGET_NAME) \
27 --build=$(GNU_HOST_NAME) \
28 --program-prefix="" \
29 --program-suffix="" \
30 --prefix=/usr \
31 --exec-prefix=/usr \
32 --bindir=/usr/bin \
33 --datadir=/usr/share \
34 --includedir=/usr/include \
35 --infodir=/usr/share/info \
36 --libdir=/usr/lib \
37 --libexecdir=/usr/lib \
38 --localstatedir=/var \
39 --mandir=/usr/share/man \
40 --sbindir=/usr/sbin \
41 --sysconfdir=/etc \
42 $(DISABLE_NLS) \
43 $(DISABLE_LARGEFILE) \
44 --enable-shared \
45 --enable-static \
46 );
47 touch $(PKG_BUILD_DIR)/.configured
48
49 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
50 $(MAKE) -C $(PKG_BUILD_DIR)
51 mkdir -p $(PKG_INSTALL_DIR)
52 $(MAKE) -C $(PKG_BUILD_DIR) \
53 DESTDIR="$(PKG_INSTALL_DIR)" \
54 install
55 touch $(PKG_BUILD_DIR)/.built
56
57 $(IPKG_LIBGMP):
58 install -m0755 -d $(IDIR_LIBGMP)/usr/lib
59 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(IDIR_LIBGMP)/usr/lib/
60 $(RSTRIP) $(IDIR_LIBGMP)
61 $(IPKG_BUILD) $(IDIR_LIBGMP) $(PACKAGE_DIR)
62
63 $(STAGING_DIR)/usr/lib/libgmp.so: $(PKG_BUILD_DIR)/.built
64 mkdir -p $(STAGING_DIR)/usr/include
65 cp -fpR $(PKG_INSTALL_DIR)/usr/include/gmp* $(STAGING_DIR)/usr/include/
66 mkdir -p $(I_LIBPCAP_DEV)/usr/lib
67 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(STAGING_DIR)/usr/lib/
68 touch $(STAGING_DIR)/usr/lib/libgmp.so
69
70 install-dev: $(STAGING_DIR)/usr/lib/libgmp.so
71
72 uninstall-dev:
73 rm -rf $(STAGING_DIR)/usr/include/gmp*
74 rm -rf $(STAGING_DIR)/usr/lib/libgmp.{a,so*}
75
76 compile: install-dev
77 clean: uninstall-dev
This page took 0.044033 seconds and 5 git commands to generate.