hwsetup-1.2-r3.ebuild 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs flag-o-matic
  5. MY_PV=${PV}-7
  6. DESCRIPTION="Hardware setup program from Knoppix - used only on LiveCD"
  7. HOMEPAGE="http://www.knopper.net/"
  8. SRC_URI="http://debian-knoppix.alioth.debian.org/sources/${PN}_${MY_PV}.tar.gz"
  9. #http://developer.linuxtag.net/knoppix/sources/${PN}_${MY_PV}.tar.gz"
  10. LICENSE="GPL-2"
  11. SLOT="0"
  12. KEYWORDS="alpha amd64 hppa ia64 -mips ppc ppc64 sparc x86"
  13. IUSE="zlib"
  14. COMMON_DEPEND="
  15. sys-apps/pciutils[zlib?]
  16. zlib? ( sys-libs/zlib )
  17. "
  18. DEPEND="
  19. ${COMMON_DEPEND}
  20. sys-libs/libkudzu
  21. "
  22. RDEPEND="
  23. ${COMMON_DEPEND}
  24. sys-apps/hwdata-gentoo
  25. "
  26. pkg_setup() {
  27. ewarn "This package is designed for use on the LiveCD only and will do "
  28. ewarn "unspeakably horrible and unexpected things on a normal system."
  29. ewarn "YOU HAVE BEEN WARNED!!!"
  30. }
  31. src_prepare() {
  32. epatch \
  33. "${FILESDIR}"/${MY_PV}-dyn_blacklist.patch \
  34. "${FILESDIR}"/${PV}-3-fastprobe.patch \
  35. "${FILESDIR}"/${MY_PV}-gentoo.patch \
  36. "${FILESDIR}"/${PV}-strip.patch \
  37. "${FILESDIR}"/${MY_PV}-openchrome.patch
  38. }
  39. src_configure() {
  40. if use zlib ; then
  41. sed -i \
  42. -e '/^LIBS=/s,-lpci,-lz -lpci,g' \
  43. Makefile
  44. fi
  45. }
  46. src_compile() {
  47. emake LDFLAGS="${LDFLAGS}" OPT="${CFLAGS}" CC="$(tc-getCC)"
  48. }
  49. src_install() {
  50. emake DESTDIR="${D}" PREFIX=/usr MANDIR=/usr/share/man
  51. dosbin ${PN}
  52. keepdir /etc/sysconfig
  53. }
  54. pkg_postinst() {
  55. ewarn "This package is intended for use on the Gentoo release media. If"
  56. ewarn "you are not building a CD, remove this package. It will not work"
  57. ewarn "properly on a running system, as Gentoo does not use any of the"
  58. ewarn "Knoppix-style detection except for CD builds."
  59. }