Add popt package
[openwrt.git] / package / popt / popt-1.7-2.diff
1 diff -ruN popt-1.7-orig/ipkg/libpopt/CONTROL/control popt-1.7-2/ipkg/libpopt/CONTROL/control
2 --- popt-1.7-orig/ipkg/libpopt/CONTROL/control  1970-01-01 01:00:00.000000000 +0100
3 +++ popt-1.7-2/ipkg/libpopt/CONTROL/control     2005-02-27 16:29:21.000000000 +0100
4 @@ -0,0 +1,8 @@
5 +Package: libpopt
6 +Priority: optional
7 +Section: libs
8 +Version: 1.7-2
9 +Architecture: mipsel
10 +Maintainer: Nico <nthill@free.fr>
11 +Source: http://nthill.free.fr/openwrt/sources/popt/
12 +Description: a command line option parsing library
13 diff -ruN popt-1.7-orig/ipkg/libpopt-dev/CONTROL/control popt-1.7-2/ipkg/libpopt-dev/CONTROL/control
14 --- popt-1.7-orig/ipkg/libpopt-dev/CONTROL/control      1970-01-01 01:00:00.000000000 +0100
15 +++ popt-1.7-2/ipkg/libpopt-dev/CONTROL/control 2005-02-27 16:29:29.000000000 +0100
16 @@ -0,0 +1,8 @@
17 +Package: libpopt-dev
18 +Priority: optional
19 +Section: devel
20 +Version: 1.7-2
21 +Architecture: mipsel
22 +Maintainer: Nico <nthill@free.fr>
23 +Source: http://nthill.free.fr/openwrt/sources/popt/
24 +Description: a command line option parsing library (development)
25 diff -ruN popt-1.7-orig/ipkg/rules popt-1.7-2/ipkg/rules
26 --- popt-1.7-orig/ipkg/rules    1970-01-01 01:00:00.000000000 +0100
27 +++ popt-1.7-2/ipkg/rules       2005-02-27 16:31:03.000000000 +0100
28 @@ -0,0 +1,118 @@
29 +#!/usr/bin/make -f
30 +
31 +ifneq ($(strip ${IPKG_RULES_INC}),)
32 +  include $(IPKG_RULES_INC)
33 +endif
34 +
35 +##
36 +
37 +CURRENT_DIR := $(shell pwd)
38 +
39 +INSTALL_DIR = $(CURRENT_DIR)/ipkg-install
40 +
41 +I_LIBPOPT := ipkg/libpopt
42 +I_LIBPOPT_DEV := ipkg/libpopt-dev
43 +
44 +BUILD_DEPS := \
45 +
46 +##
47 +
48 +all: package
49 +
50 +.stamp-configured: $(BUILD_DEPS)
51 +
52 +       rm -rf config.cache
53 +       $(TARGET_CONFIGURE_OPTS) \
54 +       CFLAGS="$(TARGET_CFLAGS)" \
55 +       am_cv_func_iconv=no \
56 +       ./configure \
57 +         --target=$(GNU_TARGET_NAME) \
58 +         --host=$(GNU_TARGET_NAME) \
59 +         --build=$(GNU_HOST_NAME) \
60 +         --prefix=/usr \
61 +         --exec-prefix=/usr \
62 +         --bindir=/usr/bin \
63 +         --datadir=/usr/share \
64 +         --includedir=/usr/include \
65 +         --infodir=/usr/share/info \
66 +         --libdir=/usr/lib \
67 +         --libexecdir=/usr/lib \
68 +         --localstatedir=/var \
69 +         --mandir=/usr/share/man \
70 +         --sbindir=/usr/sbin \
71 +         --sysconfdir=/etc \
72 +         $(DISABLE_NLS) \
73 +         --enable-shared \
74 +         --enable-static \
75 +
76 +       touch .stamp-configured
77 +
78 +
79 +.stamp-built: .stamp-configured
80 +
81 +       $(MAKE) \
82 +         $(TARGET_CONFIGURE_OPTS) \
83 +         CFLAGS="$(TARGET_CFLAGS)" \
84 +         
85 +       touch .stamp-built
86 +
87 +
88 +$(INSTALL_DIR)/usr/include/popt.h: .stamp-built
89 +
90 +       mkdir -p $(INSTALL_DIR)
91 +
92 +       $(MAKE) \
93 +         DESTDIR="$(INSTALL_DIR)" \
94 +         program_transform_name="s,x,x," \
95 +        install
96 +
97 +
98 +configure: .stamp-configured
99 +
100 +
101 +build: .stamp-built
102 +
103 +
104 +install: $(INSTALL_DIR)/usr/include/popt.h
105 +
106 +
107 +package: $(INSTALL_DIR)/usr/include/popt.h
108 +
109 +       mkdir -p $(I_LIBPOPT)/usr/lib
110 +       cp -fpR $(INSTALL_DIR)/usr/lib/libpopt*.so.* $(I_LIBPOPT)/usr/lib/
111 +       $(STRIP) $(I_LIBPOPT)/usr/lib/lib*.so.*
112 +
113 +       mkdir -p $(I_LIBPOPT_DEV)/usr/include
114 +       cp -fpR $(INSTALL_DIR)/usr/include/popt.h $(I_LIBPOPT_DEV)/usr/include/
115 +       mkdir -p $(I_LIBPOPT_DEV)/usr/lib
116 +       cp -fpR $(INSTALL_DIR)/usr/lib/libpopt*.a $(I_LIBPOPT_DEV)/usr/lib/
117 +       cp -fpR $(INSTALL_DIR)/usr/lib/libpopt*.so* $(I_LIBPOPT_DEV)/usr/lib/
118 +
119 +       chmod 0755 $(I_LIBPOPT)/CONTROL/
120 +       chmod 0644 $(I_LIBPOPT)/CONTROL/control
121 +
122 +       chmod 0755 $(I_LIBPOPT_DEV)/CONTROL/
123 +       chmod 0644 $(I_LIBPOPT_DEV)/CONTROL/control
124 +
125 +       $(IPKG_BUILD) $(I_LIBPOPT) $(IPKG_TARGET_DIR)
126 +       $(IPKG_BUILD) $(I_LIBPOPT_DEV) $(IPKG_TARGET_DIR)
127 +
128 +
129 +clean:
130 +
131 +       -$(MAKE) clean
132 +       rm -rf .stamp-*
133 +       rm -rf $(INSTALL_DIR)
134 +       rm -rf $(I_LIBPOPT)/usr
135 +       rm -rf $(I_LIBPOPT_DEV)/usr
136 +
137 +
138 +control:
139 +
140 +       @cat $(I_LIBPOPT)/CONTROL/control
141 +       @echo
142 +       @cat $(I_LIBPOPT_DEV)/CONTROL/control
143 +       @echo
144 +       
145 +
146 +.PHONY: configure build install package clean control