# $Id$ PNAME="hwinfo" PVER="21.23" PBUILD="r2" PCAT="sys-apps" DESCRIPTION="hwinfo is the hardware detection tool used in SuSE Linux." HOMEPAGE="http://www.suse.com/" DEPEND=">= sys-libs/libx86emu-1.1" SDEPEND=">= sys-apps/dbus-dev-1.6 >= sys-libs/libx86emu-dev-1.1" SRCFILE="${PNAME}-${PVER}.tar.xz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" ALX_PKG_KEEP="etc/conf.d/hwsetup usr/sbin/hwinfo usr/sbin/hwsetup usr/sbin/ddcxinfo-knoppix usr/$(mlibdir)/*.so usr/$(mlibdir)/*.so.* var/lib/hardware" sminclude mtools alx-split EMHW_SVN_REV="2677" EDDCX_REV="1.3" SRC_URI=( http://ftp.de.debian.org/debian/pool/main/h/${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-18.1-add-intel-pineview-x11-drivers-i386.patch mirror://${PNAME}/${PNAME}-18.1-use-r128-module-for-ati-rage-cards-i386.patch mirror://${PNAME}/${PNAME}-18.1-use-mach64-module-for-ati-mach64-cards-i386.patch mirror://${PNAME}/${PNAME}-18.1-add-openchrome-x11-drivers-i386.patch mirror://${PNAME}/${PNAME}-18.5-no-xen.patch mirror://${PNAME}/${PNAME}-18.5-tiocgdev-undefined.patch mirror://${PNAME}/${PNAME}-21.23-add-intel-haswell-ult-intefrated-graphic-controller-x11-drivers-i386-amd64.patch mirror://${PNAME}/emulate-hwsetup.sh-${EMHW_SVN_REV} mirror://${PNAME}/emulate-ddcxinfo-knoppix.sh-${EDDCX_REV} ) #UP2DATE="updatecmd http://ftp.de.debian.org/debian/pool/main/h/${PNAME} | grep .tar.gz | sed -n 's/.*_\(.*\).orig.*/\1/;$ p'" # fake - taken newest from suse UP2DATE="echo ${PVER}" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # disable xen checks which are broken atm mpatch ${PNAME}-18.5-no-xen.patch || die # TIOCGDEV isn't supported in the mainline kernel mpatch ${PNAME}-18.5-tiocgdev-undefined.patch || die # add intel pineview to known x11 drivers mpatch -Np1 ${PNAME}-18.1-add-intel-pineview-x11-drivers-i386.patch # use r128 module for all ati rage cards mpatch -Np1 ${PNAME}-18.1-use-r128-module-for-ati-rage-cards-i386.patch # use mach64 module for all ati mach64 cards mpatch -Np1 ${PNAME}-18.1-use-mach64-module-for-ati-mach64-cards-i386.patch || die # add a bunch of via drivers to known x11 drivers using xf86-video-openchrome mpatch -Np1 ${PNAME}-18.1-add-openchrome-x11-drivers-i386.patch || die # add intel haswell ult graphic support mpatch -Np1 ${PNAME}-21.23-add-intel-haswell-ult-intefrated-graphic-controller-x11-drivers-i386-amd64.patch || die } src_compile() { cd ${SRCDIR} mmake -j1 EXTRA_FLAGS="${CFLAGS}" LIBDIR=/usr/$(mlibdir) || die } src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} LIBDIR=/usr/$(mlibdir) install || die mkeepdir /var/lib/hardware/udi || die minstallman doc/hwinfo.8 || die minstalldocs Changelog COPYING README VERSION || die # broken Makefile, remove an empty dir rmdir ${BINDIR}/sbin || die # install hwsetup emulation script minstalldir /usr/sbin || die minstallexec -s emulate-hwsetup.sh-${EMHW_SVN_REV} /usr/sbin/hwsetup || die # install ddcxinfo emulation script minstalldir /usr/sbin || die minstallexec -s emulate-ddcxinfo-knoppix.sh-${EDDCX_REV} /usr/sbin/ddcxinfo-knoppix || die }