Add pcre package
[openwrt/svn-archive/archive.git] / openwrt / package / pcre / pcre-5.0-3.diff
1 diff -ruN pcre-5.0-orig/ipkg/libpcre/CONTROL/control pcre-5.0-3/ipkg/libpcre/CONTROL/control
2 --- pcre-5.0-orig/ipkg/libpcre/CONTROL/control 1970-01-01 01:00:00.000000000 +0100
3 +++ pcre-5.0-3/ipkg/libpcre/CONTROL/control 2005-03-08 03:33:59.000000000 +0100
4 @@ -0,0 +1,8 @@
5 +Package: libpcre
6 +Priority: optional
7 +Section: libs
8 +Version: [TBDL]
9 +Architecture: [TBDL]
10 +Maintainer: Nico <nthill@free.fr>
11 +Source: http://nthill.free.fr/openwrt/sources/pcre/
12 +Description: a Perl Compatible Regular Expression library
13 diff -ruN pcre-5.0-orig/ipkg/pcre-dev/CONTROL/control pcre-5.0-3/ipkg/pcre-dev/CONTROL/control
14 --- pcre-5.0-orig/ipkg/pcre-dev/CONTROL/control 1970-01-01 01:00:00.000000000 +0100
15 +++ pcre-5.0-3/ipkg/pcre-dev/CONTROL/control 2005-03-08 03:34:14.000000000 +0100
16 @@ -0,0 +1,8 @@
17 +Package: pcre-dev
18 +Priority: optional
19 +Section: devel
20 +Version: [TBDL]
21 +Architecture: [TBDL]
22 +Maintainer: Nico <nthill@free.fr>
23 +Source: http://nthill.free.fr/openwrt/sources/pcre/
24 +Description: a Perl Compatible Regular Expression library (development)
25 diff -ruN pcre-5.0-orig/ipkg/rules pcre-5.0-3/ipkg/rules
26 --- pcre-5.0-orig/ipkg/rules 1970-01-01 01:00:00.000000000 +0100
27 +++ pcre-5.0-3/ipkg/rules 2005-03-08 03:47:50.000000000 +0100
28 @@ -0,0 +1,134 @@
29 +#!/usr/bin/make -f
30 +
31 +ifneq ($(strip ${IPKG_RULES_INC}),)
32 + include $(IPKG_RULES_INC)
33 +endif
34 +
35 +##
36 +
37 +PKG_VERSION := $(shell cat ./ipkg/version)
38 +CURRENT_DIR := $(shell pwd)
39 +INSTALL_DIR = $(CURRENT_DIR)/ipkg-install
40 +
41 +I_LIBPCRE := ipkg/libpcre
42 +I_PCRE_DEV := ipkg/pcre-dev
43 +
44 +BUILD_DEPS := \
45 +
46 +CONFIGURE_OPTS = \
47 + --enable-shared \
48 + --enable-static \
49 + --enable-utf8 \
50 +
51 +##
52 +
53 +all: package
54 +
55 +
56 +.stamp-configured: $(BUILD_DEPS)
57 +
58 + rm -rf config.cache
59 + $(TARGET_CONFIGURE_OPTS) \
60 + CFLAGS="$(TARGET_CFLAGS)" \
61 + ./configure \
62 + --target=$(GNU_TARGET_NAME) \
63 + --host=$(GNU_TARGET_NAME) \
64 + --build=$(GNU_HOST_NAME) \
65 + --prefix=/usr \
66 + --exec-prefix=/usr \
67 + --bindir=/usr/bin \
68 + --datadir=/usr/share \
69 + --includedir=/usr/include \
70 + --infodir=/usr/share/info \
71 + --libdir=/usr/lib \
72 + --libexecdir=/usr/lib \
73 + --localstatedir=/var \
74 + --mandir=/usr/share/man \
75 + --sbindir=/usr/sbin \
76 + --sysconfdir=/etc \
77 + $(DISABLE_NLS) \
78 +
79 + touch .stamp-configured
80 +
81 +
82 +.stamp-built: .stamp-configured
83 +
84 + $(MAKE) \
85 + CC_FOR_BUILD="$(HOSTCC)" \
86 + LINK_FOR_BUILD="$(HOSTCC)" \
87 + CFLAGS_FOR_BUILD="" \
88 + dftables
89 +
90 + $(MAKE) \
91 + $(TARGET_CONFIGURE_OPTS) \
92 + CFLAGS="$(TARGET_CFLAGS)" \
93 +
94 + touch .stamp-built
95 +
96 +
97 +$(INSTALL_DIR)/usr/include/pcre.h: .stamp-built
98 +
99 + mkdir -p $(INSTALL_DIR)
100 +
101 + $(MAKE) \
102 + DESTDIR="$(INSTALL_DIR)" \
103 + install
104 +
105 +
106 +configure: .stamp-configured
107 +
108 +
109 +build: .stamp-built
110 +
111 +
112 +install: $(INSTALL_DIR)/usr/include/pcre.h
113 +
114 +
115 +package: $(INSTALL_DIR)/usr/include/pcre.h
116 +
117 + mkdir -p $(I_LIBPCRE)/usr/lib
118 + cp -fpR $(INSTALL_DIR)/usr/lib/libpcre*.so.* $(I_LIBPCRE)/usr/lib/
119 + $(STRIP) $(I_LIBPCRE)/usr/lib/lib*.so.*
120 +
121 + mkdir -p $(I_PCRE_DEV)/usr/bin
122 + cp -fpR $(INSTALL_DIR)/usr/bin/pcre-config $(I_PCRE_DEV)/usr/bin/
123 + mkdir -p $(I_PCRE_DEV)/usr/include
124 + cp -fpR $(INSTALL_DIR)/usr/include/pcre*.h $(I_PCRE_DEV)/usr/include/
125 + mkdir -p $(I_PCRE_DEV)/usr/lib
126 + cp -fpR $(INSTALL_DIR)/usr/lib/libpcre*.a $(I_PCRE_DEV)/usr/lib/
127 + cp -fpR $(INSTALL_DIR)/usr/lib/libpcre*.so* $(I_PCRE_DEV)/usr/lib/
128 +
129 + chmod 0755 ipkg/*/CONTROL/
130 + chmod 0644 ipkg/*/CONTROL/control
131 +
132 + perl -pi -e "s/^Arch.*:.*/Architecture: $(TARGET_ARCH)/g" ipkg/*/CONTROL/control
133 +ifneq ($(strip $(PKG_VERSION)),)
134 + perl -pi -e "s/^Vers.*:.*/Version: $(PKG_VERSION)/g" ipkg/*/CONTROL/control
135 +endif
136 +
137 + $(IPKG_BUILD) $(I_LIBPCRE) $(IPKG_TARGET_DIR)
138 + $(IPKG_BUILD) $(I_PCRE_DEV) $(IPKG_TARGET_DIR)
139 +
140 +
141 +clean:
142 +
143 + -$(MAKE) clean
144 + rm -rf .stamp-*
145 + rm -rf $(INSTALL_DIR)/usr/bin/pcre*
146 + rm -rf $(INSTALL_DIR)/usr/include/pcre*
147 + rm -rf $(INSTALL_DIR)/usr/lib/libpcre*
148 + rm -rf $(INSTALL_DIR)/usr/lib/pkgconfig/libpcre.pc
149 + rm -rf $(INSTALL_DIR)/usr/share/man/man*/pcre*
150 + rm -rf $(I_LIBPCRE)/usr
151 + rm -rf $(I_PCRE_DEV)/usr
152 +
153 +
154 +control:
155 +
156 + @cat $(I_LIBPCRE)/CONTROL/control
157 + @echo
158 + @cat $(I_PCRE_DEV)/CONTROL/control
159 + @echo
160 +
161 +
162 +.PHONY: configure build install package clean control
163 diff -ruN pcre-5.0-orig/ipkg/version pcre-5.0-3/ipkg/version
164 --- pcre-5.0-orig/ipkg/version 1970-01-01 01:00:00.000000000 +0100
165 +++ pcre-5.0-3/ipkg/version 2005-03-08 03:32:54.000000000 +0100
166 @@ -0,0 +1 @@
167 +5.0-3