From 3ecb5a41ae0cc867fbbdc88f41cef5f08fc35ace Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 30 Mar 2000 00:00:17 +0000 Subject: [PATCH] patch for debian build --- Makefile | 22 ++++----- comedi_calibrate/Makefile | 6 +-- debian/changelog | 9 ++++ debian/comedilib1.files | 1 + debian/control | 19 ++++++++ debian/copyright | 10 ++++ debian/dirs | 3 ++ debian/docs | 2 + debian/ex.doc-base.package | 22 +++++++++ debian/libcomedi0.postinst | 6 +++ debian/libcomedi0.shlibs | 1 + debian/rules | 94 ++++++++++++++++++++++++++++++++++++++ demo/Makefile | 2 +- lib/Makefile | 3 +- 14 files changed, 184 insertions(+), 16 deletions(-) create mode 100644 debian/changelog create mode 100644 debian/comedilib1.files create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dirs create mode 100644 debian/docs create mode 100644 debian/ex.doc-base.package create mode 100644 debian/libcomedi0.postinst create mode 100644 debian/libcomedi0.shlibs create mode 100755 debian/rules diff --git a/Makefile b/Makefile index 7b8ad6d..d947e75 100644 --- a/Makefile +++ b/Makefile @@ -17,11 +17,9 @@ SUBDIRS= lib demo comedi_calibrate testing DOCFILES= README INSTALL `find doc -type f` -ifeq ($(CONFIG_USRLOCAL),y) -INSTALLDIR=/usr/local -else -INSTALLDIR=/usr -endif +INSTALLDIR=$(DESTDIR)/usr +INSTALLDIR_LIB=$(DESTDIR)/usr/lib +INSTALLDIR_DOC=$(DESTDIR)/usr/doc/libcomedi comedilib: subdirs @@ -30,12 +28,14 @@ config: dummy install: dummy install -d ${INSTALLDIR}/include (cd include;install -m 644 comedilib.h ${INSTALLDIR}/include) - install lib/libcomedi.so.${VERSION_CODE} ${INSTALLDIR}/lib - #ln -s ${INSTALLDIR}/lib/libcomedi.so.${VERSION_CODE} ${INSTALLDIR}/lib/libcomedi.so - install -m 644 lib/libcomedi.a ${INSTALLDIR}/lib - /sbin/ldconfig -n ${INSTALLDIR}/lib - install -d ${INSTALLDIR}/doc/comedilib-${VERSION_CODE} - install ${DOCFILES} ${INSTALLDIR}/doc/comedilib-${VERSION_CODE} + (cd include;install -m 644 comedi.h ${INSTALLDIR}/include) + install lib/libcomedi.so.${VERSION_CODE} ${INSTALLDIR_LIB} + (cd $(INSTALLDIR_LIB);ln -s libcomedi.so.${VERSION_CODE} libcomedi.so.${VERSION}) + (cd $(INSTALLDIR_LIB);ln -s libcomedi.so.${VERSION_CODE} libcomedi.so) + install -m 644 lib/libcomedi.a ${INSTALLDIR_LIB} + #/sbin/ldconfig -n ${INSTALLDIR}/lib + install -d ${INSTALLDIR_DOC} + install ${DOCFILES} ${INSTALLDIR_DOC} lpr: dummy find . -name '*.[chs]'|xargs enscript -2r -pit.ps diff --git a/comedi_calibrate/Makefile b/comedi_calibrate/Makefile index bffc0af..7d71128 100644 --- a/comedi_calibrate/Makefile +++ b/comedi_calibrate/Makefile @@ -2,15 +2,15 @@ CFLAGS +=-I ../include -I . -O2 -Wall -LDFLAGS=-L../lib/ -lcomedi +LDFLAGS=-L../lib/ -lcomedi -lm BINS=comedi_calibrate all: $(BINS) -$(patsubst %,_bins_%,$(BINS)) : dummy - $(CC) -o $(patsubst _bins_%,%,$@) $(patsubst _bins_%,%.o,$@) $(LDFLAGS) +comedi_calibrate: comedi_calibrate.o + $(CC) -o comedi_calibrate comedi_calibrate.o $(LDFLAGS) clean: -rm *.o $(BINS) diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..82c0717 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,9 @@ +comedilib (0.7.9-1) unstable; urgency=low + + * Initial Release. + + -- David Schleef Tue, 28 Mar 2000 11:44:42 -0800 + +Local variables: +mode: debian-changelog +End: diff --git a/debian/comedilib1.files b/debian/comedilib1.files new file mode 100644 index 0000000..093956b --- /dev/null +++ b/debian/comedilib1.files @@ -0,0 +1 @@ +usr/lib/*.so.* diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..621ae25 --- /dev/null +++ b/debian/control @@ -0,0 +1,19 @@ +Source: comedilib +Section: devel +Priority: optional +Maintainer: David Schleef +Standards-Version: 3.0.1 + +Package: libcomedi-dev +Architecture: any +Depends: libcomedi0 (= ${Source-Version}), libc6-dev +Description: Development libary for Comedi + Comedilib is a library for using Comedi, a driver interface for data + acquisition hardware. + +Package: libcomedi0 +Architecture: any +Depends: ${shlibs:Depends} +Description: Library for Comedi + Comedilib is a library for using Comedi, a driver interface for data + acquisition hardware. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..0605326 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,10 @@ +This package was debianized by David Schleef on +Tue, 28 Mar 2000 11:44:42 -0800. + +It was downloaded from ftp://stm.lbl.gov/pub/comedi. + +Upstream Author(s): David Schleef + +Copyright: + +LGPL diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..c14ee4d --- /dev/null +++ b/debian/dirs @@ -0,0 +1,3 @@ +usr/lib +usr/include +usr/share/doc diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..9737d93 --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +INSTALL +README diff --git a/debian/ex.doc-base.package b/debian/ex.doc-base.package new file mode 100644 index 0000000..8db0aa9 --- /dev/null +++ b/debian/ex.doc-base.package @@ -0,0 +1,22 @@ +Document: comedilib +Title: Debian comedilib Manual +Author: +Abstract: This manual describes what comedilib is + and how it can be used to + manage online manuals on Debian systems. +Section: unknown + +Format: debiandoc-sgml +Files: /usr/doc/comedilib/comedilib.sgml.gz + +Format: postscript +Files: /usr/doc/comedilib/comedilib.ps.gz + +Format: text +Files: /usr/doc/comedilib/comedilib.text.gz + +Format: HTML +Index: /usr/doc/comedilib/html/index.html +Files: /usr/doc/comedilib/html/*.html + + diff --git a/debian/libcomedi0.postinst b/debian/libcomedi0.postinst new file mode 100644 index 0000000..9af9c37 --- /dev/null +++ b/debian/libcomedi0.postinst @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ "$1" = "configure" ]; then + echo /sbin/ldconfig +fi + diff --git a/debian/libcomedi0.shlibs b/debian/libcomedi0.shlibs new file mode 100644 index 0000000..c7c9df7 --- /dev/null +++ b/debian/libcomedi0.shlibs @@ -0,0 +1 @@ +libcomedi 0.7.9 comedilib (>> 0.7.9-0), comedilib (<< 0.7.9-99) diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..8b15fbb --- /dev/null +++ b/debian/rules @@ -0,0 +1,94 @@ +#!/usr/bin/make -f +# 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 + +# This is the debhelper compatability version to use. +export DH_COMPAT=1 + +# shared library versions, option 1 +version=0.7.8 +major=0 +# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so +#version=`ls lib/lib*.so.* | \ +# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` +#major=`ls lib/lib*.so.* | \ +# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` + +build: build-stamp +build-stamp: + dh_testdir + + + # Add here commands to compile the package. + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) distclean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp. + $(MAKE) install DESTDIR=`pwd`/debian/tmp + (cd debian/tmp;mv usr/doc/libcomedi usr/share/doc/libcomedi-dev;rmdir usr/doc) + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install +# dh_testversion + dh_testdir + dh_testroot + # + # build libcomedi${major} package by moving files from comedilib-dev + # + dh_movefiles -plibcomedi$(major) \ + usr/lib/libcomedi.so.$(version) \ + usr/lib/libcomedi.so.$(major) + +# dh_installdebconf + dh_installdocs + dh_installexamples + dh_installmenu +# dh_installemacsen +# dh_installpam +# dh_installinit + dh_installcron + dh_installmanpages + dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms + # You may want to make some executables suid here. + dh_suidregister + dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/demo/Makefile b/demo/Makefile index 313500e..e4d2e08 100644 --- a/demo/Makefile +++ b/demo/Makefile @@ -2,7 +2,7 @@ CFLAGS +=-I ../include -I . -O2 -LDFLAGS=-L../lib/ -lcomedi +LDFLAGS=-L../lib/ -lcomedi -lm BINS=mode4 mode3 mode2 ao_waveform tut2 cmd tut1 diff --git a/lib/Makefile b/lib/Makefile index 99af04d..a326197 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -6,9 +6,10 @@ OBJS=comedi.o timer.o sv.o range.o ioctl.o filler.o timed.o error.o \ libcomedi.a: $(OBJS) #gcc -shared -Wl,-soname,libcomedi.so,-T,version_script -o libcomedi.so.${VERSION_CODE} $(OBJS) -lm - gcc -shared -Wl,-soname,libcomedi.so -o libcomedi.so.${VERSION_CODE} $(OBJS) -lm + gcc -shared -Wl,-soname,libcomedi.so.0 -o libcomedi.so.${VERSION_CODE} $(OBJS) -lm ar rs libcomedi.a $(OBJS) ln -sf libcomedi.so.${VERSION_CODE} libcomedi.so + ln -sf libcomedi.so.${VERSION_CODE} libcomedi.so.0 clean: rm -f libcomedi.a libcomedi.so* *.o -- 2.26.2