X-Git-Url: https://git.proxmox.com/?p=vncterm.git;a=blobdiff_plain;f=Makefile;h=4f275a2e04bf2d2e359b0f0cf19b467dc0930502;hp=a3b57fee2add3d6f9102f0b96ab3d04c9a865ecd;hb=e2e719fddffce0972a97680543153ba8489e0732;hpb=132fcb07f397efea44fe98ef6aedeab1d81554e0 diff --git a/Makefile b/Makefile index a3b57fe..4f275a2 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,8 @@ +include /usr/share/dpkg/pkg-info.mk +include /usr/share/dpkg/architecture.mk + PACKAGE=vncterm -# Note: also change version in debian/control and debian/changelog -VERSION=1.5 -PACKAGERELEASE=3 -ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) GITVERSION:=$(shell cat .git/refs/heads/master) -CDATE:=$(shell date +%F) VNCVER=0.9.11 VNCREL=LibVNCServer-${VNCVER} @@ -12,8 +10,11 @@ VNCDIR=libvncserver-${VNCREL} VNCSRC=${VNCREL}.tar.gz VNCLIB=${VNCDIR}/libvncserver/.libs/libvncserver.a -DEB=${PACKAGE}_${VERSION}-${PACKAGERELEASE}_${ARCH}.deb -SNAP=${PACKAGE}-${VERSION}-${CDATE}.tar.gz +DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb + +CPPFLAGS += -O2 -g -Wall -Wno-deprecated-declarations -D_GNU_SOURCE -I $(VNCDIR) + +VNC_LIBS := -lnsl -lpthread -lz -ljpeg -lutil -lgnutls -lpng all: vncterm @@ -34,8 +35,8 @@ ${VNCLIB}: ${VNCSRC} cd ${VNCDIR}; ./autogen.sh --without-ssl --without-websockets --without-tightvnc-filetransfer; cd ${VNCDIR}; $(MAKE) -vncterm: vncterm.c ${VNCLIB} wchardata.c - gcc -O2 -g -o $@ vncterm.c wchardata.c -Wall -Wno-deprecated-declarations -D_GNU_SOURCE -I ${VNCDIR} ${VNCLIB} -lnsl -lpthread -lz -ljpeg -lutil -lgnutls -lpng +vncterm: vncterm.c wchardata.c $(VNCLIB) + $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(VNC_LIBS) wchardata.c: cp /usr/share/unifont/$@ $@ @@ -57,17 +58,16 @@ dinstall: ${DEB} vncterm.1: vncterm.pod rm -f $@ - pod2man -n $< -s 1 -r ${VERSION} <$< >$@ + pod2man -n $< -s 1 -r ${DEB_VERSION_UPSTREAM} <$< >$@ .PHONY: deb deb: $(DEB) ${DEB}: $(MAKE) clean rsync -a . --exclude build build - echo "Architecture: ${ARCH}" >> build/debian/control echo "git clone git://git.proxmox.com/git/vncterm.git\\ngit checkout ${GIVERSION}" > build/debian/SOURCE cd build; dpkg-buildpackage -rfakeroot -b -us -uc - lintian ${DEB} + lintian ${DEB} .PHONY: upload upload: ${DEB} @@ -79,13 +79,3 @@ clean: .PHONY: distclean distclean: clean - -.PHONY: dist -${SNAP} dist: distclean - rm -rf ../${SNAP} - cd ..; tar cvzf ${SNAP} --exclude .svn ${PACKAGE} - mv ../${SNAP} ${SNAP} - -.PHONY: uploaddist -uploaddist: ${SNAP} - scp ${SNAP} pve.proxmox.com:/home/ftp/sources/