pve-vncterm/vncterm/Makefile

82 lines
2.4 KiB
Makefile
Raw Normal View History

2020-09-04 09:35:25 +00:00
include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/architecture.mk
2016-06-06 14:24:53 +00:00
PACKAGE=vncterm
2017-07-19 07:39:44 +00:00
GITVERSION:=$(shell cat .git/refs/heads/master)
2016-06-06 14:24:53 +00:00
2020-09-04 09:35:25 +00:00
VNCVER=0.9.13
2017-07-19 07:39:44 +00:00
VNCREL=LibVNCServer-${VNCVER}
VNCDIR=libvncserver-${VNCREL}
VNCSRC=${VNCREL}.tar.gz
2020-09-04 09:35:25 +00:00
VNCLIB=${VNCDIR}/libvncserver.a
DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
2021-09-29 15:17:45 +00:00
DBG_DEB=${PACKAGE}-dbgysm_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
2020-09-04 09:35:25 +00:00
CPPFLAGS += -O2 -g -Wall -Wno-deprecated-declarations -D_GNU_SOURCE -I $(VNCDIR)
2016-06-06 14:24:53 +00:00
2020-09-04 09:35:25 +00:00
VNC_LIBS := -lnsl -lpthread -lz -ljpeg -lutil -lgnutls -lpng
2016-06-06 14:24:53 +00:00
all: vncterm
2017-07-19 07:39:44 +00:00
font.data: genfont2
./genfont2 -o font.data.tmp -i /usr/share/unifont/unifont.hex
mv font.data.tmp font.data
2016-06-06 14:24:53 +00:00
2017-07-19 07:39:44 +00:00
genfont2: genfont2.c
gcc -g -O2 -o $@ genfont2.c -Wall -Wextra -D_GNU_SOURCE -lz
2016-06-06 14:24:53 +00:00
.PHONY: vnc
2017-07-19 07:39:44 +00:00
vnc: ${VNCLIB}
${VNCLIB}: ${VNCSRC}
2016-06-06 14:24:53 +00:00
rm -rf ${VNCDIR}
tar xf ${VNCSRC}
ln -s ../vncpatches ${VNCDIR}/patches
cd ${VNCDIR}; quilt push -a
2020-09-04 09:35:25 +00:00
cd ${VNCDIR}; cmake -D WITH_GNUTLS=OFF -D WITH_OPENSSL=OFF -D WITH_WEBSOCKETS=OFF -D WITH_SYSTEMD=OFF -D WITH_TIGHTVNC_FILETRANSFER=OFF -D WITH_GCRYPT=OFF -D WITH_LZO=OFF -D BUILD_SHARED_LIBS=OFF .; cmake --build .
2017-07-19 07:39:44 +00:00
2020-09-04 09:35:25 +00:00
vncterm: vncterm.c wchardata.c $(VNCLIB)
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(VNC_LIBS)
2017-07-19 07:39:44 +00:00
wchardata.c:
cp /usr/share/unifont/$@ $@
2016-06-06 14:24:53 +00:00
.PHONY: install
2017-07-19 07:39:44 +00:00
install: vncterm vncterm.1 font.data
2016-06-06 14:24:53 +00:00
mkdir -p ${DESTDIR}/usr/share/doc/${PACKAGE}
2017-07-19 07:39:44 +00:00
install -m 0644 copyright ${DESTDIR}/usr/share/doc/${PACKAGE}
mkdir -p ${DESTDIR}/usr/share/${PACKAGE}
install -m 0644 font.data ${DESTDIR}/usr/share/${PACKAGE}
2016-06-06 14:24:53 +00:00
mkdir -p ${DESTDIR}/usr/share/man/man1
2017-07-19 07:39:44 +00:00
install -m 0644 vncterm.1 ${DESTDIR}/usr/share/man/man1
2016-06-06 14:24:53 +00:00
mkdir -p ${DESTDIR}/usr/bin
2021-09-29 15:17:45 +00:00
install -m 0755 vncterm ${DESTDIR}/usr/bin
2016-06-06 14:24:53 +00:00
.PHONY: dinstall
dinstall: ${DEB}
dpkg -i ${DEB}
vncterm.1: vncterm.pod
rm -f $@
2020-09-04 09:35:25 +00:00
pod2man -n $< -s 1 -r ${DEB_VERSION_UPSTREAM} <$< >$@
2016-06-06 14:24:53 +00:00
.PHONY: deb
2017-07-19 07:39:44 +00:00
deb: $(DEB)
${DEB}:
$(MAKE) clean
rsync -a . --exclude build build
echo "git clone git://git.proxmox.com/git/vncterm.git\\ngit checkout ${GIVERSION}" > build/debian/SOURCE
cd build; dpkg-buildpackage -rfakeroot -b -us -uc
2020-09-04 09:35:25 +00:00
lintian ${DEB}
2016-06-06 14:24:53 +00:00
.PHONY: upload
upload: ${DEB}
2021-09-29 15:17:45 +00:00
tar cf - ${DEB} ${DBG_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist bullseye
2016-06-06 14:24:53 +00:00
.PHONY: clean
clean:
2017-07-19 07:39:44 +00:00
rm -rf vncterm vncterm.1 vncterm_*.deb genfont genfont2 *~ ${VNCDIR} vncterm-*.tar.gz glyph.h.tmp build *.changes wchardata.c font.data.tmp font.data *.buildinfo
2016-06-06 14:24:53 +00:00
.PHONY: distclean
distclean: clean