automatic rebuild by autodist [release 1.0-2mamba;Wed Aug 28 2013]

This commit is contained in:
Automatic Build System 2024-01-06 03:59:34 +01:00
parent 5d9678e8aa
commit b3762cdd6e
5 changed files with 200 additions and 0 deletions

View File

@ -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.

View File

@ -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)

View File

@ -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;

View File

@ -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) {

88
libcgi.spec Normal file
View File

@ -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 <tiziana.ferro@email.it>
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 <autodist@mambasoft.it> 1.0-2mamba
- automatic rebuild by autodist
* Sun Oct 26 2008 Tiziana Ferro <tiziana.ferro@email.it> 1.0-1mamba
- update to 1.0
- packager changed
* Tue May 17 2005 Davide Madrisan <davide.madrisan@qilinux.it> 0.5-1qilnx
- package created by autospec