diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-05-07 08:13:31 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-05-07 08:13:31 +0000 |
commit | 8dd956d056fa59165c1c3b8b158acf30fcf2faa5 (patch) | |
tree | e0d08ac91274b8c731cd812e083927d3d54c659d /media-libs/svgalib | |
parent | make sure main.c actually uses the DEVFS_MK_SYMLINK macro #91118 (diff) | |
download | gentoo-2-8dd956d056fa59165c1c3b8b158acf30fcf2faa5.tar.gz gentoo-2-8dd956d056fa59165c1c3b8b158acf30fcf2faa5.tar.bz2 gentoo-2-8dd956d056fa59165c1c3b8b158acf30fcf2faa5.zip |
Install permission files for udev only with older versions; use rules files for newer versions #91733 by John Mylchreest.
(Portage version: 2.0.51.21-r1)
Diffstat (limited to 'media-libs/svgalib')
-rw-r--r-- | media-libs/svgalib/ChangeLog | 8 | ||||
-rw-r--r-- | media-libs/svgalib/files/svgalib.udev.perms.d | 1 | ||||
-rw-r--r-- | media-libs/svgalib/files/svgalib.udev.rules.d | 1 | ||||
-rw-r--r-- | media-libs/svgalib/svgalib-1.9.21.ebuild | 29 |
4 files changed, 22 insertions, 17 deletions
diff --git a/media-libs/svgalib/ChangeLog b/media-libs/svgalib/ChangeLog index 39867df392ca..5a0c3be8e59c 100644 --- a/media-libs/svgalib/ChangeLog +++ b/media-libs/svgalib/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-libs/svgalib # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/ChangeLog,v 1.57 2005/04/25 21:23:40 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/ChangeLog,v 1.58 2005/05/07 08:13:31 vapier Exp $ + + 07 May 2005; Mike Frysinger <vapier@gentoo.org> + +files/svgalib.udev.perms.d, +files/svgalib.udev.rules.d, + svgalib-1.9.21.ebuild: + Install permission files for udev only with older versions; use rules files + for newer versions #91733 by John Mylchreest. *svgalib-1.9.21 (24 Apr 2005) diff --git a/media-libs/svgalib/files/svgalib.udev.perms.d b/media-libs/svgalib/files/svgalib.udev.perms.d new file mode 100644 index 000000000000..733425dcf74e --- /dev/null +++ b/media-libs/svgalib/files/svgalib.udev.perms.d @@ -0,0 +1 @@ +svga*:root:video:0660 diff --git a/media-libs/svgalib/files/svgalib.udev.rules.d b/media-libs/svgalib/files/svgalib.udev.rules.d new file mode 100644 index 000000000000..d4554e308ef4 --- /dev/null +++ b/media-libs/svgalib/files/svgalib.udev.rules.d @@ -0,0 +1 @@ +KERNEL="svga*", NAME="%k", MODE="0660" diff --git a/media-libs/svgalib/svgalib-1.9.21.ebuild b/media-libs/svgalib/svgalib-1.9.21.ebuild index a136e9e71504..bbb1336661ee 100644 --- a/media-libs/svgalib/svgalib-1.9.21.ebuild +++ b/media-libs/svgalib/svgalib-1.9.21.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/svgalib-1.9.21.ebuild,v 1.4 2005/05/07 08:03:58 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/svgalib-1.9.21.ebuild,v 1.5 2005/05/07 08:13:31 vapier Exp $ inherit eutils flag-o-matic toolchain-funcs linux-mod @@ -36,12 +36,6 @@ src_unpack() { # Don't let the ebuild screw around with ld.so.conf #64829 epatch "${FILESDIR}"/${PN}-1.9.19-dont-touch-ld.conf.patch - # DEVFS_MK_SYMLINK is a macro to hide devfs_mk_symlink usage, but - # main.c neglects to actually use it :) #91118 - sed -i \ - -e 's:devfs_mk_symlink:DEVFS_MK_SYMLINK:' \ - kernel/svgalib_helper/main.c - # Don't strip stuff, let portage do it sed -i '/^INSTALL_PROGRAM/s: -s : :' Makefile.cfg } @@ -104,13 +98,15 @@ src_install() { doins src/vga.h gl/vgagl.h src/mouse/vgamouse.h src/joystick/vgajoystick.h doins src/keyboard/vgakeyboard.h - if [[ -e ${ROOT}/dev/.devfsd ]] ; then + if best_version '>=sys-fs/udev-052' ; then + dodir /etc/udev/rules.d + newins "${FILESDIR}"/svgalib.udev.rules.d 30-svgalib + elif best_version sys-fs/udev ; then + insinto /etc/udev/permissions.d + newins "${FILESDIR}"/svgalib.udev.perms.d 30-svgalib + elif best_version sys-fs/devfsd ; then insinto /etc/devfs.d newins "${FILESDIR}"/svgalib.devfs svgalib - elif [[ -e ${ROOT}/dev/.udev ]] ; then - dodir /etc/udev/permissions.d - echo "svga*:root:video:0660" > \ - "${D}"/etc/udev/permissions.d/30-${PN}.permissions fi exeinto /usr/lib/svgalib/demos @@ -135,15 +131,16 @@ src_install() { } pkg_postinst() { - if [[ -e ${ROOT}/dev/.devfsd ]] ; then + linux-mod_pkg_postinst + [[ ${ROOT} != "/" ]] && return 0 + + if [[ -e /dev/.devfsd ]] ; then ebegin "Restarting devfsd to reread devfs rules" killall -HUP devfsd eend $? - elif [[ -e ${ROOT}/dev/.udev ]] ; then + elif [[ -e /dev/.udev ]] ; then ebegin "Restarting udev to reread udev rules" udevstart eend $? fi - - linux-mod_pkg_postinst } |