Package-Name: lm_sensors
Gentoo-Package: sys-apps/lm_sensors
Requires: sysfsutils
Rebuild-For: linux
Compile-Requires: bison flex
Homepage: http://secure.netroedge.com/~lm78/
Source: ftp://ftp.netroedge.com/pub/lm-sensors/lm_sensors-(\d+.\d+.\d+).tar.gz $1
Zap-Before-Install: 1
Repack:
	tar xzvfp "$(SOURCE)"
Compile:
	cp -p BACKGROUND BUGS CHANGES CONTRIBUTORS COPYING README* TODO "$(PREFIX)/"
	make user
	rm -f "$(PREFIX)"/etc/sensors.conf
	make user_install PREFIX="$(PREFIX)" ETCDIR="$(PREFIX)/etc"
	rm -f "$(PREFIX)/lib/libsensors.so*"
Install:
	$(MAKE) instbin BIN="decode-dimms.pl decode-edid.pl decode-vaio.pl decode-xeon.pl sensors"
	$(MAKE) instsbin SBIN="fancontrol fancontrol.pl i2cdetect i2cdump i2cget i2cset isadump isaset pwmconfig sensors-detect"
	$(MAKE) instlib LIB=sensors
	$(MAKE) addldso
	$(MAKE) instetc ETC=sensors.conf
	$(MAKE) instman SECTION=1 MAN=sensors
	$(MAKE) instman SECTION=3 MAN=libsensors
	$(MAKE) instman SECTION=5 MAN=sensors.conf
	$(MAKE) instman SECTION=8 MAN="fancontrol i2cdetect i2cdump i2cget i2cset isadump isaset pwmconfig sensors-detect"
Clean:
	@set -e ; cd "$(PREFIX)"/lib ; \
	for lib in *.so.[0-9] ; do \
		reallib=`/bin/ls -l "$$lib" | sed 's/.* -> //'` ; \
		for file in $$lib.[0-9]*.[0-9]* ; do \
			if test "$$file" != "$$reallib" ; then \
				rm -fv "$$file" ; \
			fi ; \
		done ; \
	done

-/etc/sensors.conf
/etc/sensors.conf
/lib/modules/*/lm_sensors/
/pkg/lm_sensors/
/usr/bin/decode-dimms.pl
/usr/bin/decode-edid.pl
/usr/bin/decode-vaio.pl
/usr/bin/decode-xeon.pl
/usr/bin/sensors
/usr/lib/libsensors.*
/usr/man/man1/sensors.1.gz
/usr/man/man3/libsensors.3.gz
/usr/man/man5/sensors.conf.5.gz
/usr/man/man8/i2cdetect.8.gz
/usr/man/man8/i2cdump.8.gz
/usr/man/man8/i2cset.8.gz
/usr/man/man8/isadump.8.gz
/usr/man/man8/isaset.8.gz
/usr/man/man8/sensors-detect.8.gz
/usr/sbin/fancontrol
/usr/sbin/fancontrol.pl
/usr/sbin/i2cdetect
/usr/sbin/i2cdump
/usr/sbin/i2cget
/usr/sbin/i2cset
/usr/sbin/isadump
/usr/sbin/isaset
/usr/sbin/pwmconfig
/usr/sbin/sensors-detect
