-RELEASE=4.0
+RELEASE=5.0
PACKAGE=spiceterm
-VERSION=2.0
-PACKAGERELEASE=1
+VERSION=3.0
+PACKAGERELEASE=5
ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
GITVERSION:=$(shell cat .git/refs/heads/master)
HEADERS=translations.h event_loop.h glyphs.h spiceterm.h keysyms.h
SOURCES=screen.c event_loop.c input.c spiceterm.c auth-pve.c
+PKGS := glib-2.0 spice-protocol spice-server
+CFLAGS += `pkg-config --cflags $(PKGS)`
+LIBS += `pkg-config --libs $(PKGS)`
+
#export G_MESSAGES_DEBUG=all
#export SPICE_DEBUG=1
all: ${PROGRAMS}
spiceterm: ${SOURCES} ${HEADERS} spiceterm.c
- gcc -Werror -Wall -Wl,-z,relro -Wtype-limits ${SOURCES} -g -O2 -o $@ -lutil $(shell pkg-config) $(shell pkg-config --cflags --libs gthread-2.0,spice-protocol,spice-server,libsasl2)
+ gcc -Werror -Wall -Wl,-z,relro -Wtype-limits ${SOURCES} -g -O2 $(CFLAGS) -o $@ -lutil $(LIBS)
genfont: genfont.c
gcc -g -O2 -o $@ genfont.c -Wall -D_GNU_SOURCE -lz
.PHONY: upload
upload: ${DEB}
- umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
- mkdir -p /pve/${RELEASE}/extra
- rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
- rm -f /pve/${RELEASE}/extra/Packages*
- cp ${DEB} /pve/${RELEASE}/extra
- cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
- umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
+ tar cf - ${DEB} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}
.PHONY: test
test: spiceterm