OBS User unknown 2007-01-15 23:29:18 +00:00 committed by Git OBS Bridge
commit 2434ead591
11 changed files with 255 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -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

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

10
Makefile Normal file
View File

@ -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)

3
pcfclock-0.44.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1285c9536ad04c74bbdd92e22fd6a6661feeb3c9175eccb9b1e02c2f06adbda8
size 89914

View File

@ -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

47
pcfclock-no_devfs.patch Normal file
View File

@ -0,0 +1,47 @@
--- linux/pcfclock.c
+++ linux/pcfclock.c
@@ -49,7 +49,9 @@
#include <linux/major.h>
#include <linux/fs.h>
#include <linux/sched.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
#include <linux/devfs_fs_kernel.h>
+#endif
#include <linux/string.h>
#include <linux/delay.h>
#include <linux/parport.h>
@@ -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");

20
pcfclock-nomodule.patch Normal file
View File

@ -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)

21
pcfclock.changes Normal file
View File

@ -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)

117
pcfclock.spec Normal file
View File

@ -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 <voegelas@gmx.net>
%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 <voegelas@gmx.net>
%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)

1
preamble Normal file
View File

@ -0,0 +1 @@
Enhances: kernel-%1

0
ready Normal file
View File