root@ubuntu18:/home/ssd_workspace/ftgw/snap/serial_port# ./makeapp.sh
Setting target machine to ‘arm’
DEPRECATED: The ‘build’ keyword has been replaced by ‘override-build’
See http://snapcraft.io/docs/deprecation-notices/dn8 for more information.
Preparing to pull serial-tool
Pulling serial-tool
Preparing to build serial-tool
Building serial-tool
cc -Wall -O2 -c -o serial-tool.o serial-tool.c
serial-tool.c: In function 鈥[01mFantemIR_CodeBaseSend鈥
serial-tool.c:279:6: warning: unused variable 鈥[01miRet鈥[-Wunused-variable]
int iRet = 1;
^~~~
serial-tool.c: In function 鈥[01mFantemIR_IRLearn鈥
serial-tool.c:391:9: warning: unused variable 鈥[01miRet鈥[-Wunused-variable]
int iRet = 1;
^~~~
serial-tool.c: In function 鈥[01mFantemIR_IRSend鈥
serial-tool.c:468:9: warning: unused variable 鈥[01miRet鈥[-Wunused-variable]
int iRet = 1;
^~~~
serial-tool.c: In function 鈥[01mmain鈥
serial-tool.c:565:17: warning: unused variable 鈥[01mtermios_cur鈥[-Wunused-variable]
struct termios termios_cur;
^~~~~~~~~~~
serial-tool.c:563:16: warning: unused variable 鈥[01mSendLen鈥[-Wunused-variable]
int fdcom, i, SendLen, RecvLen,cmd;
^~~~~~~
cc serial-tool.o -o serial-tool
Staging serial-tool
Priming serial-tool
Failed to generate snap metadata: The specified command ‘serial-tool’ defined in the app ‘serial-tool’ does not exist or is not executable
snapcraft.yaml
name: fantem-serial-port
version: 1.0
summary: fantem gateway
description: |
Bootloader files and partitoning data to create a
bootable Ubuntu Core image for the Orange Pi Zero.
type: app
architectures:
- armhf
confinement: strict
grade: stable
apps:
serial-tool:
command: serial-tool
parts:
serial-tool:
plugin: dump
source: .
build: |
CROSS_COMPILE=arm-linux-gnueabihf- make
plugs:
serial-port:
interface: serial-port
makefileCFLAGS += -Wall -O2
prefix=/usr/local
NOTE: has to be /usr or snapcraft crashes
prefix=/usr
exec_prefix=$(prefix)
bindir=$(exec_prefix)/bin
all: serial-tool
serial-tool: serial-tool.o
serial-tool.o: serial-tool.c serial-tool.h
clean:
rm -f serial-tool.o serial-tool
install: serial-tool
install --directory $(DESTDIR)$(bindir)
install --strip -m 0755 serial-tool $(DESTDIR)$(bindir)