summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/i2c-tools
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/i2c-tools')
-rw-r--r--meta/recipes-devtools/i2c-tools/i2c-tools-3.1.1/Module.mk72
-rw-r--r--meta/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb34
2 files changed, 106 insertions, 0 deletions
diff --git a/meta/recipes-devtools/i2c-tools/i2c-tools-3.1.1/Module.mk b/meta/recipes-devtools/i2c-tools/i2c-tools-3.1.1/Module.mk
new file mode 100644
index 0000000000..fcaf72f22a
--- /dev/null
+++ b/meta/recipes-devtools/i2c-tools/i2c-tools-3.1.1/Module.mk
@@ -0,0 +1,72 @@
1# EEPROMER
2#
3# Licensed under the GNU General Public License.
4
5EEPROMER_DIR := eepromer
6
7EEPROMER_CFLAGS := -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \
8 -Wcast-align -Wwrite-strings -Wnested-externs -Winline \
9 -W -Wundef -Wmissing-prototypes -Iinclude
10
11EEPROMER_TARGETS := eepromer eeprom eeprog
12
13#
14# Programs
15#
16
17$(EEPROMER_DIR)/eepromer: $(EEPROMER_DIR)/eepromer.o
18 $(CC) $(LDFLAGS) -o $@ $^
19
20$(EEPROMER_DIR)/eeprom: $(EEPROMER_DIR)/eeprom.o
21 $(CC) $(LDFLAGS) -o $@ $^
22
23$(EEPROMER_DIR)/eeprog: $(EEPROMER_DIR)/eeprog.o $(EEPROMER_DIR)/24cXX.o
24 $(CC) $(LDFLAGS) -o $@ $^
25
26#
27# Objects
28#
29
30$(EEPROMER_DIR)/eepromer.o: $(EEPROMER_DIR)/eepromer.c
31 $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
32
33$(EEPROMER_DIR)/eeprom.o: $(EEPROMER_DIR)/eeprom.c
34 $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
35
36$(EEPROMER_DIR)/eeprog.o: $(EEPROMER_DIR)/eeprog.c
37 $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
38
39$(EEPROMER_DIR)/24cXX.o: $(EEPROMER_DIR)/24cXX.c
40 $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
41
42#
43# Commands
44#
45
46all-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
47
48strip-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
49 strip $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
50
51clean-eepromer:
52 $(RM) $(addprefix $(EEPROMER_DIR)/,*.o $(EEPROMER_TARGETS))
53
54install-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
55 $(INSTALL_DIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir)
56 for program in $(EEPROMER_TARGETS) ; do \
57 $(INSTALL_PROGRAM) $(EEPROMER_DIR)/$$program $(DESTDIR)$(sbindir) ; done
58
59uninstall-eepromer:
60 for program in $(EEPROMER_TARGETS) ; do \
61 $(RM) $(DESTDIR)$(sbindir)/$$program ; \
62 $(RM) $(DESTDIR)$(man8dir)/$$program.8 ; done
63
64all: all-eepromer
65
66strip: strip-eepromer
67
68clean: clean-eepromer
69
70install: install-eepromer
71
72uninstall: uninstall-eepromer
diff --git a/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb b/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb
new file mode 100644
index 0000000000..71c98a4fd1
--- /dev/null
+++ b/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb
@@ -0,0 +1,34 @@
1SUMMARY = "Set of i2c tools for linux"
2SECTION = "base"
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
5
6SRC_URI = "http://dl.lm-sensors.org/i2c-tools/releases/${BP}.tar.bz2 \
7 file://Module.mk \
8"
9SRC_URI[md5sum] = "0fdbff53ebd0b8d9249256d6c56480b1"
10SRC_URI[sha256sum] = "14d4d7d60d1c12e43f2befe239c682a5c44c27682f153d4b58c1e392d2db1700"
11
12inherit autotools-brokensep
13
14do_compile_prepend() {
15 cp ${WORKDIR}/Module.mk ${S}/eepromer/
16 sed -i 's#/usr/local#/usr#' ${S}/Makefile
17 echo "include eepromer/Module.mk" >> ${S}/Makefile
18}
19
20do_install_append() {
21 install -d ${D}${includedir}/linux
22 install -m 0644 include/linux/i2c-dev.h ${D}${includedir}/linux/i2c-dev-user.h
23 rm -f ${D}${includedir}/linux/i2c-dev.h
24}
25
26PACKAGES =+ "${PN}-misc"
27FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \
28 ${bindir}/ddcmon \
29 ${bindir}/decode-edid \
30 ${bindir}/decode-dimms \
31 ${bindir}/decode-vaio \
32 "
33RDEPENDS_${PN} += "${PN}-misc"
34RDEPENDS_${PN}-misc += "perl"