summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Briesenick <sbriesen@gentoo.org>2005-11-05 22:43:57 +0000
committerStefan Briesenick <sbriesen@gentoo.org>2005-11-05 22:43:57 +0000
commitcb6b9def6219366d887d7f0cd229c51395d0b6d7 (patch)
tree1fd03de9347f2f41ecb33ae488cadbe680bb4667 /sys-apps
parentadd support for existing installs/ultimate quake by UncleOwen #111615 (diff)
downloadhistorical-cb6b9def6219366d887d7f0cd229c51395d0b6d7.tar.gz
historical-cb6b9def6219366d887d7f0cd229c51395d0b6d7.tar.bz2
historical-cb6b9def6219366d887d7f0cd229c51395d0b6d7.zip
rewrite of ebuild using linux-mod.eclass, adding patch + rules for udev support
Package-Manager: portage-2.0.53_rc6
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/pcfclock/ChangeLog11
-rw-r--r--sys-apps/pcfclock/Manifest18
-rw-r--r--sys-apps/pcfclock/files/digest-pcfclock-0.44-r11
-rw-r--r--sys-apps/pcfclock/files/pcfclock-0.44-udev-gentoo.patch51
-rw-r--r--sys-apps/pcfclock/metadata.xml16
-rw-r--r--sys-apps/pcfclock/pcfclock-0.44-r1.ebuild53
6 files changed, 136 insertions, 14 deletions
diff --git a/sys-apps/pcfclock/ChangeLog b/sys-apps/pcfclock/ChangeLog
index 1816d6d9d32a..20daa2f59b88 100644
--- a/sys-apps/pcfclock/ChangeLog
+++ b/sys-apps/pcfclock/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-apps/pcfclock
-# Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcfclock/ChangeLog,v 1.3 2004/09/28 01:54:36 swegener Exp $
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcfclock/ChangeLog,v 1.4 2005/11/05 22:43:57 sbriesen Exp $
+
+*pcfclock-0.44-r1 (05 Nov 2005)
+
+ 05 Nov 2005; Stefan Briesenick <sbriesen@gentoo.org>
+ +files/pcfclock-0.44-udev-gentoo.patch, +metadata.xml,
+ +pcfclock-0.44-r1.ebuild:
+ rewrite of ebuild using linux-mod.eclass, adding patch + rules for udev support
28 Sep 2004; Sven Wegener <swegener@gentoo.org> :
Gentoo Technologies, Inc. -> Gentoo Foundation
diff --git a/sys-apps/pcfclock/Manifest b/sys-apps/pcfclock/Manifest
index e4713f60fa67..f9a54d0e7faf 100644
--- a/sys-apps/pcfclock/Manifest
+++ b/sys-apps/pcfclock/Manifest
@@ -1,14 +1,8 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 ea7742e85ac7f0789676b46f7eb11581 ChangeLog 543
-MD5 aa50ecdd0ce20833ba71e846ec861028 pcfclock-0.44.ebuild 852
+MD5 8e6796e60c8d9413c4601dae21934b79 ChangeLog 799
MD5 7481cda919930a3db6d92e0b4ab47420 files/digest-pcfclock-0.44 64
+MD5 7481cda919930a3db6d92e0b4ab47420 files/digest-pcfclock-0.44-r1 64
+MD5 4c6c8a463bd6f58471a661cbd07604d7 files/pcfclock-0.44-udev-gentoo.patch 2124
MD5 b60ea900b74d4f577955d7bbe079a376 files/pcfclock.modules.d 127
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.9.10 (GNU/Linux)
-
-iD8DBQFBWMRqI1lqEGTUzyQRAhe1AKCzyB8nWFEjK2xrRiTxu9pDPWgnMACgsjEU
-88R9i40azNlydFdWfQ/pTms=
-=36rl
------END PGP SIGNATURE-----
+MD5 dfd8fb7bae22002954771c4bbf209e44 metadata.xml 643
+MD5 400aedc3f7b7db52cae0de25212e8592 pcfclock-0.44-r1.ebuild 1443
+MD5 aa50ecdd0ce20833ba71e846ec861028 pcfclock-0.44.ebuild 852
diff --git a/sys-apps/pcfclock/files/digest-pcfclock-0.44-r1 b/sys-apps/pcfclock/files/digest-pcfclock-0.44-r1
new file mode 100644
index 000000000000..3b1f50f44a5f
--- /dev/null
+++ b/sys-apps/pcfclock/files/digest-pcfclock-0.44-r1
@@ -0,0 +1 @@
+MD5 35f436caf4e6adb077b72bb49d5af3bb pcfclock-0.44.tar.gz 89914
diff --git a/sys-apps/pcfclock/files/pcfclock-0.44-udev-gentoo.patch b/sys-apps/pcfclock/files/pcfclock-0.44-udev-gentoo.patch
new file mode 100644
index 000000000000..5c02c1929321
--- /dev/null
+++ b/sys-apps/pcfclock/files/pcfclock-0.44-udev-gentoo.patch
@@ -0,0 +1,51 @@
+--- linux/pcfclock.c.orig 2004-05-17 18:26:12.000000000 +0200
++++ linux/pcfclock.c 2005-11-05 22:07:57.000000000 +0100
+@@ -93,6 +93,20 @@
+
+ static struct pcfclock_struct pcfclock_table[PCFCLOCK_NO];
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
++# define CLASS_CREATE(owner, name) class_create(owner, name)
++# define CLASS_DESTROY(class) class_destroy(class)
++# define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_device_create(class, dev, device, fmt, rest)
++# define CLASS_DEVICE_DESTROY(class, dev) class_device_destroy(class, dev)
++static struct class *pcfclock_class;
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
++# define CLASS_CREATE(owner, name) class_simple_create(owner, name)
++# define CLASS_DESTROY(class) class_simple_destroy(class)
++# define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_simple_device_add(class, dev, device, fmt, rest)
++# define CLASS_DEVICE_DESTROY(class, dev) class_simple_device_remove(dev)
++static struct class_simple *pcfclock_class;
++#endif
++
+ /*
+ * The radio clock transmits data only to the PC when requested. While the
+ * time signal is received for the first time no communication between the PC
+@@ -442,6 +456,7 @@
+ return 1;
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
++ CLASS_DEVICE_CREATE(pcfclock_class, MKDEV(PCFCLOCK_MAJOR, n), NULL, "pcfclock%d", n);
+ devfs_mk_cdev(MKDEV(PCFCLOCK_MAJOR, n), S_IFCHR | S_IRUGO, "pcfclocks/%d", n);
+ #else
+ sprintf(name, "%d", n);
+@@ -509,6 +524,7 @@
+ printk(KERN_ERR "pcfclock: unable to get major %d\n", PCFCLOCK_MAJOR);
+ return -EIO;
+ }
++ pcfclock_class = CLASS_CREATE(THIS_MODULE, "pcfclock");
+ devfs_mk_dir("pcfclocks");
+ #else
+ if (devfs_register_chrdev(PCFCLOCK_MAJOR, "pcfclock", &pcfclock_fops)) {
+@@ -563,9 +579,11 @@
+ for (n = 0; n < PCFCLOCK_NO; n++) {
+ if (pcfclock_table[n].dev != NULL) {
+ parport_unregister_device(pcfclock_table[n].dev);
++ CLASS_DEVICE_DESTROY(pcfclock_class, MKDEV(PCFCLOCK_MAJOR, n));
+ devfs_remove("pcfclocks/%d", n);
+ }
+ }
++ CLASS_DESTROY(pcfclock_class);
+ devfs_remove("pcfclocks");
+ #else
+ devfs_unregister(devfs_handle);
diff --git a/sys-apps/pcfclock/metadata.xml b/sys-apps/pcfclock/metadata.xml
new file mode 100644
index 000000000000..5b990b6c28ce
--- /dev/null
+++ b/sys-apps/pcfclock/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>sbriesen@gentoo.org</email>
+ <name>Stefan Briesenick</name>
+ </maintainer>
+ <longdescription lang="en">
+ The pcfclock 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.
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-apps/pcfclock/pcfclock-0.44-r1.ebuild b/sys-apps/pcfclock/pcfclock-0.44-r1.ebuild
new file mode 100644
index 000000000000..03e48fbb877f
--- /dev/null
+++ b/sys-apps/pcfclock/pcfclock-0.44-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcfclock/pcfclock-0.44-r1.ebuild,v 1.1 2005/11/05 22:43:57 sbriesen Exp $
+
+inherit eutils linux-mod
+
+DESCRIPTION="driver for the parallel port radio clock sold by Conrad Electronic"
+HOMEPAGE="http://www-stud.ims.uni-stuttgart.de/~voegelas/pcf.html"
+SRC_URI="http://www-stud.ims.uni-stuttgart.de/~voegelas/pcfclock/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc"
+IUSE=""
+
+DEPEND="virtual/linux-sources"
+
+pkg_setup() {
+ CONFIG_CHECK="PARPORT"
+ linux-mod_pkg_setup
+ BUILD_TARGETS="all"
+ ECONF_PARAMS="--with-linux=${KERNEL_DIR}"
+ MODULE_NAMES="pcfclock(::${S}/linux)"
+ MODULESD_PCFCLOCK_ENABLED="yes"
+ MODULESD_PCFCLOCK_EXAMPLES=( "pcfclock parport=0,none,none" )
+ MODULESD_PCFCLOCK_ALIASES=(
+ "char-major-181 pcfclock"
+ "/dev/pcfclock0 char-major-181"
+ "/dev/pcfclock1 char-major-181"
+ "/dev/pcfclock2 char-major-181"
+ )
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-udev-gentoo.patch"
+ convert_to_m "linux/Makefile.in"
+}
+
+src_install() {
+ linux-mod_src_install
+ dosbin pcfdate/pcfdate
+ doman {linux,pcfdate}/*.[48]
+ dodoc AUTHORS ChangeLog NEWS README THANKS
+
+ # Add configuration for udev
+ if [ -e ${ROOT}dev/.udev ]; then
+ dodir /etc/udev/rules.d
+ echo 'KERNEL=="pcfclock*", NAME="%k", MODE="0444"' > \
+ "${D}/etc/udev/rules.d/55-${PN}.rules"
+ fi
+}