2011-08-23 09:52:28 +04:00
PACKAGE = vncterm
2013-03-27 13:27:36 +04:00
# Note: also change version in debian/control and debian/changelog
2017-03-10 12:20:28 +03:00
VERSION = 1.4
2017-05-06 09:10:17 +03:00
PACKAGERELEASE = 2
2011-08-23 09:52:28 +04:00
ARCH := $( shell dpkg-architecture -qDEB_BUILD_ARCH)
2017-05-24 12:37:48 +03:00
GITVERSION := $( shell cat .git/refs/heads/master)
2011-08-23 09:52:28 +04:00
CDATE := $( shell date +%F)
2017-02-02 13:51:53 +03:00
VNCVER = 0.9.11
VNCREL = LibVNCServer-${ VNCVER }
VNCDIR = libvncserver-${ VNCREL }
VNCSRC = ${ VNCREL } .tar.gz
2011-08-23 09:52:28 +04:00
VNCLIB = ${ VNCDIR } /libvncserver/.libs/libvncserver.a
DEB = ${ PACKAGE } _${ VERSION } -${ PACKAGERELEASE } _${ ARCH } .deb
SNAP = ${ PACKAGE } -${ VERSION } -${ CDATE } .tar.gz
all : vncterm
glyphs.h : genfont
2017-02-02 12:13:09 +03:00
./genfont > glyphs.h.tmp
mv glyphs.h.tmp glyphs.h
2011-08-23 09:52:28 +04:00
genfont : genfont .c
gcc -g -O2 -o $@ genfont.c -Wall -D_GNU_SOURCE -lz
.PHONY : vnc
${VNCLIB} vnc : ${VNCSRC }
rm -rf ${ VNCDIR }
tar xf ${ VNCSRC }
ln -s ../vncpatches ${ VNCDIR } /patches
cd ${ VNCDIR } ; quilt push -a
2017-02-02 13:51:53 +03:00
cd ${ VNCDIR } ; ./autogen.sh --without-ssl --without-websockets --without-tightvnc-filetransfer;
2011-08-23 09:52:28 +04:00
cd ${ VNCDIR } ; make
vncterm : vncterm .c glyphs .h ${VNCLIB }
2017-02-02 13:51:53 +03:00
gcc -O2 -g -o $@ vncterm.c -Wall -Wno-deprecated-declarations -D_GNU_SOURCE -I ${ VNCDIR } ${ VNCLIB } -lnsl -lpthread -lz -ljpeg -lutil -lgnutls -lpng
2011-08-23 09:52:28 +04:00
.PHONY : install
2017-03-10 13:03:01 +03:00
install : vncterm vncterm .1
2011-08-23 09:52:28 +04:00
mkdir -p ${ DESTDIR } /usr/share/doc/${ PACKAGE }
2017-05-24 12:37:48 +03:00
install -m 0644 copyright ${ DESTDIR } /usr/share/doc/${ PACKAGE }
2011-08-23 09:52:28 +04:00
mkdir -p ${ DESTDIR } /usr/share/man/man1
2017-05-24 12:37:48 +03:00
install -m 0644 vncterm.1 ${ DESTDIR } /usr/share/man/man1
2011-08-23 09:52:28 +04:00
mkdir -p ${ DESTDIR } /usr/bin
install -s -m 0755 vncterm ${ DESTDIR } /usr/bin
.PHONY : dinstall
dinstall : ${DEB }
dpkg -i ${ DEB }
vncterm.1 : vncterm .pod
rm -f $@
pod2man -n $< -s 1 -r ${ VERSION } <$< >$@
.PHONY : deb
2017-02-07 17:42:24 +03:00
deb : $( DEB )
${DEB} :
2011-08-23 09:52:28 +04:00
make clean
2017-05-24 12:37:48 +03:00
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
2011-08-23 09:52:28 +04:00
lintian ${ DEB }
.PHONY : upload
upload : ${DEB }
2017-03-10 12:20:28 +03:00
tar cf - ${ DEB } | ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist stretch
2011-08-23 09:52:28 +04:00
.PHONY : clean
clean :
2017-05-24 12:37:48 +03:00
rm -rf vncterm vncterm.1 vncterm_*.deb genfont *~ ${ VNCDIR } vncterm-*.tar.gz glyph.h.tmp build *.changes
2011-08-23 09:52:28 +04:00
.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 }
2015-02-27 22:00:46 +03:00
scp ${ SNAP } pve.proxmox.com:/home/ftp/sources/