3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:= 53976b62032fd5c76678274e5fd196b4
10 PKG_SOURCE_URL
:= ftp
://ftp.csx.cam.ac.uk
/pub
/software
/programming
/pcre
/ \
11 http
://nthill.free.fr
/openwrt
/sources
/$(PKG_NAME
)/
12 PKG_SOURCE
:= $(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
13 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_IPK
:= $(PACKAGE_DIR
)/lib
$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
16 PKG_IPK_DIR
:= $(PKG_BUILD_DIR
)/ipkg
18 $(DL_DIR
)/$(PKG_SOURCE
):
20 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
22 $(PKG_BUILD_DIR
)/.patched
: $(DL_DIR
)/$(PKG_SOURCE
)
23 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
24 # $(PATCH) $(PKG_BUILD_DIR) ./patches
25 touch
$(PKG_BUILD_DIR
)/.patched
27 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.patched
28 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache
; \
29 $(TARGET_CONFIGURE_OPTS
) \
30 CFLAGS
="$(TARGET_CFLAGS)" \
31 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
32 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
34 --target
=$(GNU_TARGET_NAME
) \
35 --host
=$(GNU_TARGET_NAME
) \
36 --build
=$(GNU_HOST_NAME
) \
42 --datadir=/usr
/share \
43 --includedir=/usr
/include \
44 --infodir=/usr
/share
/info \
46 --libexecdir
=/usr
/lib \
47 --localstatedir
=/var \
48 --mandir=/usr
/share
/man \
52 $(DISABLE_LARGEFILE
) \
57 touch
$(PKG_BUILD_DIR
)/.configured
59 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
60 $(MAKE
) -C
"$(PKG_BUILD_DIR)" \
61 CC_FOR_BUILD
="$(HOSTCC)" \
62 LINK_FOR_BUILD
="$(HOSTCC)" \
66 $(TARGET_CONFIGURE_OPTS
) \
67 CFLAGS
="$(TARGET_CFLAGS)" \
69 touch
$(PKG_BUILD_DIR
)/.built
71 $(STAGING_DIR
)/usr
/lib
/libpcre.so
: $(PKG_BUILD_DIR
)/.built
72 $(MAKE
) -C
"$(PKG_BUILD_DIR)" \
73 DESTDIR
="$(STAGING_DIR)" \
75 rm -f
$(STAGING_DIR
)/usr
/lib
/libpcre
*.la
77 $(PKG_IPK
): $(STAGING_DIR
)/usr
/lib
/libpcre.so
78 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_IPK_DIR
) libpcre.control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
79 mkdir
-p
$(PKG_IPK_DIR
)/usr
/lib
80 cp
-fp
$(STAGING_DIR
)/usr
/lib
/libpcre
*.so.
* $(PKG_IPK_DIR
)/usr
/lib
/
81 $(STRIP
) $(PKG_IPK_DIR
)/usr
/lib
/*.so
*
82 mkdir
-p
$(PACKAGE_DIR
)
83 $(IPKG_BUILD
) $(PKG_IPK_DIR
) $(PACKAGE_DIR
)
85 $(IPKG_STATE_DIR
)/info/libpcre.list
: $(PKG_IPK
)
86 $(IPKG
) install $(PKG_IPK
)
88 source
: $(DL_DIR
)/$(PKG_SOURCE
)
89 prepare
: $(PKG_BUILD_DIR
)/.patched
91 install: $(IPKG_STATE_DIR
)/info/libpcre.list
95 $(STAGING_DIR
)/usr
/bin
/pcre-config \
96 $(STAGING_DIR
)/usr
/include/pcre
* \
97 $(STAGING_DIR
)/usr
/lib
/libpcre
* \
98 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/libpcre.
pc \
99 $(STAGING_DIR
)/usr
/share
/man
/man
*/pcre
* \