Stefan Reinauer has uploaded this change for review. ( https://review.coreboot.org/c/em100/+/46927 )
Change subject: Add install and uninstall targets to Makefile ......................................................................
Add install and uninstall targets to Makefile
- Will install em100 to /usr/local/bin - Will install udev rule to /etc/udev/rules.d
Assumes that there is a plugdev group (some systems may not have it)
Signed-off-by: Alexander Amelkin a.amelkin@yadro.com Change-Id: Ibfcd6f9f2f577b1f7d8d2d4b0a89405d38264d3d --- M Makefile 1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/em100 refs/changes/27/46927/1
diff --git a/Makefile b/Makefile index a5b8c33..14c928e 100644 --- a/Makefile +++ b/Makefile @@ -71,6 +71,14 @@ distclean: clean rm -f em100pro_chips.h
+install: em100 60-dediprog-em100pro.rules + install -m 644 60-dediprog-em100pro.rules /etc/udev/rules.d/ + install -s -m 750 -g plugdev em100 /usr/local/bin/ + +uninstall: /usr/local/bin/em100 + rm -f /etc/udev/rules.d/60-dediprog-em100pro.rules + rm -f /usr/local/bin/em100 + -include .dependencies
.PHONY: clean distclean tarballs
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/em100/+/46927 )
Change subject: Add install and uninstall targets to Makefile ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/c/em100/+/46927/1/Makefile File Makefile:
https://review.coreboot.org/c/em100/+/46927/1/Makefile@75 PS1, Line 75: etc not sure, this _might_ be $(DESTDIR)$(SYSCONFDIR)
https://review.coreboot.org/c/em100/+/46927/1/Makefile@76 PS1, Line 76: /usr/local it's customary to make this $(DESTDIR)$(PREFIX), with a line PREFIX ?= /usr/local to provide a default (DESTDIR remains empty and exists so that distro packagers have an easy way to install to some temporary location.
https://review.coreboot.org/c/em100/+/46927/1/Makefile@76 PS1, Line 76: plugdev is that a standard now?
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/em100/+/46927 )
Change subject: Add install and uninstall targets to Makefile ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/em100/+/46927/1/Makefile File Makefile:
https://review.coreboot.org/c/em100/+/46927/1/Makefile@76 PS1, Line 76: plugdev
is that a standard now?
it isn't; archlinux doesn't have this group.
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/em100/+/46927
to look at the new patch set (#2).
Change subject: Add install and uninstall targets to Makefile ......................................................................
Add install and uninstall targets to Makefile
- Will install em100 to /usr/local/bin - Will install udev rule to /usr/lib/udev/rules.d
The current udev rule assumes that there is a plugdev group that contains every user allowed to talk to connected EM100Pro devices. Some systems do not have this group, but Debian / Ubuntu are using it by default.
Signed-off-by: Alexander Amelkin a.amelkin@yadro.com Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Change-Id: Ibfcd6f9f2f577b1f7d8d2d4b0a89405d38264d3d --- M Makefile 1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/em100 refs/changes/27/46927/2
Stefan Reinauer has posted comments on this change. ( https://review.coreboot.org/c/em100/+/46927 )
Change subject: Add install and uninstall targets to Makefile ......................................................................
Patch Set 2:
(3 comments)
https://review.coreboot.org/c/em100/+/46927/1/Makefile File Makefile:
https://review.coreboot.org/c/em100/+/46927/1/Makefile@75 PS1, Line 75: etc
not sure, this _might_ be $(DESTDIR)$(SYSCONFDIR)
It's even more different than that.. /etc/ is only to be used by overrides, but the default rule for this device should live in /usr/lib/udev/rules.d instead. Fixed that.
https://review.coreboot.org/c/em100/+/46927/1/Makefile@76 PS1, Line 76: /usr/local
it's customary to make this $(DESTDIR)$(PREFIX), with a line PREFIX ?= /usr/local to provide a defau […]
Done.
https://review.coreboot.org/c/em100/+/46927/1/Makefile@76 PS1, Line 76: plugdev
it isn't; archlinux doesn't have this group.
OpenSUSE doesn't have it either. Debian (and Ubuntu) does. It's the group named in the udev file itself, so it made sense to keep it that I assume.
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/em100/+/46927 )
Change subject: Add install and uninstall targets to Makefile ......................................................................
Patch Set 2:
(2 comments)
https://review.coreboot.org/c/em100/+/46927/1/Makefile File Makefile:
https://review.coreboot.org/c/em100/+/46927/1/Makefile@76 PS1, Line 76: plugdev
OpenSUSE doesn't have it either. Debian (and Ubuntu) does. […]
If somebody wants to make the install target more OS/distro independent, they can do so in a follow up. Let's not wait for perfection.
https://review.coreboot.org/c/em100/+/46927/1/Makefile@78 PS1, Line 78: uninstall: /usr/local/bin/em100 should this also work on $(PREFIX)? Does an "uninstall" target even make sense?
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/em100/+/46927 )
Change subject: Add install and uninstall targets to Makefile ......................................................................
Patch Set 2: Code-Review+2
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/em100/+/46927
to look at the new patch set (#3).
Change subject: Add install and uninstall targets to Makefile ......................................................................
Add install and uninstall targets to Makefile
- Will install em100 to /usr/local/bin - Will install udev rule to /usr/lib/udev/rules.d
The current udev rule assumes that there is a plugdev group that contains every user allowed to talk to connected EM100Pro devices. Some systems do not have this group, but Debian / Ubuntu are using it by default.
Signed-off-by: Alexander Amelkin a.amelkin@yadro.com Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Change-Id: Ibfcd6f9f2f577b1f7d8d2d4b0a89405d38264d3d --- M Makefile 1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/em100 refs/changes/27/46927/3
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/em100/+/46927 )
Change subject: Add install and uninstall targets to Makefile ......................................................................
Patch Set 3: Code-Review+2
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/em100/+/46927 )
Change subject: Add install and uninstall targets to Makefile ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/em100/+/46927/1/Makefile File Makefile:
https://review.coreboot.org/c/em100/+/46927/1/Makefile@78 PS1, Line 78: uninstall: /usr/local/bin/em100
should this also work on $(PREFIX)? Does an "uninstall" target even make sense?
Done
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/em100/+/46927 )
Change subject: Add install and uninstall targets to Makefile ......................................................................
Add install and uninstall targets to Makefile
- Will install em100 to /usr/local/bin - Will install udev rule to /usr/lib/udev/rules.d
The current udev rule assumes that there is a plugdev group that contains every user allowed to talk to connected EM100Pro devices. Some systems do not have this group, but Debian / Ubuntu are using it by default.
Signed-off-by: Alexander Amelkin a.amelkin@yadro.com Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Change-Id: Ibfcd6f9f2f577b1f7d8d2d4b0a89405d38264d3d Reviewed-on: https://review.coreboot.org/c/em100/+/46927 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Patrick Georgi pgeorgi@google.com --- M Makefile 1 file changed, 12 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved
diff --git a/Makefile b/Makefile index a5b8c33..1248780 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,8 @@ CC ?= gcc PKG_CONFIG ?= pkg-config
+PREFIX ?= /usr/local + XZ = xz/xz_crc32.c xz/xz_crc64.c xz/xz_dec_bcj.c xz/xz_dec_lzma2.c xz/xz_dec_stream.c SOURCES = em100.c firmware.c fpga.c hexdump.c sdram.c spi.c system.c trace.c usb.c SOURCES += image.c curl.c chips.c tar.c $(XZ) @@ -71,6 +73,16 @@ distclean: clean rm -f em100pro_chips.h
+install: em100 60-dediprog-em100pro.rules + install -m 755 -d $(DESTDIR)/usr/lib/udev/rules.d/ + install -m 644 60-dediprog-em100pro.rules $(DESTDIR)/usr/lib/udev/rules.d/ + install -m 755 -d $(DESTDIR)$(PREFIX)/bin/ + install -s -m 750 -g plugdev em100 $(DESTDIR)$(PREFIX)/bin/ + +uninstall: /usr/local/bin/em100 + rm -f $(DESTDIR)/usr/lib/udev/rules.d/60-dediprog-em100pro.rules + rm -f $(DESTDIR)$(PREFIX)/bin/em100 + -include .dependencies
.PHONY: clean distclean tarballs