commit 2434ead5912d323699a42bb9064b987e8e36f97cf587d105d2180cf9b6b4b460 Author: OBS User unknown Date: Mon Jan 15 23:29:18 2007 +0000 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pcfclock?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1f20089 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +obj-m := pcfclock.o + +# Where to install the modules +MOD_DIR := misc + +.PHONY: modules install clean modules_add + +install : modules_add +modules modules_add clean: + $(MAKE) -C $(KERNEL_SOURCE) $@ SUBDIRS=$(CURDIR) diff --git a/pcfclock-0.44.tar.gz b/pcfclock-0.44.tar.gz new file mode 100644 index 0000000..5258082 --- /dev/null +++ b/pcfclock-0.44.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1285c9536ad04c74bbdd92e22fd6a6661feeb3c9175eccb9b1e02c2f06adbda8 +size 89914 diff --git a/pcfclock-module_param.patch b/pcfclock-module_param.patch new file mode 100644 index 0000000..359e2bd --- /dev/null +++ b/pcfclock-module_param.patch @@ -0,0 +1,12 @@ +--- linux/pcfclock.c ++++ linux/pcfclock.c +@@ -400,8 +400,7 @@ + + static int parport_nr[PCFCLOCK_NO] = {[0 ... PCFCLOCK_NO - 1] = PCFCLOCK_PARPORT_UNSPEC }; + static char *parport[PCFCLOCK_NO] = { NULL, }; +- +-MODULE_PARM(parport, "1-" __MODULE_STRING(PCFCLOCK_NO) "s"); ++module_param_array(parport,charp,NULL,0); + + #ifndef MODULE + static int __init diff --git a/pcfclock-no_devfs.patch b/pcfclock-no_devfs.patch new file mode 100644 index 0000000..faeb971 --- /dev/null +++ b/pcfclock-no_devfs.patch @@ -0,0 +1,47 @@ +--- linux/pcfclock.c ++++ linux/pcfclock.c +@@ -49,7 +49,9 @@ + #include + #include + #include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) + #include ++#endif + #include + #include + #include +@@ -441,7 +443,9 @@ + return 1; + + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) + devfs_mk_cdev(MKDEV(PCFCLOCK_MAJOR, n), S_IFCHR | S_IRUGO, "pcfclocks/%d", n); ++#endif + #else + sprintf(name, "%d", n); + devfs_register(devfs_handle, name, DEVFS_FL_DEFAULT, PCFCLOCK_MAJOR, n, S_IFCHR | S_IRUGO, +@@ -508,7 +512,9 @@ + printk(KERN_ERR "pcfclock: unable to get major %d\n", PCFCLOCK_MAJOR); + return -EIO; + } ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) + devfs_mk_dir("pcfclocks"); ++#endif + #else + if (devfs_register_chrdev(PCFCLOCK_MAJOR, "pcfclock", &pcfclock_fops)) { + printk(KERN_ERR "pcfclock: unable to get major %d\n", PCFCLOCK_MAJOR); +@@ -562,10 +568,14 @@ + for (n = 0; n < PCFCLOCK_NO; n++) { + if (pcfclock_table[n].dev != NULL) { + parport_unregister_device(pcfclock_table[n].dev); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) + devfs_remove("pcfclocks/%d", n); ++#endif + } + } ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) + devfs_remove("pcfclocks"); ++#endif + #else + devfs_unregister(devfs_handle); + devfs_unregister_chrdev(PCFCLOCK_MAJOR, "pcfclock"); diff --git a/pcfclock-nomodule.patch b/pcfclock-nomodule.patch new file mode 100644 index 0000000..9206f3b --- /dev/null +++ b/pcfclock-nomodule.patch @@ -0,0 +1,20 @@ +--- linux/Makefile.in ++++ linux/Makefile.in +@@ -22,7 +22,7 @@ + VM1 := k + endif + +-all: modules ++all: + + modules: pcfclock.$(VM1)o + +@@ -35,7 +35,7 @@ + + check: + +-install: install-exec install-data ++install: install-data + + install-exec: pcfclock.$(VM1)o + $(mkdir_p) $(DESTDIR)$(moddir) diff --git a/pcfclock.changes b/pcfclock.changes new file mode 100644 index 0000000..282469a --- /dev/null +++ b/pcfclock.changes @@ -0,0 +1,21 @@ +------------------------------------------------------------------- +Mon Aug 21 16:29:13 CEST 2006 - ro@suse.de + +- devfs has been removed from 2.6.18, make kernel driver compile + +------------------------------------------------------------------- +Mon Apr 10 18:48:27 CEST 2006 - agruen@suse.de + +- Add preamble `Enhances: kernel-$flavor' workaround to KMP + sub-packages (156513). + +------------------------------------------------------------------- +Mon Apr 3 00:52:19 CEST 2006 - ro@suse.de + +- change MODULE_PARM to module_param + +------------------------------------------------------------------- +Thu Feb 23 00:14:10 CET 2006 - ro@suse.de + +- created package with KMP (version 0.44) + diff --git a/pcfclock.spec b/pcfclock.spec new file mode 100644 index 0000000..78a4f37 --- /dev/null +++ b/pcfclock.spec @@ -0,0 +1,117 @@ +# +# spec file for package pcfclock (Version 0.44) +# +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: pcfclock +BuildRequires: kernel-source kernel-syms +Version: 0.44 +Release: 15 +Summary: Pcfclock kernel driver +License: GPL +Group: System/Kernel +BuildRoot: %{_tmppath}/%{name}-%{version}-build +URL: http://www-stud.ims.uni-stuttgart.de/~voegelas/pcf.html +Requires: pcfclock-kmp +Autoreqprov: on +Source: pcfclock-%{version}.tar.gz +Source1: Makefile +Source2: preamble +Patch: pcfclock-nomodule.patch +Patch1: pcfclock-module_param.patch +Patch2: pcfclock-no_devfs.patch +ExcludeArch: s390 s390x +%suse_kernel_module_package -p %_sourcedir/preamble kdump um xen xenpae iseries64 + +%description +The pcfclock(4) driver for GNU/Linux supports the parallel port radio +clock sold by Conrad Electronic under order number 967602. The radio +clock, which is put between your parallel port and your printer, +receives the legal German time, i.e. CET or CEST, from the DCF77 +transmitter and uses it to set its internal quartz clock. The DCF77 +transmitter is located near to Frankfurt/Main and covers a radius of +more than 1500 kilometers. + + + +Authors: +-------- + Andreas Vögele + +%package KMP +Summary: Pcfclock kernel driver +Group: System/Kernel + + +%description KMP +The pcfclock(4) driver for GNU/Linux supports the parallel port radio +clock sold by Conrad Electronic under order number 967602. The radio +clock, which is put between your parallel port and your printer, +receives the legal German time, i.e. CET or CEST, from the DCF77 +transmitter and uses it to set its internal quartz clock. The DCF77 +transmitter is located near to Frankfurt/Main and covers a radius of +more than 1500 kilometers. + + + +Authors: +-------- + Andreas Vögele + +%prep +%setup +%patch +%patch1 +%patch2 +mkdir source +mkdir obj +cp -a linux/pcfclock.c %{S:1} \ + source + +%build +./configure --prefix=/usr --mandir=%{_mandir} +make +for flavor in %flavors_to_build; do + rm -rf obj/$flavor + cp -r source obj/$flavor + make -C /usr/src/linux-obj/%_target_cpu/$flavor modules \ + M=$PWD/obj/$flavor +done + +%install +make install DESTDIR=%{buildroot} +mkdir -p %{buildroot}%{_mandir}/man4 +# install kernel modules +export INSTALL_MOD_PATH=$RPM_BUILD_ROOT +export INSTALL_MOD_DIR=updates +for flavor in %flavors_to_build; do + make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \ + M=$PWD/obj/$flavor +done + +%files +%defattr(-,root,root) +%doc README +%{_mandir}/man4/pcfclock.4.gz +%{_mandir}/man8/pcfdate.8.gz +/usr/sbin/pcfdate + +%clean +rm -rf %{buildroot} + +%changelog -n pcfclock +* Mon Aug 21 2006 - ro@suse.de +- devfs has been removed from 2.6.18, make kernel driver compile +* Mon Apr 10 2006 - agruen@suse.de +- Add preamble `Enhances: kernel-$flavor' workaround to KMP + sub-packages (156513). +* Mon Apr 03 2006 - ro@suse.de +- change MODULE_PARM to module_param +* Thu Feb 23 2006 - ro@suse.de +- created package with KMP (version 0.44) diff --git a/preamble b/preamble new file mode 100644 index 0000000..ae46ab9 --- /dev/null +++ b/preamble @@ -0,0 +1 @@ +Enhances: kernel-%1 diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4