3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=53976b62032fd5c76678274e5fd196b4
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
16 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
18 IPKG_LIBPCRE
:=$(PACKAGE_DIR
)/lib
$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
19 IDIR_LIBPCRE
:=$(PKG_BUILD_DIR
)/ipkg
/lib
$(PKG_NAME
)
20 INFO_LIBPCRE
:=$(IPKG_STATE_DIR
)/info/lib
$(PKG_NAME
).list
22 $(DL_DIR
)/$(PKG_SOURCE
):
23 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
25 $(PKG_BUILD_DIR
)/.prepared
: $(DL_DIR
)/$(PKG_SOURCE
)
26 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
27 # $(PATCH) $(PKG_BUILD_DIR) ./patches
28 touch
$(PKG_BUILD_DIR
)/.prepared
30 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
31 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache config.status
; \
32 $(TARGET_CONFIGURE_OPTS
) \
33 CFLAGS
="$(TARGET_CFLAGS)" \
34 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
35 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
37 --target
=$(GNU_TARGET_NAME
) \
38 --host
=$(GNU_TARGET_NAME
) \
39 --build
=$(GNU_HOST_NAME
) \
45 --datadir=/usr
/share \
46 --includedir=/usr
/include \
47 --infodir=/usr
/share
/info \
49 --libexecdir
=/usr
/lib \
50 --localstatedir
=/var \
51 --mandir=/usr
/share
/man \
55 $(DISABLE_LARGEFILE
) \
60 touch
$(PKG_BUILD_DIR
)/.configured
62 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
63 $(MAKE
) -C
"$(PKG_BUILD_DIR)" \
64 CC_FOR_BUILD
="$(HOSTCC)" \
65 LINK_FOR_BUILD
="$(HOSTCC)" \
69 $(TARGET_CONFIGURE_OPTS
) \
70 CFLAGS
="$(TARGET_CFLAGS)" \
72 touch
$(PKG_BUILD_DIR
)/.built
74 $(STAGING_DIR
)/usr
/lib
/libpcre.so
: $(PKG_BUILD_DIR
)/.built
75 $(MAKE
) -C
"$(PKG_BUILD_DIR)" \
76 DESTDIR
="$(STAGING_DIR)" \
78 rm -f
$(STAGING_DIR
)/usr
/lib
/libpcre
*.la
80 $(IPKG_LIBPCRE
): $(STAGING_DIR
)/usr
/lib
/libpcre.so
81 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_LIBPCRE
) lib
$(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
82 mkdir
-p
$(IDIR_LIBPCRE
)/usr
/lib
83 cp
-fp
$(STAGING_DIR
)/usr
/lib
/libpcre
*.so.
* $(IDIR_LIBPCRE
)/usr
/lib
/
84 $(STRIP
) $(IDIR_LIBPCRE
)/usr
/lib
/lib
*.so
*
85 mkdir
-p
$(PACKAGE_DIR
)
86 $(IPKG_BUILD
) $(IDIR_LIBPCRE
) $(PACKAGE_DIR
)
88 $(INFO_LIBPCRE
): $(IPKG_LIBPCRE
)
89 $(IPKG
) install $(IPKG_LIBPCRE
)
91 source
: $(DL_DIR
)/$(PKG_SOURCE
)
92 prepare
: $(PKG_BUILD_DIR
)/.prepared
93 compile
: $(IPKG_LIBPCRE
)
94 install: $(INFO_LIBPCRE
)
98 $(STAGING_DIR
)/usr
/bin
/pcre-config \
99 $(STAGING_DIR
)/usr
/include/pcre
* \
100 $(STAGING_DIR
)/usr
/lib
/libpcre
* \
101 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/libpcre.
pc \
102 $(STAGING_DIR
)/usr
/share
/man
/man
*/pcre
* \
103 $(PKG_BUILD_DIR
) $(IPKG_LIBPCRE
)