From 25c512868d7948bc02ba91e9f06d398c31b0bedf Mon Sep 17 00:00:00 2001 From: lecoanet Date: Fri, 11 Dec 1998 17:24:48 +0000 Subject: Modification pour debianisation --- debian/README | 5 ++++ debian/changelog | 17 ++++++++++++ debian/control | 19 +++++++++++++ debian/copyright | 8 ++++++ debian/dirs | 6 +++++ debian/ivy-c-dev.files | 7 +++++ debian/rules | 58 +++++++++++++++++++++++++++++++++++++++ src/Makefile | 73 ++++++++++++++++++++++++++++++++++++-------------- src/ivy.c | 4 --- src/list.h | 55 ------------------------------------- 10 files changed, 173 insertions(+), 79 deletions(-) create mode 100644 debian/README create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dirs create mode 100644 debian/ivy-c-dev.files create mode 100755 debian/rules delete mode 100644 src/list.h diff --git a/debian/README b/debian/README new file mode 100644 index 0000000..2a37219 --- /dev/null +++ b/debian/README @@ -0,0 +1,5 @@ + +Construction de ivy-c : + + - Il faut installer au préalable le paquetage utils-c-dev qui + fourni list.h. diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..6689ef1 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,17 @@ +ivy-c (1.1-2) unstable; urgency=low + + * Suppression du header list.h qui est aussi défini dans utils-c. + * Ajout du soname à la bibliothèque dynamique. + + -- Patrick Lecoanet Wed, 9 Dec 1998 11:24:34 +0100 + +ivy-c (1.1-1) unstable; urgency=low + + * Initial Release. + + -- Patrick Lecoanet Tue, 13 Oct 1998 09:52:30 +0200 + +Local variables: +mode: debian-changelog +add-log-mailing-address: "lecoanet@cena.dgac.fr" +End: diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..8cd21eb --- /dev/null +++ b/debian/control @@ -0,0 +1,19 @@ +Source: ivy-c +Section: devel +Priority: extra +Maintainer: Patrick Lecoanet +Standards-Version: 2.3.0.0 + +Package: ivy-c +Architecture: any +Depends: ${shlibs:Depends} +Description: Bus logiciel PII. + Bus logiciel PII. Fichiers de runtime. + +Package: ivy-c-dev +Architecture: any +Depends: ivy-c, libc6-dev, xlib6g-dev +Provides: ivy-c-dev +Conflicts: ivy-c-dev +Description: Bus logiciel PII. + Bus logiciel PII. Fichiers nécessaires au développement. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..28c4502 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,8 @@ +This package was debianized by Patrick Lecoanet lecoanet@cena.dgac.fr on +Tue, 13 Oct 1998 09:52:30 +0200. + +It was downloaded from + +Copyright: + + diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..082722d --- /dev/null +++ b/debian/dirs @@ -0,0 +1,6 @@ +usr/lib +usr/bin +usr/X11R6/lib +usr/X11R6/bin +usr/include +usr/man/man3 diff --git a/debian/ivy-c-dev.files b/debian/ivy-c-dev.files new file mode 100644 index 0000000..8bf1137 --- /dev/null +++ b/debian/ivy-c-dev.files @@ -0,0 +1,7 @@ +usr/include +usr/lib/libivy.a +usr/lib/libivy.so +usr/lib/libgivy.a +usr/lib/libgivy.so +usr/X11R6/lib/libxtivy.a +usr/X11R6/lib/libxtivy.so diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..00dfae6 --- /dev/null +++ b/debian/rules @@ -0,0 +1,58 @@ +#!/usr/bin/make -f +# Made with the aid of debmake, by Christoph Lameter, +# based on the sample debian/rules file for GNU hello by Ian Jackson. + +package=ivy-c + +version=$(shell expr `pwd` : '.*-\([0-9.]*\)') +version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*') + +build: + $(checkdir) + + cd src && make all + + touch build + +clean: + $(checkdir) + -rm -f build + + -rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core + -rm -f debian/*substvars + +binary-indep: checkroot build + $(checkdir) +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: checkroot build + $(checkdir) + -rm -rf debian/tmp `find debian/* -type d` + install -d debian/tmp + cd debian/tmp && install -d `cat ../dirs` + + cd src && make install DESTDIR=`pwd`/../debian/tmp + + debstd + -rmdir debian/tmp/usr/include + + dpkg-gencontrol -p$(package) + chown -R root.root debian/tmp + chmod -R go=rX debian/tmp + dpkg --build debian/tmp .. + +define checkdir + test -f debian/rules +endef + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot diff --git a/src/Makefile b/src/Makefile index 834af2f..847c6d3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,39 +1,72 @@ -XTINC =-I/usr/X11R6/include -XTLIB =-L/usr/X11R6/lib -CC=gcc #-g -DDEBUG +XTINC = /usr/X11R6/include +XTLIB = /usr/X11R6/lib +CC=gcc +CFLAGS = -g -DDEBUG OBJ = ivyloop.o timer.o ivysocket.o ivy.o GOBJ = ivyloop.o timer.o ivysocket.o givy.o XTOBJ = ivyxtloop.o ivysocket.o ivy.o -all: libivy.a libgivy.a libxtivy.a libivy.so libgivy.so libxtivy.so testivy testxtivy +VERSION=1 +MAJOR=1 + +.c.o: + $(CC) -fPIC $(CFLAGS) -c $*.c + +all: static-libs commands shared-libs + +static-libs: libivy.a libgivy.a libxtivy.a + +shared-libs: libivy.so.$(VERSION).$(MAJOR) libgivy.so.$(VERSION).$(MAJOR) libxtivy.so.$(VERSION).$(MAJOR) + +commands: testivy testxtivy givy.o: ivy.c - $(CC) -DGNU_REGEXP -c $(CFLAGS) -o givy.o ivy.c + $(CC) -DGNU_REGEXP -fPIC -c $(CFLAGS) -o givy.o ivy.c +testivy: testivy.o libivy.a + $(CC) $(CFLAGS) -o testivy testivy.o -L. -livy -testivy: testivy.o $(OBJ) - $(CC) -o testivy testivy.o $(OBJ) - testxtivy.o : testivy.c - $(CC) -c testivy.c -o testxtivy.o $(XTINC) -DXTMAINLOOP + $(CC) $(CFLAGS) -c testivy.c -o testxtivy.o -I$(XTINC) -DXTMAINLOOP -testxtivy: testxtivy.o $(XTOBJ) - $(CC) -o testxtivy testxtivy.o $(XTOBJ) $(XTLIB) -lXt -lX11 +testxtivy: testxtivy.o libxtivy.a + $(CC) -o testxtivy testxtivy.o -L. -L$(XTLIB) -lxtivy -lXt -lX11 libivy.a: $(OBJ) - ar q libivy.a $(OBJ) + ar q $@ $(OBJ) libgivy.a: $(GOBJ) - ar q libgivy.a $(GOBJ) + ar q $@ $(GOBJ) libxtivy.a: $(XTOBJ) - ar q libxtivy.a $(XTOBJ) + ar q $@ $(XTOBJ) + +libivy.so.$(VERSION).$(MAJOR): $(OBJ) + $(CC) -shared -Wl,-soname,libivy.so.$(VERSION) -o $@ $(OBJ) -lc + +libgivy.so.$(VERSION).$(MAJOR): $(GOBJ) + $(CC) -shared -Wl,-soname,libgivy.so.$(VERSION) -o $@ $(GOBJ) -lc + +libxtivy.so.$(VERSION).$(MAJOR): $(XTOBJ) + $(CC) -shared -Wl,-soname,libxtivy.so.$(VERSION) -o $@ \ + $(XTOBJ) -L$(XTLIB) -lXt -lX11 -lc + +clean: + -rm -f *.o *.a *.so *~ + +install: all + install -m755 testivy $(DESTDIR)/usr/bin + install -m755 testxtivy $(DESTDIR)/usr/X11R6/bin -libivy.so: $(OBJ) - ld -o libivy.so -shared $(OBJ) + install -m644 libivy.a $(DESTDIR)/usr/lib + install -m644 libgivy.a $(DESTDIR)/usr/lib + install -m644 libxtivy.a $(DESTDIR)/usr/X11R6/lib -libgivy.so: $(GOBJ) - ld -o libgivy.so -shared $(GOBJ) + install -m644 libivy.so.$(VERSION).$(MAJOR) $(DESTDIR)/usr/lib + install -m644 libgivy.so.$(VERSION).$(MAJOR) $(DESTDIR)/usr/lib + install -m644 libxtivy.so.$(VERSION).$(MAJOR) $(DESTDIR)/usr/X11R6/lib + cd $(DESTDIR)/usr/lib && ln -s libivy.so.$(VERSION).$(MAJOR) libivy.so + cd $(DESTDIR)/usr/lib && ln -s libgivy.so.$(VERSION).$(MAJOR) libgivy.so + cd $(DESTDIR)/usr/X11R6/lib && ln -s libxtivy.so.$(VERSION).$(MAJOR) libxtivy.so -libxtivy.so: $(XTOBJ) - ld -o libxtivy.so -shared $(XTOBJ) + install -m644 *.h $(DESTDIR)/usr/include diff --git a/src/ivy.c b/src/ivy.c index 28fb29f..1d750a7 100644 --- a/src/ivy.c +++ b/src/ivy.c @@ -1,10 +1,6 @@ /* * -<<<<<<< ivy.c * $Id$ -======= - * $Id$ ->>>>>>> 1.2 */ #include diff --git a/src/list.h b/src/list.h deleted file mode 100644 index 4a6fe26..0000000 --- a/src/list.h +++ /dev/null @@ -1,55 +0,0 @@ -#define LIST_ITER( list, p, cond ) \ - p = list; \ - while ( p && (cond) ) p = p->next - -#define LIST_REMOVE( list, p ) \ - { \ - void *toRemove; \ - if ( list == p ) \ - { \ - list = p->next; \ - free(p);\ - } \ - else \ - {\ - toRemove = p;\ - LIST_ITER( list, p, ( p->next != toRemove ));\ - if ( p )\ - {\ - /* somme tricky swapping to use a untyped variable */\ - void *suiv; \ - void *prec = p;\ - p = toRemove;\ - suiv = p->next;\ - p = prec;\ - p->next = suiv;\ - free(toRemove);\ - }\ - } \ - } - -#define LIST_ADD(list, p ) \ - if ((p = malloc( sizeof( *p ))))\ - { \ - memset( p, 0 , sizeof( *p ));\ - p->next = list; \ - list = p; \ - } - -#define LIST_EACH( list, p ) \ - for ( p = list ; p ; p = p -> next ) - -#define LIST_EACH_SAFE( list, p, next )\ -for ( p = list ; (next = p ? p->next: p ),p ; p = next ) - - -#define LIST_EMPTY( list ) \ - { \ - void *p; \ - while( list ) \ - { \ - p = list;\ - list = list->next; \ - free(p);\ - } \ - } -- cgit v1.1