From b3762cdd6edba655fbd2f234a582b096ae7347fb Mon Sep 17 00:00:00 2001 From: Automatic Build System Date: Sat, 6 Jan 2024 03:59:34 +0100 Subject: [PATCH] automatic rebuild by autodist [release 1.0-2mamba;Wed Aug 28 2013] --- README.md | 3 + libcgi-1.0-Makefile.in.patch | 87 ++++++++++++++++++++++++++ libcgi-1.0-cgi.c-hextable.patch | 11 ++++ libcgi-1.0-string.c-make_string.patch | 11 ++++ libcgi.spec | 88 +++++++++++++++++++++++++++ 5 files changed, 200 insertions(+) create mode 100644 libcgi-1.0-Makefile.in.patch create mode 100644 libcgi-1.0-cgi.c-hextable.patch create mode 100644 libcgi-1.0-string.c-make_string.patch create mode 100644 libcgi.spec diff --git a/README.md b/README.md index 38ef039..9fd4912 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # libcgi +This library offers a simple programming interface to the Common Gateway Interface, known as CGI, including Cookies. +The purpose is to provide an easy to use interface to CGI if you need to write your program in C instead of perl. + diff --git a/libcgi-1.0-Makefile.in.patch b/libcgi-1.0-Makefile.in.patch new file mode 100644 index 0000000..682d8a4 --- /dev/null +++ b/libcgi-1.0-Makefile.in.patch @@ -0,0 +1,87 @@ +--- libcgi-1.0-orig/Makefile.in 2008-10-26 11:28:48.000000000 +0100 ++++ libcgi-1.0/Makefile.in 2008-10-26 12:09:38.000000000 +0100 +@@ -5,22 +5,28 @@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ + +-SHAREDOPT = -shared ++SOVERSION = $(SOMAJOR).$(SOMINOR) ++SHAREDOPT = -shared -fPIC -Wl,-soname,libcgi.so.$(SOVERSION) + LIBDIR = $(prefix)/lib + INCDIR = $(prefix)/include +-MANDIR = $(prefix)/man/man3 ++MANDIR = $(prefix)/share/man/man3 + SHELL = /bin/sh + EXTRA_LIBS = + + INCS = -Isrc +-FLAGS = -Wall -fpic ++CFLAGS = @CFLAGS@ + + 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 + +-.c.o: $(CC) $(FLAGS) -c $< ++%.o: %.c ++ $(CC) $(CFLAGS) -o $@ -c $< + +-all: $(OBJS) src/libcgi.so ++%.sh.o: %.c ++ $(CC) $(CFLAGS) -fPIC -o $@ -c $< ++ ++ ++all: src/libcgi.so.$(SOVERSION) src/libcgi.a + + @echo "" + @echo "" +@@ -42,20 +48,24 @@ + @echo "" + + +-shared: src/libcgi.so +- cp src/libcgi.so $(LIBDIR) ++shared: src/libcgi.so.$(SOVERSION) ++ cp -p src/libcgi.so.$(SOVERSION) $(LIBDIR) + + 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.$(SOVERSION): $(SHOBJS) ++ $(CC) $(SHAREDOPT) -o src/libcgi.so.$(SOVERSION) $(SHOBJS) $(EXTRA_LIBS) + +-install: +- cp src/libcgi.a $(LIBDIR) +- cp src/libcgi.so $(LIBDIR) +- cp src/cgi.h $(INCDIR) +- cp src/session.h $(INCDIR) ++install: src/libcgi.so.$(SOVERSION) src/libcgi.a ++ [ -d $(DESTDIR)/$(LIBDIR) ] || mkdir -p -m 0755 $(DESTDIR)/$(LIBDIR) ++ cp -p src/libcgi.a $(DESTDIR)$(LIBDIR) ++ cp -p src/libcgi.so.$(SOVERSION) $(DESTDIR)$(LIBDIR) ++ ln -sf libcgi.so.$(SOVERSION) $(DESTDIR)$(LIBDIR)/libcgi.so.$(SOMAJOR) ++ ln -sf libcgi.so.$(SOMAJOR) $(DESTDIR)$(LIBDIR)/libcgi.so ++ [ -d $(DESTDIR)/$(INCDIR) ] || mkdir -p -m 0755 $(DESTDIR)/$(INCDIR) ++ cp -p src/cgi.h $(DESTDIR)$(INCDIR) ++ cp -p src/session.h $(DESTDIR)$(INCDIR) + + + src/error.o: src/error.c src/error.h +@@ -79,10 +89,10 @@ + 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) ++ [ -d $(DESTDIR)/$(MANDIR) ] || mkdir -p -m 0755 $(DESTDIR)/$(MANDIR) ++ cp -p doc/man/man3/libcgi_cgi.3 $(DESTDIR)$(MANDIR) ++ cp -p doc/man/man3/libcgi_general.3 $(DESTDIR)$(MANDIR) ++ cp -p doc/man/man3/libcgi_string.3 $(DESTDIR)$(MANDIR) ++ cp -p doc/man/man3/libcgi_session.3 $(DESTDIR)$(MANDIR) ++ cp -p doc/man/man3/libcgi_cookie.3 $(DESTDIR)$(MANDIR) + diff --git a/libcgi-1.0-cgi.c-hextable.patch b/libcgi-1.0-cgi.c-hextable.patch new file mode 100644 index 0000000..b7eed53 --- /dev/null +++ b/libcgi-1.0-cgi.c-hextable.patch @@ -0,0 +1,11 @@ +--- libcgi-1.0-orig/src/cgi.c 2008-10-26 11:39:20.000000000 +0100 ++++ libcgi-1.0/src/cgi.c 2008-10-26 11:40:03.000000000 +0100 +@@ -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/libcgi-1.0-string.c-make_string.patch b/libcgi-1.0-string.c-make_string.patch new file mode 100644 index 0000000..284cd3d --- /dev/null +++ b/libcgi-1.0-string.c-make_string.patch @@ -0,0 +1,11 @@ +--- libcgi-1.0-orig/src/string.c 2008-10-26 11:41:58.000000000 +0100 ++++ libcgi-1.0/src/string.c 2008-10-26 12:02:53.000000000 +0100 +@@ -584,7 +584,7 @@ + + va_start(ptr, s); + +- va_copy(bkp, str); ++ va_copy(bkp, ptr); + len = strlen(s); + + while (*str) { diff --git a/libcgi.spec b/libcgi.spec new file mode 100644 index 0000000..8aeb40f --- /dev/null +++ b/libcgi.spec @@ -0,0 +1,88 @@ +Name: libcgi +Version: 1.0 +Release: 2mamba +Summary: A CGI (Common Gateway Interface) programming interface +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Tiziana Ferro +URL: http://libcgi.sourceforge.net/ +Source: http://downloads.sourceforge.net/sourceforge/libcgi/libcgi-%{version}.tar.gz +Patch0: libcgi-1.0-Makefile.in.patch +Patch1: libcgi-1.0-cgi.c-hextable.patch +Patch2: libcgi-1.0-string.c-make_string.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +This library offers a simple programming interface to the Common Gateway Interface, known as CGI, including Cookies. +The purpose is to provide an easy to use interface to CGI if you need to write your program in C instead of perl. + +%package devel +Group: Development/Libraries +Summary: Static libraries and headers for %{name} +Requires: %{name} = %{version} + +%description devel +This library offers a simple programming interface to the Common Gateway Interface, known as CGI, including Cookies. +The purpose is to provide an easy to use interface to CGI if you need to write your program in C instead of perl. + +This package contains static libraries and header files need for development. + +%prep +%setup -q -n libcgi-%{version} +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +find examples/ -name "Makefile.am" -exec rm {} ';' + +%build +%configure \ + --disable-static + +%make \ + LIBDIR=%{_libdir} \ + SOMAJOR=1 SOMINOR=0 + +%install +[ "%{buildroot}" != / ] && rm -rf %{buildroot} +%makeinstall DESTDIR=%{buildroot} \ + LIBDIR=%{_libdir} \ + SOMAJOR=1 SOMINOR=0 + +make DESTDIR=%{buildroot} install_man + +%clean +[ "%{buildroot}" != / ] && rm -rf %{buildroot} + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%{_libdir}/*.so.* +%doc AUTHORS + +%files devel +%defattr(-,root,root,-) +%{_libdir}/*.so +%{_includedir}/cgi.h +%{_includedir}/session.h +%{_libdir}/libcgi.a +%{_mandir}/man3/*.3* +%doc doc/html/ examples/ +%doc BUGS ChangeLog README THANKS TODO + +%changelog +* Wed Aug 28 2013 Automatic Build System 1.0-2mamba +- automatic rebuild by autodist + +* Sun Oct 26 2008 Tiziana Ferro 1.0-1mamba +- update to 1.0 +- packager changed + +* Tue May 17 2005 Davide Madrisan 0.5-1qilnx +- package created by autospec