diff options
author | Richard Yao <ryao@gentoo.org> | 2012-12-09 03:50:08 +0000 |
---|---|---|
committer | Richard Yao <ryao@gentoo.org> | 2012-12-09 03:50:08 +0000 |
commit | 87e39e2bf665a025a17760d377f939bd8fee21be (patch) | |
tree | 1058167b31e0d91b1dc335cde4139c647be04fdc /sys-fs/eudev | |
parent | Commit sys-fs/eudev to the tree (diff) | |
download | historical-87e39e2bf665a025a17760d377f939bd8fee21be.tar.gz historical-87e39e2bf665a025a17760d377f939bd8fee21be.tar.bz2 historical-87e39e2bf665a025a17760d377f939bd8fee21be.zip |
Commit sys-fs/eudev to the tree
Package-Manager: portage-2.1.11.31/cvs/Linux x86_64
Diffstat (limited to 'sys-fs/eudev')
-rw-r--r-- | sys-fs/eudev/Manifest | 5 | ||||
-rw-r--r-- | sys-fs/eudev/eudev-1_beta1.ebuild | 219 | ||||
-rw-r--r-- | sys-fs/eudev/eudev-9999.ebuild | 219 | ||||
-rw-r--r-- | sys-fs/eudev/files/40-gentoo.rules | 14 | ||||
-rw-r--r-- | sys-fs/eudev/metadata.xml | 42 |
5 files changed, 497 insertions, 2 deletions
diff --git a/sys-fs/eudev/Manifest b/sys-fs/eudev/Manifest index a1807a7bbd82..43527b43de37 100644 --- a/sys-fs/eudev/Manifest +++ b/sys-fs/eudev/Manifest @@ -1,5 +1,6 @@ AUX 40-gentoo.rules 349 SHA256 5d618b899475925ceccc330b6a738644aedd582d039f0cc404502637351347ea SHA512 b8d90037c08f30c9fb9e22a43c59a3627c218313b0421d4b70feba1731cda76ddc4ee6bdb99dca8df61e11f8d656a8769e172f0a584d7620213973dacfbbb4aa WHIRLPOOL a4086cd5f0e8849369389aa29ec42f5d906b00e3d650724d38ff8b4df4e36de7d3a37393b14f2f30a7102d6f2859b6847b5f4b7813be12d945ce1515494ce120 DIST eudev-1_beta1.tar.gz 1626318 SHA256 efd18e20cfef4733ba2922dd3160309faa53685f1c39f03a0c672db2ffc2124d SHA512 e0417a286f12126725c7c2d1592d627271ce0fcaaeb1921071a545a609c27d64f6fb9c2311718528a2620d429eb2260dd9034be06b87e8ab1f77e3ef52c4f863 WHIRLPOOL 2df34e93a4c1b6a28dfd3dcb411d26a0d33979d32d71a3ff1f78d29b6701ff9a21cc73dddfe37fa9a9f522ef7b9ae2e0851b8deb9b04ef25253b715637869bf2 -EBUILD eudev-1_beta1.ebuild 5693 SHA256 973f7a1ab3d46417804ae3db908eb76d2ec8b5c6c3442bc0da94e01bba98b137 SHA512 66ebb2546569218ffeb1dd42b0f4a6119d100ea5e412fb07e2b0df69246e8356f004437d99efbe682b071f9753ef0ddcbff14a754ae8b479baac0dd537bbd565 WHIRLPOOL 7478a59d8a03cbd21601961b517d29f94d7491356672722f2890ab77f6c53dbc051adb42165d2848e75fae52449e0c8fa0db5a5c5fca94dfa6721a78de3d4efc -EBUILD eudev-9999.ebuild 5693 SHA256 973f7a1ab3d46417804ae3db908eb76d2ec8b5c6c3442bc0da94e01bba98b137 SHA512 66ebb2546569218ffeb1dd42b0f4a6119d100ea5e412fb07e2b0df69246e8356f004437d99efbe682b071f9753ef0ddcbff14a754ae8b479baac0dd537bbd565 WHIRLPOOL 7478a59d8a03cbd21601961b517d29f94d7491356672722f2890ab77f6c53dbc051adb42165d2848e75fae52449e0c8fa0db5a5c5fca94dfa6721a78de3d4efc +EBUILD eudev-1_beta1.ebuild 5692 SHA256 08c49b7def5477f6cf0456cbc81218002f874ed6169af6e1136aa1ea99d6aa07 SHA512 2a3bbb0fcc08425d69ba10abc134bae203985f5bd86953203128172964d7fe23d4bc0d7c5afc467bd24937a3c8e877011da61cb7934aea0ef562446451134c90 WHIRLPOOL f3cde18c298a0201d34f7092b8c68fcc23a7e3b88c99d4d72a9196e28532ad78be48913c84188aad38496bd7b494711b3ecaadae4f9bcdb3d69def3569ce8731 +EBUILD eudev-9999.ebuild 5689 SHA256 a7d87f0adb78062af2998d579d263a5c8cad73775b6e553a447d01e610b6a5f6 SHA512 399b814d535c73c5bca806308aad5c99c10247cb70d6f5a510a2d4f83ed14133db2709aa59564e6772464b1defaf84a4775a6573ffa9cab9f756dbbee31530b7 WHIRLPOOL 6628964365fcd82f83b0ef9a13e29fc154f8c438217edfa9d30508a0fe32a924bc51027f0f48610e85fbde4326df087c483037c5be70e649d0b2394683e3222b +MISC ChangeLog 414 SHA256 bcd07fac7c3b42ef4dc0bd4427500e57b96d8a3336fcc14e965122f85fb41741 SHA512 c78ac2741d71e4e23e1661fd69370bb65102cce5cfd916b7df1214938c7f40c754a8542b1ce8342f0f69c9e507cbce168b88245658a88997a2fafa45cc9957dd WHIRLPOOL 643e4c4e267e1ad4754195d3f96c9f2d2fb7284a14203467509dbb84e95f68c2a298ca6dc42328056e46be6ac0dfe2e5b65a15c7a4a640a20a26be00a2891e81 MISC metadata.xml 1333 SHA256 99a01c28383cf9484e8d11ec3c92c6ef0f9d6070aed5a17824d7f0d8bc91d71d SHA512 cb4cc24f0ce9a1f628f29705fe4f9d75119f16b52d4e42748618ef1143cc0a6bba55e1c9eb1c69456b2f32a3037e24f7526dce301c6ec42214ce339c7c042c8b WHIRLPOOL 8d35b738c58f8a492696d6bc18c27c92016f8871baae104da84d97553138c4534e92c16d3e78aa2375add2211f66585073945b0316bdb2a75686ce15446a831f diff --git a/sys-fs/eudev/eudev-1_beta1.ebuild b/sys-fs/eudev/eudev-1_beta1.ebuild new file mode 100644 index 000000000000..7856bbebabdf --- /dev/null +++ b/sys-fs/eudev/eudev-1_beta1.ebuild @@ -0,0 +1,219 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/eudev/eudev-1_beta1.ebuild,v 1.1 2012/12/09 03:50:07 ryao Exp $ + +EAPI=4 + +KV_min=2.6.39 + +inherit autotools eutils linux-info + +if [[ ${PV} = 9999* ]] +then + EGIT_REPO_URI="git://github.com/gentoo/eudev.git" + inherit git-2 +else + SRC_URI="https://github.com/downloads/gentoo/${PN}/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +fi + +DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" +HOMEPAGE="https://github.com/gentoo/udev-ng" + +LICENSE="LGPL-2.1 MIT GPL-2" +SLOT="0" +IUSE="doc gudev hwdb kmod introspection keymap +modutils +openrc selinux static-libs" + +RESTRICT="test" + +COMMON_DEPEND="gudev? ( dev-libs/glib:2 ) + introspection? ( >=dev-libs/gobject-introspection-1.31.1 ) + selinux? ( sys-libs/libselinux ) + >=sys-apps/util-linux-2.20 + !<sys-libs/glibc-2.11" + +DEPEND="${COMMON_DEPEND} + dev-util/gperf + >=dev-util/intltool-0.40.0 + virtual/pkgconfig + virtual/os-headers + !<sys-kernel/linux-headers-${KV_min} + doc? ( dev-util/gtk-doc )" + +if [[ ${PV} = 9999* ]] +then + DEPEND="${DEPEND} + app-text/docbook-xsl-stylesheets + dev-libs/libxslt" +fi + +RDEPEND="${COMMON_DEPEND} + hwdb? ( sys-apps/hwids ) + openrc? ( >=sys-fs/udev-init-scripts-18 ) + !sys-apps/coldplug + !sys-apps/systemd + !<sys-fs/lvm2-2.02.45 + !sys-fs/device-mapper + !<sys-fs/udev-init-scripts-18" + +udev_check_KV() +{ + if kernel_is lt ${KV_min//./ } + then + return 1 + fi + return 0 +} + +pkg_pretend() +{ + if has_version "<sys-fs/udev-180"; then + ewarn "This package does not contain the libudev.so.0 library." + ewarn "Although we try to ensure that library file is preseved, this will not work" + ewarn "if you manually --unmerge your current version of sys-fs/udev prior to " + ewarn "emerging this package, as may be necessary to resolve blockages." + ewarn "" + ewarn "Removal of libudev.so.0 will effectively break any active Xorg sessions, and " + ewarn "will probably have repercussions with other software as well. A revdep-rebuild" + ewarn "is required to resolve these issues." + ewarn "" + ewarn "We apologize for the inconvenience that this will cause." + fi +} + +pkg_setup() +{ + # required kernel options + CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~SIGNALFD ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2" + ERROR_DEVTMPFS="DEVTMPFS is not set in this kernel. Udev will not run." + + linux-info_pkg_setup + + if ! udev_check_KV + then + eerror "Your kernel version (${KV_FULL}) is too old to run ${P}" + eerror "It must be at least ${KV_min}!" + fi + + KV_FULL_SRC=${KV_FULL} + get_running_version + if ! udev_check_KV + then + eerror + eerror "Your running kernel version (${KV_FULL}) is too old" + eerror "for this version of udev." + eerror "You must upgrade your kernel or downgrade udev." + fi +} + +src_prepare() +{ + # change rules back to group uucp instead of dialout for now + sed -e 's/GROUP="dialout"/GROUP="uucp"/' \ + -i rules/*.rules \ + || die "failed to change group dialout to uucp" + + epatch_user + + if [[ ! -e configure ]] + then + if use doc + then + gtkdocize --docdir docs || die "gtkdocize failed" + else + echo 'EXTRA_DIST =' > docs/gtk-doc.make + fi + eautoreconf + else + elibtoolize + fi +} + +src_configure() +{ + local econf_args + + econf_args=( + ac_cv_search_cap_init= + ac_cv_header_sys_capability_h=yes + DBUS_CFLAGS=' ' + DBUS_LIBS=' ' + --with-rootprefix="${EROOT}" + --docdir="${EROOT}/usr/share/doc/${PF}" + --libdir="${EROOT}/usr/$(get_libdir)" + --with-firmware-path="${EROOT}/usr/lib/firmware/updates:${EROOT}/usr/lib/firmware:${EROOT}/lib/firmware/updates:${EROOT}/lib/firmware" + --with-html-dir="${EROOT}/usr/share/doc/${PF}/html" + --with-rootlibdir="${EROOT}/$(get_libdir)" + --exec-prefix="${EROOT}" + --enable-split-usr + $(use_enable doc gtk-doc) + $(use_enable gudev) + $(use_enable introspection) + $(use_enable keymap) + $(use_enable kmod libkmod) + $(use_enable modutils modules) + $(use_enable selinux) + $(use_enable static-libs static) + ) + econf "${econf_args[@]}" +} + +src_install() +{ + emake DESTDIR="${D}" install + + prune_libtool_files --all + rm -rf "${ED}"/usr/share/doc/${PF}/LICENSE.* + + # install gentoo-specific rules + insinto /usr/lib/udev/rules.d + doins "${FILESDIR}"/40-gentoo.rules +} + +pkg_preinst() +{ + local htmldir + for htmldir in gudev libudev; do + if [[ -d ${EROOT}/usr/share/gtk-doc/html/${htmldir} ]] + then + rm -rf "${EROOT}"/usr/share/gtk-doc/html/${htmldir} + fi + if [[ -d ${ED}/usr/share/doc/${PF}/html/${htmldir} ]] + then + dosym ../../doc/${PF}/html/${htmldir} \ + /usr/share/gtk-doc/html/${htmldir} + fi + done +} + +pkg_postinst() +{ + mkdir -p "${EROOT}"/run + + # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766 + # So try to remove it here (will only work if empty). + rmdir "${EROOT}"/dev/loop 2>/dev/null + if [[ -d ${EROOT}/dev/loop ]] + then + ewarn "Please make sure you remove /dev/loop," + ewarn "else losetup may be confused when looking for unused devices." + fi + + # 64-device-mapper.rules now gets installed by sys-fs/device-mapper + # remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007 + if [[ -f ${EROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && + ! has_version sys-fs/device-mapper + then + rm -f "${EROOT}"/etc/udev/rules.d/64-device-mapper.rules + einfo "Removed unneeded file 64-device-mapper.rules" + fi + + ewarn + ewarn "You need to restart eudev as soon as possible to make the" + ewarn "upgrade go into effect." + + elog + elog "For more information on eudev on Gentoo, writing udev rules, and" + elog "fixing known issues visit:" + elog " http://www.gentoo.org/doc/en/udev-guide.xml" +} diff --git a/sys-fs/eudev/eudev-9999.ebuild b/sys-fs/eudev/eudev-9999.ebuild new file mode 100644 index 000000000000..fb27d9ce66d8 --- /dev/null +++ b/sys-fs/eudev/eudev-9999.ebuild @@ -0,0 +1,219 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/eudev/eudev-9999.ebuild,v 1.1 2012/12/09 03:50:07 ryao Exp $ + +EAPI=4 + +KV_min=2.6.39 + +inherit autotools eutils linux-info + +if [[ ${PV} = 9999* ]] +then + EGIT_REPO_URI="git://github.com/gentoo/eudev.git" + inherit git-2 +else + SRC_URI="https://github.com/downloads/gentoo/${PN}/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +fi + +DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" +HOMEPAGE="https://github.com/gentoo/udev-ng" + +LICENSE="LGPL-2.1 MIT GPL-2" +SLOT="0" +IUSE="doc gudev hwdb kmod introspection keymap +modutils +openrc selinux static-libs" + +RESTRICT="test" + +COMMON_DEPEND="gudev? ( dev-libs/glib:2 ) + introspection? ( >=dev-libs/gobject-introspection-1.31.1 ) + selinux? ( sys-libs/libselinux ) + >=sys-apps/util-linux-2.20 + !<sys-libs/glibc-2.11" + +DEPEND="${COMMON_DEPEND} + dev-util/gperf + >=dev-util/intltool-0.40.0 + virtual/pkgconfig + virtual/os-headers + !<sys-kernel/linux-headers-${KV_min} + doc? ( dev-util/gtk-doc )" + +if [[ ${PV} = 9999* ]] +then + DEPEND="${DEPEND} + app-text/docbook-xsl-stylesheets + dev-libs/libxslt" +fi + +RDEPEND="${COMMON_DEPEND} + hwdb? ( sys-apps/hwids ) + openrc? ( >=sys-fs/udev-init-scripts-18 ) + !sys-apps/coldplug + !sys-apps/systemd + !<sys-fs/lvm2-2.02.45 + !sys-fs/device-mapper + !<sys-fs/udev-init-scripts-18" + +udev_check_KV() +{ + if kernel_is lt ${KV_min//./ } + then + return 1 + fi + return 0 +} + +pkg_pretend() +{ + if has_version "<sys-fs/udev-180"; then + ewarn "This package does not contain the libudev.so.0 library." + ewarn "Although we try to ensure that library file is preseved, this will not work" + ewarn "if you manually --unmerge your current version of sys-fs/udev prior to " + ewarn "emerging this package, as may be necessary to resolve blockages." + ewarn "" + ewarn "Removal of libudev.so.0 will effectively break any active Xorg sessions, and " + ewarn "will probably have repercussions with other software as well. A revdep-rebuild" + ewarn "is required to resolve these issues." + ewarn "" + ewarn "We apologize for the inconvenience that this will cause." + fi +} + +pkg_setup() +{ + # required kernel options + CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~SIGNALFD ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2" + ERROR_DEVTMPFS="DEVTMPFS is not set in this kernel. Udev will not run." + + linux-info_pkg_setup + + if ! udev_check_KV + then + eerror "Your kernel version (${KV_FULL}) is too old to run ${P}" + eerror "It must be at least ${KV_min}!" + fi + + KV_FULL_SRC=${KV_FULL} + get_running_version + if ! udev_check_KV + then + eerror + eerror "Your running kernel version (${KV_FULL}) is too old" + eerror "for this version of udev." + eerror "You must upgrade your kernel or downgrade udev." + fi +} + +src_prepare() +{ + # change rules back to group uucp instead of dialout for now + sed -e 's/GROUP="dialout"/GROUP="uucp"/' \ + -i rules/*.rules \ + || die "failed to change group dialout to uucp" + + epatch_user + + if [[ ! -e configure ]] + then + if use doc + then + gtkdocize --docdir docs || die "gtkdocize failed" + else + echo 'EXTRA_DIST =' > docs/gtk-doc.make + fi + eautoreconf + else + elibtoolize + fi +} + +src_configure() +{ + local econf_args + + econf_args=( + ac_cv_search_cap_init= + ac_cv_header_sys_capability_h=yes + DBUS_CFLAGS=' ' + DBUS_LIBS=' ' + --with-rootprefix="${EROOT}" + --docdir="${EROOT}/usr/share/doc/${PF}" + --libdir="${EROOT}/usr/$(get_libdir)" + --with-firmware-path="${EROOT}/usr/lib/firmware/updates:${EROOT}/usr/lib/firmware:${EROOT}/lib/firmware/updates:${EROOT}/lib/firmware" + --with-html-dir="${EROOT}/usr/share/doc/${PF}/html" + --with-rootlibdir="${EROOT}/$(get_libdir)" + --exec-prefix="${EROOT}" + --enable-split-usr + $(use_enable doc gtk-doc) + $(use_enable gudev) + $(use_enable introspection) + $(use_enable keymap) + $(use_enable kmod libkmod) + $(use_enable modutils modules) + $(use_enable selinux) + $(use_enable static-libs static) + ) + econf "${econf_args[@]}" +} + +src_install() +{ + emake DESTDIR="${D}" install + + prune_libtool_files --all + rm -rf "${ED}"/usr/share/doc/${PF}/LICENSE.* + + # install gentoo-specific rules + insinto /usr/lib/udev/rules.d + doins "${FILESDIR}"/40-gentoo.rules +} + +pkg_preinst() +{ + local htmldir + for htmldir in gudev libudev; do + if [[ -d ${EROOT}/usr/share/gtk-doc/html/${htmldir} ]] + then + rm -rf "${EROOT}"/usr/share/gtk-doc/html/${htmldir} + fi + if [[ -d ${ED}/usr/share/doc/${PF}/html/${htmldir} ]] + then + dosym ../../doc/${PF}/html/${htmldir} \ + /usr/share/gtk-doc/html/${htmldir} + fi + done +} + +pkg_postinst() +{ + mkdir -p "${EROOT}"/run + + # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766 + # So try to remove it here (will only work if empty). + rmdir "${EROOT}"/dev/loop 2>/dev/null + if [[ -d ${EROOT}/dev/loop ]] + then + ewarn "Please make sure you remove /dev/loop," + ewarn "else losetup may be confused when looking for unused devices." + fi + + # 64-device-mapper.rules now gets installed by sys-fs/device-mapper + # remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007 + if [[ -f ${EROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && + ! has_version sys-fs/device-mapper + then + rm -f "${EROOT}"/etc/udev/rules.d/64-device-mapper.rules + einfo "Removed unneeded file 64-device-mapper.rules" + fi + + ewarn + ewarn "You need to restart eudev as soon as possible to make the" + ewarn "upgrade go into effect." + + elog + elog "For more information on eudev on Gentoo, writing udev rules, and" + elog "fixing known issues visit:" + elog " http://www.gentoo.org/doc/en/udev-guide.xml" +} diff --git a/sys-fs/eudev/files/40-gentoo.rules b/sys-fs/eudev/files/40-gentoo.rules new file mode 100644 index 000000000000..fa99ba9fe5e6 --- /dev/null +++ b/sys-fs/eudev/files/40-gentoo.rules @@ -0,0 +1,14 @@ +# do not edit this file, it will be overwritten on update + +# setting permissions +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb" + +# dialout devices +KERNEL=="ippp*|isdn*|dcbri*|rfcomm*|ttyACM[0-9]*|pilot", GROUP="uucp" + +# sound devices (oss) +SUBSYSTEM=="snd", GROUP="audio" + +# Sony Vaio Jogdial sonypi device +KERNEL=="sonypi", MODE="0666" + diff --git a/sys-fs/eudev/metadata.xml b/sys-fs/eudev/metadata.xml new file mode 100644 index 000000000000..61204b5251b0 --- /dev/null +++ b/sys-fs/eudev/metadata.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>lu_zero@gentoo.org</email> + <name>Luca Barbato</name> +</maintainer> +<maintainer> + <email>blueness@gentoo.org</email> + <name>Anthony G. Basile</name> +</maintainer> +<maintainer> + <email>klondike@gentoo.org</email> + <name>Francisco Izquierdo</name> +</maintainer> +<maintainer> + <email>axs@gentoo.org</email> + <name>Ian Stakenvicius</name> +</maintainer> +<maintainer> + <email>prometheanfire@gentoo.org</email> + <name>Matthew Thode</name> +</maintainer> +<maintainer> + <email>chainsaw@gentoo.org</email> + <name>Tony Vroon</name> +</maintainer> +<maintainer> + <email>ryao@gentoo.org</email> + <name>Richard Yao</name> +</maintainer> +<use> + <flag name="gudev">enable libudev gobject interface</flag> + <flag name="hwdb">read vendor/device string database and add it to udev database</flag> + <flag name="introspection">Use <pkg>dev-libs/gobject-introspection</pkg> + for introspection</flag> + <flag name="keymap">map custom hardware's multimedia keys</flag> + <flag name="kmod">enable module loading through libkmod (requires modules)</flag> + <flag name="modutils">enable module loading support</flag> + <flag name="openrc">install the OpenRC init scripts</flag> +</use> +</pkgmetadata> |