From e8ad94d22d5900944c0e91d8fe2b06f16862c227 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Tue, 26 Feb 2002 11:09:28 +0000 Subject: [PATCH] let's build some RPMs. From Tim Ousley --- rpm/comedi.patch | 252 +++++++++++++++++++++++++++++++++++++++++++++++ rpm/comedi.spec | 79 +++++++++++++++ 2 files changed, 331 insertions(+) create mode 100644 rpm/comedi.patch create mode 100644 rpm/comedi.spec diff --git a/rpm/comedi.patch b/rpm/comedi.patch new file mode 100644 index 00000000..43f2f827 --- /dev/null +++ b/rpm/comedi.patch @@ -0,0 +1,252 @@ +diff -ur --new-file comedi-0.7.63/.buildvars configedcomedi/.buildvars +--- comedi-0.7.63/.buildvars Wed Dec 31 18:00:00 1969 ++++ configedcomedi/.buildvars Wed Feb 20 22:48:45 2002 +@@ -0,0 +1,12 @@ ++LINUXDIR=/usr/src/linux-2.4 ++ARCH=i386 ++AFLAGS=-D__ASSEMBLY__ -D__KERNEL__ -I/usr/src/linux-2.4.7-10/include ++LDFLAGS=-e stext ++ARFLAGS=rv ++CROSS_COMPILE= ++KERNELRELEASE=2.4.7-10 ++CFLAGS=-D__KERNEL__ -I/usr/src/linux-2.4.7-10/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -Wno-unused -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.7-10/include/linux/modversions.h ++CC=gcc ++LD=ld -m elf_i386 ++AS=as ++FLAT_MODULES := no +diff -ur --new-file comedi-0.7.63/.config configedcomedi/.config +--- comedi-0.7.63/.config Wed Dec 31 18:00:00 1969 ++++ configedcomedi/.config Wed Feb 20 22:49:38 2002 +@@ -0,0 +1,61 @@ ++# ++# Automatically generated make config: don't edit ++# ++CONFIG_COMEDI=m ++ ++# ++# Comedi Features ++# ++# CONFIG_COMEDI_RT is not set ++CONFIG_COMEDI_DEBUG=y ++CONFIG_COMEDI_KLIB=m ++ ++# ++# Hardware device drivers ++# ++# CONFIG_COMEDI_DT is not set ++CONFIG_COMEDI_NI=y ++CONFIG_COMEDI_NI_ATMIO=m ++CONFIG_COMEDI_NI_MIO_CS=m ++CONFIG_COMEDI_NI_PCIMIO=m ++CONFIG_COMEDI_NI_PCIDIO=m ++CONFIG_COMEDI_NI_670X=m ++CONFIG_COMEDI_MITE=m ++CONFIG_COMEDI_NI_ATMIO16D=m ++CONFIG_COMEDI_NI_AT_A2150=m ++CONFIG_COMEDI_NI_LABPC=m ++# CONFIG_COMEDI_DAS08 is not set ++# CONFIG_COMEDI_DAS16 is not set ++# CONFIG_COMEDI_DAS16M1 is not set ++# CONFIG_COMEDI_DAS6402 is not set ++# CONFIG_COMEDI_DAS800 is not set ++# CONFIG_COMEDI_DAS1800 is not set ++# CONFIG_COMEDI_CB_PCIDAS is not set ++# CONFIG_COMEDI_CB_PCIDAS64 is not set ++# CONFIG_COMEDI_CB_PCIDDA is not set ++CONFIG_COMEDI_8255=m ++# CONFIG_COMEDI_MULTIQ3 is not set ++CONFIG_COMEDI_PARPORT=m ++# CONFIG_COMEDI_ADL_PCI9118 is not set ++# CONFIG_COMEDI_ADV_PCI1710 is not set ++# CONFIG_COMEDI_PCL711 is not set ++# CONFIG_COMEDI_PCL724 is not set ++# CONFIG_COMEDI_PCL725 is not set ++# CONFIG_COMEDI_PCL726 is not set ++# CONFIG_COMEDI_PCL812 is not set ++# CONFIG_COMEDI_PCL818 is not set ++# CONFIG_COMEDI_RTD520 is not set ++# CONFIG_COMEDI_RTI800 is not set ++# CONFIG_COMEDI_RTI802 is not set ++# CONFIG_COMEDI_II_PCI20KC is not set ++# CONFIG_COMEDI_QUATECH_DAQP is not set ++# CONFIG_COMEDI_DAQBOARD2000 is not set ++# CONFIG_COMEDI_DAQBOARD2000_FPGA is not set ++# CONFIG_COMEDI_FL512 is not set ++# CONFIG_COMEDI_POC is not set ++# CONFIG_COMEDI_PCM3730 is not set ++# CONFIG_COMEDI_PCMAD is not set ++# CONFIG_COMEDI_AMPLC_PCI230 is not set ++# CONFIG_COMEDI_SSV_DNP is not set ++# CONFIG_COMEDI_ICP_MULTI is not set ++# CONFIG_COMEDI_SKEL is not set +diff -ur --new-file comedi-0.7.63/comedi/Makefile configedcomedi/comedi/Makefile +--- comedi-0.7.63/comedi/Makefile Wed Dec 31 18:00:00 1969 ++++ configedcomedi/comedi/Makefile Wed Feb 20 22:49:39 2002 +@@ -0,0 +1,14 @@ ++# This Makefile is autogenerated. Edit Makefile.in instead. ++export-objs += comedi_ksyms.o ++comedi.o-objs += comedi_fops.o proc.o range.o drivers.o kvmem.o comedi_ksyms.o ++ifneq ($(CONFIG_COMEDI_RT),) ++comedi.o-objs += rt_pend_tq.o rt.o ++endif ++obj-$(CONFIG_COMEDI) += comedi.o ++subdir-m += kcomedilib ++subdir-m += drivers ++ ++include $(TOPDIR)/Rules.make ++ ++comedi.o: $(comedi.o-objs) ++ $(LD) -r -o $@ $(comedi.o-objs) +diff -ur --new-file comedi-0.7.63/comedi/drivers/Makefile configedcomedi/comedi/drivers/Makefile +--- comedi-0.7.63/comedi/drivers/Makefile Wed Dec 31 18:00:00 1969 ++++ configedcomedi/comedi/drivers/Makefile Wed Feb 20 22:49:39 2002 +@@ -0,0 +1,57 @@ ++# This Makefile is autogenerated. Edit Makefile.in instead. ++export-objs += mite.o 8255.o amcc_s5933.o ++obj-$(CONFIG_COMEDI_8255) += 8255.o ++obj-$(CONFIG_COMEDI_ADL_PCI9118) += adl_pci9118.o amcc_s5933.o ++obj-$(CONFIG_COMEDI_ADV_PCI1710) += adv_pci1710.o amcc_s5933.o ++obj-$(CONFIG_COMEDI_AMPLC_PCI230) += amplc_pci230.o ++obj-$(CONFIG_COMEDI_CB_PCIDAS) += cb_pcidas.o ++obj-$(CONFIG_COMEDI_CB_PCIDAS64) += cb_pcidas64.o ++obj-$(CONFIG_COMEDI_CB_PCIDDA) += cb_pcidda.o ++obj-$(CONFIG_COMEDI_DAQBOARD2000) += daqboard2000.o ++obj-$(CONFIG_COMEDI_DAS08) += das08.o ++obj-$(CONFIG_COMEDI_DAS16) += das16.o ++obj-$(CONFIG_COMEDI_DAS16M1) += das16m1.o ++obj-$(CONFIG_COMEDI_DAS6402) += das6402.o ++obj-$(CONFIG_COMEDI_DAS800) += das800.o ++obj-$(CONFIG_COMEDI_DAS1800) += das1800.o ++obj-$(CONFIG_COMEDI_DT2801) += dt2801.o ++obj-$(CONFIG_COMEDI_DT2811) += dt2811.o ++obj-$(CONFIG_COMEDI_DT2814) += dt2814.o ++obj-$(CONFIG_COMEDI_DT2815) += dt2815.o ++obj-$(CONFIG_COMEDI_DT2817) += dt2817.o ++obj-$(CONFIG_COMEDI_DT282X) += dt282x.o ++obj-$(CONFIG_COMEDI_DT3000) += dt3000.o ++obj-$(CONFIG_COMEDI_FL512) += fl512.o ++obj-$(CONFIG_COMEDI_II_PCI20KC) += ii_pci20kc.o ++obj-$(CONFIG_COMEDI_ICP_MULTI) += icp_multi.o ++obj-$(CONFIG_COMEDI_MITE) += mite.o ++obj-$(CONFIG_COMEDI_MULTIQ3) += multiq3.o ++obj-$(CONFIG_COMEDI_MPC8260CPM) += mpc8260cpm.o ++obj-$(CONFIG_COMEDI_NI_ATMIO) += ni_670x.o ++obj-$(CONFIG_COMEDI_NI_ATMIO) += ni_atmio.o ++obj-$(CONFIG_COMEDI_NI_MIO_CS) += ni_mio_cs.o ++obj-$(CONFIG_COMEDI_NI_PCIMIO) += ni_pcimio.o ++obj-$(CONFIG_COMEDI_NI_PCIDIO) += ni_pcidio.o ++obj-$(CONFIG_COMEDI_NI_ATMIO16D) += ni_atmio16d.o ++obj-$(CONFIG_COMEDI_NI_AT_A2150) += ni_at_a2150.o ++obj-$(CONFIG_COMEDI_NI_LABPC) += ni_labpc.o ++obj-$(CONFIG_COMEDI_PCM3730) += pcm3730.o ++obj-$(CONFIG_COMEDI_PCMAD) += pcmad.o ++obj-$(CONFIG_COMEDI_POC) += poc.o ++obj-$(CONFIG_COMEDI_PCL711) += pcl711.o ++obj-$(CONFIG_COMEDI_PCL724) += pcl724.o ++obj-$(CONFIG_COMEDI_PCL725) += pcl725.o ++obj-$(CONFIG_COMEDI_PCL726) += pcl726.o ++obj-$(CONFIG_COMEDI_PCL812) += pcl812.o ++obj-$(CONFIG_COMEDI_PCL818) += pcl818.o ++obj-$(CONFIG_COMEDI_QUATECH_DAQP) += quatech_daqp_cs.o ++obj-$(CONFIG_COMEDI_PARPORT) += comedi_parport.o ++obj-$(CONFIG_COMEDI_RT_TIMER) += comedi_rt_timer.o ++obj-$(CONFIG_COMEDI_RTD520) += rtd520.o ++obj-$(CONFIG_COMEDI_RTI800) += rti800.o ++obj-$(CONFIG_COMEDI_RTI802) += rti802.o ++obj-$(CONFIG_COMEDI_SKEL) += skel.o ++obj-$(CONFIG_COMEDI_SSV_DNP) += ssv_dnp.o ++ ++include $(TOPDIR)/Rules.make ++ +diff -ur --new-file comedi-0.7.63/comedi/kcomedilib/Makefile configedcomedi/comedi/kcomedilib/Makefile +--- comedi-0.7.63/comedi/kcomedilib/Makefile Wed Dec 31 18:00:00 1969 ++++ configedcomedi/comedi/kcomedilib/Makefile Wed Feb 20 22:49:39 2002 +@@ -0,0 +1,9 @@ ++# This Makefile is autogenerated. Edit Makefile.in instead. ++export-objs += ksyms.o ++kcomedilib.o-objs += data.o ksyms.o dio.o kcomedilib_main.o ++obj-$(CONFIG_COMEDI_KLIB) += kcomedilib.o ++ ++include $(TOPDIR)/Rules.make ++ ++kcomedilib.o: $(kcomedilib.o-objs) ++ $(LD) -r -o $@ $(kcomedilib.o-objs) +diff -ur --new-file comedi-0.7.63/include/config.h configedcomedi/include/config.h +--- comedi-0.7.63/include/config.h Wed Dec 31 18:00:00 1969 ++++ configedcomedi/include/config.h Wed Feb 20 22:49:38 2002 +@@ -0,0 +1,75 @@ ++/* ++ * Automatically generated C config: don't edit ++ */ ++#define AUTOCONF_INCLUDED ++#undef CONFIG_COMEDI ++#define CONFIG_COMEDI_MODULE 1 ++ ++/* ++ * Comedi Features ++ */ ++#undef CONFIG_COMEDI_RT ++#define CONFIG_COMEDI_DEBUG 1 ++#undef CONFIG_COMEDI_KLIB ++#define CONFIG_COMEDI_KLIB_MODULE 1 ++ ++/* ++ * Hardware device drivers ++ */ ++#undef CONFIG_COMEDI_DT ++#define CONFIG_COMEDI_NI 1 ++#undef CONFIG_COMEDI_NI_ATMIO ++#define CONFIG_COMEDI_NI_ATMIO_MODULE 1 ++#undef CONFIG_COMEDI_NI_MIO_CS ++#define CONFIG_COMEDI_NI_MIO_CS_MODULE 1 ++#undef CONFIG_COMEDI_NI_PCIMIO ++#define CONFIG_COMEDI_NI_PCIMIO_MODULE 1 ++#undef CONFIG_COMEDI_NI_PCIDIO ++#define CONFIG_COMEDI_NI_PCIDIO_MODULE 1 ++#undef CONFIG_COMEDI_NI_670X ++#define CONFIG_COMEDI_NI_670X_MODULE 1 ++#undef CONFIG_COMEDI_MITE ++#define CONFIG_COMEDI_MITE_MODULE 1 ++#undef CONFIG_COMEDI_NI_ATMIO16D ++#define CONFIG_COMEDI_NI_ATMIO16D_MODULE 1 ++#undef CONFIG_COMEDI_NI_AT_A2150 ++#define CONFIG_COMEDI_NI_AT_A2150_MODULE 1 ++#undef CONFIG_COMEDI_NI_LABPC ++#define CONFIG_COMEDI_NI_LABPC_MODULE 1 ++#undef CONFIG_COMEDI_DAS08 ++#undef CONFIG_COMEDI_DAS16 ++#undef CONFIG_COMEDI_DAS16M1 ++#undef CONFIG_COMEDI_DAS6402 ++#undef CONFIG_COMEDI_DAS800 ++#undef CONFIG_COMEDI_DAS1800 ++#undef CONFIG_COMEDI_CB_PCIDAS ++#undef CONFIG_COMEDI_CB_PCIDAS64 ++#undef CONFIG_COMEDI_CB_PCIDDA ++#undef CONFIG_COMEDI_8255 ++#define CONFIG_COMEDI_8255_MODULE 1 ++#undef CONFIG_COMEDI_MULTIQ3 ++#undef CONFIG_COMEDI_PARPORT ++#define CONFIG_COMEDI_PARPORT_MODULE 1 ++#undef CONFIG_COMEDI_ADL_PCI9118 ++#undef CONFIG_COMEDI_ADV_PCI1710 ++#undef CONFIG_COMEDI_PCL711 ++#undef CONFIG_COMEDI_PCL724 ++#undef CONFIG_COMEDI_PCL725 ++#undef CONFIG_COMEDI_PCL726 ++#undef CONFIG_COMEDI_PCL812 ++#undef CONFIG_COMEDI_PCL818 ++#undef CONFIG_COMEDI_RTD520 ++#undef CONFIG_COMEDI_RTI800 ++#undef CONFIG_COMEDI_RTI802 ++#undef CONFIG_COMEDI_II_PCI20KC ++#undef CONFIG_COMEDI_QUATECH_DAQP ++#undef CONFIG_COMEDI_DAQBOARD2000 ++#undef CONFIG_COMEDI_DAQBOARD2000_FPGA ++#undef CONFIG_COMEDI_FL512 ++#undef CONFIG_COMEDI_POC ++#undef CONFIG_COMEDI_PCM3730 ++#undef CONFIG_COMEDI_PCMAD ++#undef CONFIG_COMEDI_AMPLC_PCI230 ++#undef CONFIG_COMEDI_SSV_DNP ++#undef CONFIG_COMEDI_ICP_MULTI ++#undef CONFIG_COMEDI_SKEL diff --git a/rpm/comedi.spec b/rpm/comedi.spec new file mode 100644 index 00000000..8fb5412a --- /dev/null +++ b/rpm/comedi.spec @@ -0,0 +1,79 @@ +Summary: Data Acquisition driver for several DAQ boards +Name: comedi +Version: 0.7.63 +Release: 2 +Copyright: GPL +Group: System Environment/Kernel +Source: http://stm.lbl.gov/comedi/download/comedi-0.7.63.tgz +Patch: comedi.patch +BuildRoot: /var/tmp/%{name}-buildroot +requires: kernel = 2.4.7, kernel-source = 2.4.7 +provides: comedi + +%description +Comedi is a data acquisition driver for Linux. Together +with Comedilib, it allows Linux processes to acquire data from +supported DAQ cards, such as those from National Instruments. + +%prep +%setup -q +%patch -p1 -b .buildroot + +%build +cp /usr/src/linux-2.4/configs/kernel-2.4.7-i686.config /usr/src/linux-2.4/.config +#make dep in the kernel +cd /usr/src/linux-2.4 +make dep +#is there a better way to get back to the build directory? +cd /usr/src/redhat/BUILD/comedi-0.7.63 +make + + +%install +#install also gets called while compiling the RPM +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/lib/modules/2.4.7-10/comedi/comedi/drivers +mkdir -p $RPM_BUILD_ROOT/lib/modules/2.4.7-10/comedi/comedi/kcomedilib +mkdir -p $RPM_BUILD_ROOT/usr/include +#comedi runs depmod which isn't in the path by default +#depmod actually needs to be run during the install process. +export PATH=$PATH:/sbin +make install +#apparently rpm requires all the files it archives to be located +#in $RPM_BUILD_ROOT, so we copy over the files we need to save +cp /lib/modules/2.4.7-10/comedi $RPM_BUILD_ROOT/lib/modules/2.4.7-10 -r +cp /usr/src/redhat/BUILD/comedi-0.7.63/include/linux/comedi.h +$RPM_BUILD_ROOT/usr/include/ +cp /usr/src/redhat/BUILD/comedi-0.7.63/include/linux/comedilib.h +$RPM_BUILD_ROOT/usr/include/ + +%post +#post gets called on the user's system after the files have been copied over +#"make install" does: +/sbin/depmod -a +#"make dev" does: +mknod -m 666 /dev/comedi0 c 98 0 +mknod -m 666 /dev/comedi1 c 98 1 +mknod -m 666 /dev/comedi2 c 98 2 +mknod -m 666 /dev/comedi3 c 98 3 + +%postun +#postun is called after the files have been uninstalled +rm -f /dev/comedi0 +rm -f /dev/comedi1 +rm -f /dev/comedi2 +rm -f /dev/comedi3 + +%clean +#clean can be called after building the package + +%files +%defattr(-,root,root) +/lib/modules/2.4.7-10/comedi +#/usr/include/comedi.h +#/usr/include/comedilib.h + +%changelog +* Wed Feb 20 2002 Tim Ousley +- initial build of comedi RPM + -- 2.26.2