patch for debian build
authorDavid Schleef <ds@schleef.org>
Thu, 30 Mar 2000 00:00:17 +0000 (00:00 +0000)
committerDavid Schleef <ds@schleef.org>
Thu, 30 Mar 2000 00:00:17 +0000 (00:00 +0000)
14 files changed:
Makefile
comedi_calibrate/Makefile
debian/changelog [new file with mode: 0644]
debian/comedilib1.files [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/dirs [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/ex.doc-base.package [new file with mode: 0644]
debian/libcomedi0.postinst [new file with mode: 0644]
debian/libcomedi0.shlibs [new file with mode: 0644]
debian/rules [new file with mode: 0755]
demo/Makefile
lib/Makefile

index 7b8ad6d4b87d250fa396da2a4c43b48943927aa3..d947e751ea6e82a6dc37179b71ce25f463c2f96f 100644 (file)
--- 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
index bffc0af107cf04d3fce3b8cf000dd099c996730d..7d71128d1aaae6ec7dd22b70c1f7e6a59acbaaa1 100644 (file)
@@ -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 (file)
index 0000000..82c0717
--- /dev/null
@@ -0,0 +1,9 @@
+comedilib (0.7.9-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- David Schleef <ds@stm.lbl.gov>  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 (file)
index 0000000..093956b
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/*.so.*
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..621ae25
--- /dev/null
@@ -0,0 +1,19 @@
+Source: comedilib
+Section: devel
+Priority: optional
+Maintainer: David Schleef <ds@stm.lbl.gov>
+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 (file)
index 0000000..0605326
--- /dev/null
@@ -0,0 +1,10 @@
+This package was debianized by David Schleef <ds@stm.lbl.gov> on
+Tue, 28 Mar 2000 11:44:42 -0800.
+
+It was downloaded from ftp://stm.lbl.gov/pub/comedi.
+
+Upstream Author(s): David Schleef <ds@stm.lbl.gov>
+
+Copyright:
+
+LGPL
diff --git a/debian/dirs b/debian/dirs
new file mode 100644 (file)
index 0000000..c14ee4d
--- /dev/null
@@ -0,0 +1,3 @@
+usr/lib
+usr/include
+usr/share/doc
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..9737d93
--- /dev/null
@@ -0,0 +1,2 @@
+INSTALL
+README
diff --git a/debian/ex.doc-base.package b/debian/ex.doc-base.package
new file mode 100644 (file)
index 0000000..8db0aa9
--- /dev/null
@@ -0,0 +1,22 @@
+Document: comedilib
+Title: Debian comedilib Manual
+Author: <insert document author here>
+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 (file)
index 0000000..9af9c37
--- /dev/null
@@ -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 (file)
index 0000000..c7c9df7
--- /dev/null
@@ -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 (executable)
index 0000000..8b15fbb
--- /dev/null
@@ -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
index 313500e2a8d3184452ca07c3555b923e196464a2..e4d2e08178e6d286ecdc4e02458580e71021d350 100644 (file)
@@ -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
index 99af04d36cad4d02de5d0079b05215db551d67f7..a326197533216dcdf84169067744d20a41183d41 100644 (file)
@@ -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