File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# go-devparam
2- Go library and application for accessing device parameters.
2+
3+ Go library and applications for accessing device parameters using the
4+ deviceparameters protocol: < https://github.com/thinnect/tos-devparam > .
5+
6+ ` deviceparameter `
7+ A basic utility for dealing with individual nodes and parameters.
8+ See the [ deviceparameter README] ( cmd/deviceparameter/README.md ) for details.
9+
10+ ` deviceparameters `
11+ A utility for dealing with several parameters on multiple nodes.
12+ See the [ deviceparameters README] ( cmd/deviceparameters/README.md ) for details.
13+
14+ # Dependencies
15+ Go dependencies have been vendored as submodules under the vendor directory.
16+
17+ Building the _ deb_ package requires ` checkinstall ` and ` ronn ` .
18+
19+ ` ronn ` can be obtained from < https://github.com/rtomayko/ronn > .
20+
21+ # Building
22+
23+ Check out all submodules, install ` ronn ` and ` checkinstall ` .
24+
25+ Enter ` cmd/deviceparameter ` or ` cmd/deviceparameters ` and execute ` make ` or
26+ enter ` cmd ` and execute the ` build-deb.sh ` script.
27+
28+ Both applications can be cross-compiled for Windows and for use on ARM based
29+ Linux platforms, though packaging only works on the native architecture. Take a
30+ look at the Makefiles for details.
Original file line number Diff line number Diff line change 1+ # Makefile for building and installing deviceparameter and deviceparameters
2+ MAKEFILE_LOCATION := $(patsubst % /,% ,$(dir $(abspath $(lastword $(MAKEFILE_LIST ) ) ) ) )
3+
4+ all : deviceparameter deviceparameters
5+
6+ deviceparameter :
7+ cd deviceparameter && make clean && make
8+
9+ deviceparameters :
10+ cd deviceparameters && make clean && make
11+
12+ install : deviceparameter deviceparameters
13+ install -m0755 $(MAKEFILE_LOCATION ) /deviceparameter/deviceparameter /usr/bin
14+ install -m0664 $(MAKEFILE_LOCATION ) /deviceparameter/deviceparameter.1.gz /usr/local/man/man1
15+ install -m0755 $(MAKEFILE_LOCATION ) /deviceparameters/deviceparameters /usr/bin
16+ install -m0664 $(MAKEFILE_LOCATION ) /deviceparameters/deviceparameters.1.gz /usr/local/man/man1
17+
18+ .PHONY : deviceparameter
19+ .PHONY : deviceparameters
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ RELEASE_DATE=$( date -u +' %Y%m%d' )
4+
5+ OPTIONS+=" --type=debian"
6+ OPTIONS+=" --default" # answer yes to any questions
7+ OPTIONS+=" --fstrans" # simulate filesystem so root permissions not needed
8+ OPTIONS+=" --install=no" # just make, don't install the package
9+ OPTIONS+=" --nodoc" # as long as actual docs don't exist
10+
11+ OPTIONS+=" --pkgname=mist-device-parameters"
12+ OPTIONS+=" --pkgversion=0.1.0"
13+ OPTIONS+=" --pkgrelease=$RELEASE_DATE "
14+ OPTIONS+=" --provides=mist-device-parameters"
15+ OPTIONS+=" --pkglicense=MIT"
16+ OPTIONS+=" --maintainer=somebody@thinnect.com"
17+
18+ checkinstall $OPTIONS
Original file line number Diff line number Diff line change 1+ Mist deviceparameter and deviceparameters.
Original file line number Diff line number Diff line change 33BUILD_DATE = $(shell date -u '+% Y-% m-% d_% H:% M:% S')
44BUILD_DISTRO = $(shell lsb_release -sd)
55
6- all : deviceparameter
6+ all : deviceparameter manual
77
88win32 : export GOOS=windows
99win32 : export GOARCH=386
@@ -39,3 +39,9 @@ manual: deviceparameter.1.gz
3939install : deviceparameter manual
4040 install -m 0755 deviceparameter /usr/local/bin
4141 install -m 0644 deviceparameter /usr/local/man/man1
42+
43+ clean :
44+ rm -f deviceparameter
45+ rm -f deviceparameter.1.gz
46+
47+ .PHONY : clean
Original file line number Diff line number Diff line change 33BUILD_DATE = $(shell date -u '+% Y-% m-% d_% H:% M:% S')
44BUILD_DISTRO = $(shell lsb_release -sd)
55
6- all : deviceparameters
6+ all : deviceparameters manual
77
88win32 : export GOOS=windows
99win32 : export GOARCH=386
@@ -39,3 +39,9 @@ manual: deviceparameters.1.gz
3939install : deviceparameters manual
4040 install -m 0755 deviceparameters /usr/local/bin
4141 install -m 0644 deviceparameters /usr/local/man/man1
42+
43+ clean :
44+ rm -f deviceparameters
45+ rm -f deviceparameters.1.gz
46+
47+ .PHONY : clean
You can’t perform that action at this time.
0 commit comments