nmrouter-image-node-red: add can support to nodejs
This will allow one to install the canbus node-red plugin.
This commit is contained in:
		
							parent
							
								
									ea74c252ee
								
							
						
					
					
						commit
						02487d1652
					
				|  | @ -4,10 +4,12 @@ SUMMARY = "nmrouter image that includes node-red" | ||||||
| 
 | 
 | ||||||
| IMAGE_INSTALL_append = " \ | IMAGE_INSTALL_append = " \ | ||||||
|                 nodejs \ |                 nodejs \ | ||||||
|  |                 nodejs-npm \ | ||||||
|                 node-red \ |                 node-red \ | ||||||
|                 python3 \ |                 python3 \ | ||||||
|                 python3-pip \ |                 python3-pip \ | ||||||
|                 python3-misc \ |                 python3-misc \ | ||||||
|  |                 node-can \ | ||||||
|                 " |                 " | ||||||
| 
 | 
 | ||||||
| IMAGE_INSTALL_remove = " \ | IMAGE_INSTALL_remove = " \ | ||||||
|  |  | ||||||
|  | @ -0,0 +1,22 @@ | ||||||
|  | DESCRIPTION = "Node-CAN extension" | ||||||
|  | 
 | ||||||
|  | LICENSE = "Apache-2.0" | ||||||
|  | LIC_FILES_CHKSUM = "file://README.md;md5=e96bd3fe839e97ad96d6b3ea4ea48098" | ||||||
|  | 
 | ||||||
|  | SRC_URI = " \ | ||||||
|  |     git://github.com/sebi2k1/node-can.git;protocol=https \ | ||||||
|  | 	" | ||||||
|  | 
 | ||||||
|  | SRCREV = "2f5cc70229e255f802521481919ff5ebc7942394" | ||||||
|  | 
 | ||||||
|  | S = "${WORKDIR}/git" | ||||||
|  | 
 | ||||||
|  | inherit npm-install-global | ||||||
|  | 
 | ||||||
|  | do_configure() { | ||||||
|  | 	: | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||||||
|  | 
 | ||||||
|  | RDEPENDS_${PN} += " nodejs bash" | ||||||
|  | @ -0,0 +1,12 @@ | ||||||
|  | [Unit] | ||||||
|  | Description=Start NodeRed server | ||||||
|  | 
 | ||||||
|  | [Service] | ||||||
|  | Environment="HOME=/home/root/" | ||||||
|  | Type=simple | ||||||
|  | ExecStart=/usr/bin/node-red | ||||||
|  | WorkingDirectory=/home/root/ | ||||||
|  | 
 | ||||||
|  | [Install] | ||||||
|  | WantedBy=multi-user.target | ||||||
|  | 
 | ||||||
|  | @ -0,0 +1,15 @@ | ||||||
|  | inherit systemd | ||||||
|  | 
 | ||||||
|  | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||||||
|  | 
 | ||||||
|  | SRC_URI_append = " \ | ||||||
|  |                 file://node-red.service \ | ||||||
|  |                 " | ||||||
|  | 
 | ||||||
|  | SYSTEMD_SERVICE_${PN} = "node-red.service" | ||||||
|  | 
 | ||||||
|  | do_install_append () { | ||||||
|  |     install -d ${D}/lib/systemd/system | ||||||
|  |     install -m 644  ${WORKDIR}/node-red.service ${D}/lib/systemd/system | ||||||
|  | } | ||||||
|  | 
 | ||||||
		Loading…
	
		Reference in New Issue