Added package build

This commit is contained in:
df 2020-08-15 13:02:47 +01:00
parent 84d73a69d7
commit 96fc581a91
3 changed files with 28 additions and 9 deletions

View File

@ -1,3 +1,8 @@
#
# Makefile for usqlite
#
.PHONY: all clean opkg release
MAKE=gmake
@ -15,7 +20,6 @@ CFLAGS=-g -std=c99
INCS=
LIBS=
#CFLAGS=-g -O3 -fno-strict-aliasing
#WARN=-pedantic -Wall -Wnested-externs -Wpointer-arith -Werror -Wno-unused
WARN=-pedantic -Wall -W -Wnested-externs -Wpointer-arith -Wno-long-long
PLATFORM=$(shell uname -s | cut -d- -f1)
@ -25,10 +29,6 @@ endif
all: usqlite
install: usqlite
strip $<
cp $< /mod/bin/
usqlite: ${OBJS}
@echo "Linking..."
@-[ -f $@ ] && mv $@ $@~ || exit 0
@ -41,16 +41,27 @@ usqlite: ${OBJS}
@echo "Done..."
clean:
@-touch core
rm -f usqlite usqlite~ core ${OBJS}
#tags:
# @-ctags *.[ch] 2>> /dev/null
.c.o:
@echo " $<"
@$(CC) $(CFLAGS) ${WARN} ${DEFS} ${INCS} -c $< -o $@
${OBJS}: ${HDRS}
usqlite.stripped: usqlite
strip -o $@ $<
install: usqlite.stripped
install $< /mod/bin/$(basename $(notdir $<))
opkg: usqlite.stripped $(wildcard opkg/CONTROL/*)
install -D -p usqlite opkg/boot/$(basename $(notdir $<))
opkg-pack opkg
release: opkg
tagname=$$(echo usqlite*.opk | sed -n 'p;q') && \
tagname="$${tagname%_*.*}" && \
test -n "$${tagname}" && \
git tag -f -a -m "Release $${tagname}" "$${tagname}"

8
opkg/CONTROL/control Normal file
View File

@ -0,0 +1,8 @@
Package: usqlite
Priority: optional
Section: database
Version: 0.3
Architecture: mipsel
Maintainer: fieldhouse@gmx.net
Depends:
Description: Minimal SQLite exec tool

BIN
opkg/boot/usqlite Executable file

Binary file not shown.