summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2007-09-20 20:38:28 +0000
committerRobert Schwebel <r.schwebel@pengutronix.de>2007-09-20 20:38:28 +0000
commitfd996b350ed7d71511d47f7e82b9a5d4d8b6e36d (patch)
treeeb4c43877b1a033606764c8b2f916ed4fa49e41e
parent5974eb03c78cd9b59c76c5bf1b81882f9825b28b (diff)
downloadptxdist-fd996b350ed7d71511d47f7e82b9a5d4d8b6e36d.tar.gz
ptxdist-fd996b350ed7d71511d47f7e82b9a5d4d8b6e36d.tar.xz
libcgi: added; patch by Guillaume Gourat.
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@7284 33e552b5-05e3-0310-8538-816dae2090ed
-rw-r--r--ChangeLog4
-rw-r--r--patches/libcgi-1.0/generic/libcgi-1.0-debianpatches.diff273
-rw-r--r--patches/libcgi-1.0/generic/libcgi-1.0-makefile-autogen.diff99
-rw-r--r--patches/libcgi-1.0/generic/libcgi-1.0-makefile-destdir.diff87
-rw-r--r--patches/libcgi-1.0/generic/libcgi-1.0-typo.diff11
-rw-r--r--patches/libcgi-1.0/generic/libcgi-1.0-wrong-variable.diff11
-rw-r--r--patches/libcgi-1.0/generic/series16
-rw-r--r--rules/libcgi.in10
-rw-r--r--rules/libcgi.make133
-rw-r--r--rules/networking.in1
10 files changed, 645 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4e29821b1..90849ba65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-09-20 Robert Schwebel <r.schwebel@pengutronix.de>
+
+ * libcgi: added; patch by Guillaume Gourat.
+
2007-07-26 Robert Schwebel <r.schwebel@pengutronix.de>
* liboil: added; patch by Guillaume Gourat.
diff --git a/patches/libcgi-1.0/generic/libcgi-1.0-debianpatches.diff b/patches/libcgi-1.0/generic/libcgi-1.0-debianpatches.diff
new file mode 100644
index 000000000..e7e92f470
--- /dev/null
+++ b/patches/libcgi-1.0/generic/libcgi-1.0-debianpatches.diff
@@ -0,0 +1,273 @@
+--- libcgi-1.0.orig/debian/changelog
++++ libcgi-1.0/debian/changelog
+@@ -0,0 +1,45 @@
++libcgi (1.0-5) unstable; urgency=low
++
++ * removed man page 'todo.3.gz', it was useless anyway
++ (closes: #274776)
++ * moved include files from /usr/include to /usr/include/libcgi/
++ (closes: #274796)
++
++ -- Oliver Kurth <oku@debian.org> Sun, 17 Oct 2004 15:11:11 -0700
++
++libcgi (1.0-4) unstable; urgency=low
++
++ * fixed a typo bug in hex encoding code, thanks to Ralph Giles
++ (closes: #271042)
++
++ -- Oliver Kurth <oku@debian.org> Mon, 13 Sep 2004 13:44:55 -0700
++
++libcgi (1.0-3) unstable; urgency=low
++
++ * changed section for -dev to libdevel (from devel)
++ * made GPL-2 more clear in debian/copyright
++ * upstream got patch wrong in string.c (va_copy)
++
++ -- Oliver Kurth <oku@debian.org> Tue, 03 Feb 2004 22:18:28 +0100
++
++libcgi (1.0-2) unstable; urgency=low
++
++ * use -fPIC for shared version, no -fPIC for static version
++ (closes: #230953)
++ * use -D_REENTRANT, after reading the policy manual (10.2)
++
++ -- Oliver Kurth <oku@debian.org> Tue, 03 Feb 2004 22:18:28 +0100
++
++libcgi (1.0-1) unstable; urgency=low
++
++ * new upstream.
++ * first version for Debian. (Closes: #226862)
++
++ -- Oliver Kurth <oku@debian.org> Thu, 08 Jan 2004 14:57:46 +0100
++
++libcgi (0.8.2-1) unstable; urgency=low
++
++ * Initial Release.
++
++ -- Oliver Kurth <oku@debian.org> Thu, 30 Oct 2003 21:23:19 +0100
++
+--- libcgi-1.0.orig/debian/compat
++++ libcgi-1.0/debian/compat
+@@ -0,0 +1 @@
++4
+--- libcgi-1.0.orig/debian/control
++++ libcgi-1.0/debian/control
+@@ -0,0 +1,43 @@
++Source: libcgi
++Priority: optional
++Section: libs
++Maintainer: Oliver Kurth <oku@debian.org>
++Build-Depends: debhelper (>= 4.0.0)
++Standards-Version: 3.6.1
++
++Package: libcgi-dev
++Section: libdevel
++Architecture: any
++Depends: libcgi0 (= ${Source-Version})
++Suggests: libcgi-doc
++Description: library for CGI programs in C
++ libcgi is a library for CGI programs written in C. It includes a lot
++ of functions like string manipulation, session and cookie support, GET
++ and POST methods manipulation etc. to help you to quickly write
++ powerful CGI programs.
++ .
++ This package contains the header files and the static
++ version of the library.
++
++Package: libcgi0
++Section: libs
++Architecture: any
++Depends: ${shlibs:Depends}
++Description: library for CGI programs in C
++ libcgi is a library for CGI programs written in C. It includes a lot
++ of functions like string manipulation, session and cookie support, GET
++ and POST methods manipulation etc. to help you to quickly write
++ powerful CGI programs.
++
++Package: libcgi-doc
++Section: doc
++Architecture: all
++Depends: lynx | www-browser
++Description: documentation for libcgi in html
++ libcgi is a library for CGI programs written in C. It includes a lot
++ of functions like string manipulation, session and cookie support, GET
++ and POST methods manipulation etc. to help you to quickly write
++ powerful CGI programs.
++ .
++ This package contains the doc in html format and examples
++ in C source format in /usr/share/doc/libcgi-doc/.
+--- libcgi-1.0.orig/debian/copyright
++++ libcgi-1.0/debian/copyright
+@@ -0,0 +1,17 @@
++This package was debianized by Oliver Kurth <oku@debian.org> on
++Thu, 30 Oct 2003 21:23:19 +0100.
++
++It was downloaded from http://libcgi.sourceforge.net/
++
++Upstream Author: Rafael Steil <rafael@insanecorp.com>
++
++Copyright:
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ On Debian systems, the complete text of the GNU General Public 2
++ License can be found in /usr/share/common-licenses/GPL-2 file.
++
+--- libcgi-1.0.orig/debian/dirs
++++ libcgi-1.0/debian/dirs
+@@ -0,0 +1,3 @@
++usr/lib
++usr/include/libcgi
++
+--- libcgi-1.0.orig/debian/docs
++++ libcgi-1.0/debian/docs
+@@ -0,0 +1,3 @@
++BUGS
++README
++TODO
+--- libcgi-1.0.orig/debian/libcgi0.dirs
++++ libcgi-1.0/debian/libcgi0.dirs
+@@ -0,0 +1 @@
++usr/lib
+--- libcgi-1.0.orig/debian/libcgi0.install
++++ libcgi-1.0/debian/libcgi0.install
+@@ -0,0 +1 @@
++usr/lib/lib*.so.*
+--- libcgi-1.0.orig/debian/libcgi-dev.dirs
++++ libcgi-1.0/debian/libcgi-dev.dirs
+@@ -0,0 +1,2 @@
++usr/lib
++usr/include
+--- libcgi-1.0.orig/debian/libcgi-dev.install
++++ libcgi-1.0/debian/libcgi-dev.install
+@@ -0,0 +1,5 @@
++usr/include/*
++usr/lib/lib*.a
++usr/lib/lib*.so
++usr/lib/pkgconfig/*
++usr/lib/*.la
+--- libcgi-1.0.orig/debian/rules
++++ libcgi-1.0/debian/rules
+@@ -0,0 +1,119 @@
++#!/usr/bin/make -f
++# -*- makefile -*-
++# Sample debian/rules that uses debhelper.
++# GNU copyright 1997 to 1999 by Joey Hess.
++
++# Uncomment this to turn on verbose mode.
++#export DH_VERBOSE=1
++
++
++# These are used for cross-compiling and for saving the configure script
++# from having to guess our platform (since we know it already)
++DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
++DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
++
++
++CFLAGS = -Wall -g
++
++ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
++ CFLAGS += -O0
++else
++ CFLAGS += -O2
++endif
++ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
++ INSTALL_PROGRAM += -s
++endif
++
++# shared library versions, option 1
++version=0.0.1
++major=0
++# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
++#version=`ls src/.libs/lib*.so.* | \
++# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
++#major=`ls src/.libs/lib*.so.* | \
++# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
++
++config.status: configure
++ dh_testdir
++ CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man
++
++
++build: build-stamp
++build-stamp: config.status
++ dh_testdir
++
++ $(MAKE)
++
++ touch build-stamp
++
++clean:
++ dh_testdir
++ dh_testroot
++ rm -f build-stamp
++ rm -f config.status
++ rm -f config.log config.cache
++ find examples -name Makefile.am -exec rm {} \;
++
++ -$(MAKE) clean
++ifneq "$(wildcard /usr/share/misc/config.sub)" ""
++ cp -f /usr/share/misc/config.sub config.sub
++endif
++ifneq "$(wildcard /usr/share/misc/config.guess)" ""
++ cp -f /usr/share/misc/config.guess config.guess
++endif
++
++
++ dh_clean
++
++install: build
++ dh_testdir
++ dh_testroot
++ dh_clean -k
++ mkdir -p debian/tmp/{usr/lib,usr/include}
++
++ $(MAKE) DESTDIR=$(CURDIR)/debian/tmp/ install
++ (cd debian/tmp/usr/lib; \
++ mv libcgi.so libcgi.so.0.0.0;\
++ ln -s libcgi.so.0.0.0 libcgi.so.0;\
++ ln -s libcgi.so.0.0.0 libcgi.so)
++
++
++binary-indep: build install
++ dh_testdir -i
++ dh_testroot -i
++ dh_installchangelogs -i ChangeLog
++ dh_installdocs -i -plibcgi-doc doc/html/
++ dh_installexamples -i -plibcgi-doc examples/*
++ dh_link -i
++ dh_strip -i
++ dh_compress -i
++ dh_fixperms -i
++ dh_makeshlibs -i
++ dh_installdeb -i
++ dh_shlibdeps -i
++ dh_gencontrol -i
++ dh_md5sums -i
++ dh_builddeb -i
++
++binary-arch: build install
++ dh_testdir -a
++ dh_testroot -a
++ dh_installchangelogs -a ChangeLog
++ dh_installdocs -a
++ dh_install -a --sourcedir=debian/tmp
++ dh_installman -a -plibcgi-dev doc/man/man3/*
++ rm -f $(CURDIR)/debian/libcgi-dev/usr/share/man/man3/todo*
++ dh_link -a
++ dh_strip -a
++ dh_compress -a
++ dh_fixperms -a
++ dh_makeshlibs -a
++ dh_installdeb -a
++ dh_shlibdeps -a
++ dh_gencontrol -a
++ dh_md5sums -a
++ dh_builddeb -a
++
++binary: binary-indep binary-arch
++
++.PHONY: build clean binary-indep binary-arch binary install
diff --git a/patches/libcgi-1.0/generic/libcgi-1.0-makefile-autogen.diff b/patches/libcgi-1.0/generic/libcgi-1.0-makefile-autogen.diff
new file mode 100644
index 000000000..03fa9f511
--- /dev/null
+++ b/patches/libcgi-1.0/generic/libcgi-1.0-makefile-autogen.diff
@@ -0,0 +1,99 @@
+--- libcgi-1.0.orig/Makefile
++++ libcgi-1.0/Makefile
+@@ -0,0 +1,96 @@
++# Generated automatically from Makefile.in by configure.
++INSTALL = /usr/bin/install -c
++INSTALL_PROGRAM = ${INSTALL}
++INSTALL_DATA = ${INSTALL} -m 644
++
++prefix = /usr
++exec_prefix = ${prefix}
++
++SHAREDOPT = -shared -fPIC,-Wl,-soname,libcgi.so.0
++LIBDIR = $(prefix)/lib
++INCDIR = $(prefix)/include/libcgi/
++MANDIR = $(prefix)/man/man3
++SHELL = /bin/sh
++EXTRA_LIBS =
++
++INCS = -Isrc
++FLAGS = -Wall -D_REENTRANT
++
++OBJS = src/error.o src/cgi.o src/session.o src/base64.o src/md5.o \
++ src/string.o src/general.o src/list.o src/cookie.o
++SHOBJS=$(OBJS:.o=.sh.o)
++
++%.o: %.c
++ $(CC) $(FLAGS) -c $*.c -o $@
++
++%.sh.o: %.c
++ $(CC) $(FLAGS) -fPIC -c $*.c -o $@
++
++all: src/libcgi.so src/libcgi.a
++
++ @echo ""
++ @echo ""
++ @echo ""
++ @echo "+---------------------------------------+"
++ @echo "| Thanks for using LibCGI |"
++ @echo "+---------------------------------------+"
++ @echo "| LibCGI is getting better because |"
++ @echo "| people like you are using it. So, if |"
++ @echo "| LibCGI is helping you in some way, |"
++ @echo "| please help us to improve it, sending |"
++ @echo "| suggestions, bug reports, bug fixes, |"
++ @echo "| and specially improvment code. |"
++ @echo "| You can subscribe to the mailing list |"
++ @echo "| or send a mail to the author. |"
++ @echo "+---------------------------------------+---------------------------+"
++ @echo "| List: http://lists.sourceforge.net/lists/listinfo/libcgi-general |"
++ @echo "+-------------------------------------------------------------------+"
++ @echo ""
++
++
++shared: src/libcgi.so
++ cp src/libcgi.so $(LIBDIR)
++
++src/libcgi.a: $(OBJS)
++ $(AR) rc src/libcgi.a $(OBJS)
++
++src/libcgi.so: $(SHOBJS)
++ $(CC) $(SHAREDOPT) -o src/libcgi.so $(SHOBJS) $(EXTRA_LIBS)
++
++install:
++ cp src/libcgi.a $(DESTDIR)/$(LIBDIR)
++ cp src/libcgi.so $(DESTDIR)/$(LIBDIR)
++ [ -d $(DESTDIR)/$(INCDIR) ] || mkdir $(DESTDIR)/$(INCDIR)
++ cp src/cgi.h $(DESTDIR)/$(INCDIR)
++ cp src/session.h $(DESTDIR)/$(INCDIR)
++
++
++src/error.o: src/error.c src/error.h
++src/cgi.o: src/cgi.c src/cgi.h
++src/session.o: src/session.c src/session.h
++src/base64.o: src/base64.c
++src/md5.o: src/md5.c
++src/string.o: src/string.c
++src/cookie.o: src/cookie.c
++src/general.o: src/general.c
++src/list.o: src/list.c
++
++clean:
++ find src/ -name *.o -exec rm -f {} \;
++ find src/ -name *.a -exec rm -f {} \;
++ find src/ -name *.so -exec rm -f {} \;
++
++uninstall: clean
++ rm -f $(LIBDIR)/libcgi.*
++ rm -f $(INCDIR)/cgi.h
++ rm -f $(INCDIR)/session.h
++ rm -f $(MANDIR)/libcgi*
++
++#install_man:
++# cp doc/man/man3/libcgi_base64.3 $(MANDIR)
++# cp doc/man/man3/libcgi_cgi.3 $(MANDIR)
++# cp doc/man/man3/libcgi_general.3 $(MANDIR)
++# cp doc/man/man3/libcgi_string.3 $(MANDIR)
++# cp doc/man/man3/libcgi_session.3 $(MANDIR)
++# cp doc/man/man3/libcgi_cookie.3 $(MANDIR)
++
diff --git a/patches/libcgi-1.0/generic/libcgi-1.0-makefile-destdir.diff b/patches/libcgi-1.0/generic/libcgi-1.0-makefile-destdir.diff
new file mode 100644
index 000000000..9096b59fd
--- /dev/null
+++ b/patches/libcgi-1.0/generic/libcgi-1.0-makefile-destdir.diff
@@ -0,0 +1,87 @@
+--- libcgi-1.0.orig/Makefile.in
++++ libcgi-1.0/Makefile.in
+@@ -5,22 +5,27 @@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+
+-SHAREDOPT = -shared
++SHAREDOPT = -shared -fPIC,-Wl,-soname,libcgi.so.0
+ LIBDIR = $(prefix)/lib
+-INCDIR = $(prefix)/include
++INCDIR = $(prefix)/include/libcgi/
+ MANDIR = $(prefix)/man/man3
+ SHELL = /bin/sh
+ EXTRA_LIBS =
+
+ INCS = -Isrc
+-FLAGS = -Wall -fpic
++FLAGS = -Wall -D_REENTRANT
+
+ OBJS = src/error.o src/cgi.o src/session.o src/base64.o src/md5.o \
+ src/string.o src/general.o src/list.o src/cookie.o
++SHOBJS=$(OBJS:.o=.sh.o)
+
+-.c.o: $(CC) $(FLAGS) -c $<
++%.o: %.c
++ $(CC) $(FLAGS) -c $*.c -o $@
+
+-all: $(OBJS) src/libcgi.so
++%.sh.o: %.c
++ $(CC) $(FLAGS) -fPIC -c $*.c -o $@
++
++all: src/libcgi.so src/libcgi.a
+
+ @echo ""
+ @echo ""
+@@ -48,14 +53,15 @@
+ src/libcgi.a: $(OBJS)
+ $(AR) rc src/libcgi.a $(OBJS)
+
+-src/libcgi.so: src/libcgi.a
+- $(CC) $(SHAREDOPT) -o src/libcgi.so $(OBJS) $(EXTRA_LIBS)
++src/libcgi.so: $(SHOBJS)
++ $(CC) $(SHAREDOPT) -o src/libcgi.so $(SHOBJS) $(EXTRA_LIBS)
+
+ install:
+- cp src/libcgi.a $(LIBDIR)
+- cp src/libcgi.so $(LIBDIR)
+- cp src/cgi.h $(INCDIR)
+- cp src/session.h $(INCDIR)
++ cp src/libcgi.a $(DESTDIR)/$(LIBDIR)
++ cp src/libcgi.so $(DESTDIR)/$(LIBDIR)
++ [ -d $(DESTDIR)/$(INCDIR) ] || mkdir $(DESTDIR)/$(INCDIR)
++ cp src/cgi.h $(DESTDIR)/$(INCDIR)
++ cp src/session.h $(DESTDIR)/$(INCDIR)
+
+
+ src/error.o: src/error.c src/error.h
+@@ -69,8 +75,9 @@
+ src/list.o: src/list.c
+
+ clean:
+- find src/ -name *.*o -exec rm -f {} \;
++ find src/ -name *.o -exec rm -f {} \;
+ find src/ -name *.a -exec rm -f {} \;
++ find src/ -name *.so -exec rm -f {} \;
+
+ uninstall: clean
+ rm -f $(LIBDIR)/libcgi.*
+@@ -78,11 +85,11 @@
+ rm -f $(INCDIR)/session.h
+ rm -f $(MANDIR)/libcgi*
+
+-install_man:
+- cp doc/man/man3/libcgi_base64.3 $(MANDIR)
+- cp doc/man/man3/libcgi_cgi.3 $(MANDIR)
+- cp doc/man/man3/libcgi_general.3 $(MANDIR)
+- cp doc/man/man3/libcgi_string.3 $(MANDIR)
+- cp doc/man/man3/libcgi_session.3 $(MANDIR)
+- cp doc/man/man3/libcgi_cookie.3 $(MANDIR)
++#install_man:
++# cp doc/man/man3/libcgi_base64.3 $(MANDIR)
++# cp doc/man/man3/libcgi_cgi.3 $(MANDIR)
++# cp doc/man/man3/libcgi_general.3 $(MANDIR)
++# cp doc/man/man3/libcgi_string.3 $(MANDIR)
++# cp doc/man/man3/libcgi_session.3 $(MANDIR)
++# cp doc/man/man3/libcgi_cookie.3 $(MANDIR)
+
diff --git a/patches/libcgi-1.0/generic/libcgi-1.0-typo.diff b/patches/libcgi-1.0/generic/libcgi-1.0-typo.diff
new file mode 100644
index 000000000..c3766d2df
--- /dev/null
+++ b/patches/libcgi-1.0/generic/libcgi-1.0-typo.diff
@@ -0,0 +1,11 @@
+--- libcgi-1.0.orig/src/cgi.c
++++ libcgi-1.0/src/cgi.c
+@@ -336,7 +336,7 @@
+ hextable['b'] = 11;
+ hextable['c'] = 12;
+ hextable['d'] = 13;
+- hextable['e'] = 13;
++ hextable['e'] = 14;
+ hextable['f'] = 15;
+ hextable['A'] = 10;
+ hextable['B'] = 11;
diff --git a/patches/libcgi-1.0/generic/libcgi-1.0-wrong-variable.diff b/patches/libcgi-1.0/generic/libcgi-1.0-wrong-variable.diff
new file mode 100644
index 000000000..cd6b2cb67
--- /dev/null
+++ b/patches/libcgi-1.0/generic/libcgi-1.0-wrong-variable.diff
@@ -0,0 +1,11 @@
+--- libcgi-1.0.orig/src/string.c
++++ libcgi-1.0/src/string.c
+@@ -584,7 +584,7 @@
+
+ va_start(ptr, s);
+
+- va_copy(bkp, str);
++ va_copy(bkp, ptr);
+ len = strlen(s);
+
+ while (*str) {
diff --git a/patches/libcgi-1.0/generic/series b/patches/libcgi-1.0/generic/series
new file mode 100644
index 000000000..119f89bc3
--- /dev/null
+++ b/patches/libcgi-1.0/generic/series
@@ -0,0 +1,16 @@
+#
+# Submitted-By: Guillaume GOURAT, 2007-07-26
+# Committed-By: Guillaume GOURAT, 2007-07-26
+#
+# Description:
+#
+# patch from the debian libcgi package
+# http://packages.debian.org/stable/libdevel/libcgi-dev
+#
+
+libcgi-1.0-debianpatches.diff
+libcgi-1.0-makefile-destdir.diff
+libcgi-1.0-typo.diff
+libcgi-1.0-wrong-variable.diff
+libcgi-1.0-makefile-autogen.diff
+
diff --git a/rules/libcgi.in b/rules/libcgi.in
new file mode 100644
index 000000000..0a5e720f7
--- /dev/null
+++ b/rules/libcgi.in
@@ -0,0 +1,10 @@
+config LIBCGI
+ bool
+ prompt "libcgi"
+ help
+ libcgi is a library for CGI programs written in C.
+ It includes a lot of functions like string
+ manipulation, session and cookie support, GET and
+ POST methods manipulation etc. to help you to
+ quickly write powerful CGI programs.
+
diff --git a/rules/libcgi.make b/rules/libcgi.make
new file mode 100644
index 000000000..0539f619a
--- /dev/null
+++ b/rules/libcgi.make
@@ -0,0 +1,133 @@
+# -*-makefile-*-
+# $Id: template 6655 2007-01-02 12:55:21Z rsc $
+#
+# Copyright (C) 2007 by Guillaume Gourat <guillaume.forum@free.fr>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBCGI) += libcgi
+
+#
+# Paths and names
+#
+LIBCGI_VERSION := 1.0
+LIBCGI := libcgi-$(LIBCGI_VERSION)
+LIBCGI_SUFFIX := tar.gz
+LIBCGI_URL := $(PTXCONF_SETUP_SFMIRROR)/libcgi/$(LIBCGI).$(LIBCGI_SUFFIX)
+LIBCGI_SOURCE := $(SRCDIR)/$(LIBCGI).$(LIBCGI_SUFFIX)
+LIBCGI_DIR := $(BUILDDIR)/$(LIBCGI)
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+libcgi_get: $(STATEDIR)/libcgi.get
+
+$(STATEDIR)/libcgi.get: $(libcgi_get_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+$(LIBCGI_SOURCE):
+ @$(call targetinfo, $@)
+ @$(call get, LIBCGI)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+libcgi_extract: $(STATEDIR)/libcgi.extract
+
+$(STATEDIR)/libcgi.extract: $(libcgi_extract_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(LIBCGI_DIR))
+ @$(call extract, LIBCGI)
+ @$(call patchin, LIBCGI)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+libcgi_prepare: $(STATEDIR)/libcgi.prepare
+
+LIBCGI_PATH := PATH=$(CROSS_PATH)
+LIBCGI_ENV := $(CROSS_ENV)
+
+#
+# autoconf
+#
+LIBCGI_AUTOCONF := $(CROSS_AUTOCONF_USR)
+
+LIBCGI_MAKEVARS := $(CROSS_ENV_CC) $(CROSS_ENV_AR)
+
+$(STATEDIR)/libcgi.prepare: $(libcgi_prepare_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(LIBCGI_DIR)/config.cache)
+ cd $(LIBCGI_DIR) && \
+ $(LIBCGI_PATH) $(LIBCGI_ENV) \
+ ./configure $(LIBCGI_AUTOCONF)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+libcgi_compile: $(STATEDIR)/libcgi.compile
+
+$(STATEDIR)/libcgi.compile: $(libcgi_compile_deps_default)
+ @$(call targetinfo, $@)
+ cd $(LIBCGI_DIR) && $(LIBCGI_PATH) $(MAKE) $(LIBCGI_MAKEVARS) $(PARALLELMFLAGS)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+libcgi_install: $(STATEDIR)/libcgi.install
+
+$(STATEDIR)/libcgi.install: $(libcgi_install_deps_default)
+ @$(call targetinfo, $@)
+ @$(call install, LIBCGI)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+libcgi_targetinstall: $(STATEDIR)/libcgi.targetinstall
+
+$(STATEDIR)/libcgi.targetinstall: $(libcgi_targetinstall_deps_default)
+ @$(call targetinfo, $@)
+
+ @$(call install_init, libcgi)
+ @$(call install_fixup, libcgi,PACKAGE,libcgi)
+ @$(call install_fixup, libcgi,PRIORITY,optional)
+ @$(call install_fixup, libcgi,VERSION,$(LIBCGI_VERSION))
+ @$(call install_fixup, libcgi,SECTION,base)
+ @$(call install_fixup, libcgi,AUTHOR,"Guillaume GOURAT <guillaume.gourat\@nexvision.fr>")
+ @$(call install_fixup, libcgi,DEPENDS,)
+ @$(call install_fixup, libcgi,DESCRIPTION,missing)
+
+ @$(call install_copy, libcgi, 0, 0, 0644, $(LIBCGI_DIR)/src/libcgi.so, /usr/lib/libcgi.so)
+
+ @$(call install_finish, libcgi)
+
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+libcgi_clean:
+ rm -rf $(STATEDIR)/libcgi.*
+ rm -rf $(IMAGEDIR)/libcgi_*
+ rm -rf $(LIBCGI_DIR)
+
+# vim: syntax=make
diff --git a/rules/networking.in b/rules/networking.in
index d9c513b3c..55403f023 100644
--- a/rules/networking.in
+++ b/rules/networking.in
@@ -32,6 +32,7 @@ source "rules/ethtool.in"
source "rules/eventlog.in"
source "rules/ifplugd.in"
source "rules/inetutils.in"
+source "rules/libcgi.in"
source "rules/libcgicc.in"
source "rules/libnet.in"
source "rules/libpcap.in"