add rml's netdev-random patch and modify et to use it (finally some entropy on /dev...
[openwrt.git] / package / pcre / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=pcre
6 PKG_VERSION:=5.0
7 PKG_RELEASE:=3
8 PKG_MD5SUM:=53976b62032fd5c76678274e5fd196b4
9
10 PKG_SOURCE_URL:= \
11 ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ \
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 include $(TOPDIR)/package/templates.mk
20
21 $(eval $(call PKG_template,LIBPCRE,libpcre,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
22
23 include $(TOPDIR)/package/rules.mk
24
25 COMPILE_TARGETS += install-dev
26 CLEAN_TARGETS += uninstall-dev
27
28 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
29 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
30 $(TARGET_CONFIGURE_OPTS) \
31 CFLAGS="$(TARGET_CFLAGS)" \
32 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
33 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
34 ./configure \
35 --target=$(GNU_TARGET_NAME) \
36 --host=$(GNU_TARGET_NAME) \
37 --build=$(GNU_HOST_NAME) \
38 --program-prefix="" \
39 --program-suffix="" \
40 --prefix=/usr \
41 --exec-prefix=/usr \
42 --bindir=/usr/bin \
43 --datadir=/usr/share \
44 --includedir=/usr/include \
45 --infodir=/usr/share/info \
46 --libdir=/usr/lib \
47 --libexecdir=/usr/lib \
48 --localstatedir=/var \
49 --mandir=/usr/share/man \
50 --sbindir=/usr/sbin \
51 --sysconfdir=/etc \
52 $(DISABLE_NLS) \
53 $(DISABLE_LARGEFILE) \
54 --enable-shared \
55 --enable-static \
56 --enable-utf8 \
57 );
58 touch $(PKG_BUILD_DIR)/.configured
59
60 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
61 $(MAKE) -C "$(PKG_BUILD_DIR)" \
62 CC_FOR_BUILD="$(HOSTCC)" \
63 LINK_FOR_BUILD="$(HOSTCC)" \
64 CFLAGS_FOR_BUILD="" \
65 dftables
66 $(MAKE) \
67 $(TARGET_CONFIGURE_OPTS) \
68 CFLAGS="$(TARGET_CFLAGS)"
69 touch $(PKG_BUILD_DIR)/.built
70
71 $(STAGING_DIR)/usr/lib/libpcre.so: $(PKG_BUILD_DIR)/.built
72 $(MAKE) -C "$(PKG_BUILD_DIR)" \
73 DESTDIR="$(STAGING_DIR)" \
74 install
75 rm -f $(STAGING_DIR)/usr/lib/libpcre*.la
76
77 $(IPKG_LIBPCRE): $(IDIR_LIBPCRE)/CONTROL/control $(STAGING_DIR)/usr/lib/libpcre.so
78 mkdir -p $(IDIR_LIBPCRE)/usr/lib
79 cp -fpR $(STAGING_DIR)/usr/lib/libpcre*.so.* $(IDIR_LIBPCRE)/usr/lib/
80 $(RSTRIP) $(IDIR_LIBPCRE)
81 mkdir -p $(PACKAGE_DIR)
82 $(IPKG_BUILD) $(IDIR_LIBPCRE) $(PACKAGE_DIR)
83
84 install-dev: $(STAGING_DIR)/usr/lib/libpcre.so
85
86 uninstall-dev:
87 rm -rf \
88 $(STAGING_DIR)/usr/bin/pcre-config \
89 $(STAGING_DIR)/usr/include/pcre* \
90 $(STAGING_DIR)/usr/lib/libpcre* \
91 $(STAGING_DIR)/usr/lib/pkgconfig/libpcre.pc \
92 $(STAGING_DIR)/usr/share/man/man*/pcre* \
This page took 0.049809 seconds and 5 git commands to generate.