Skip to content

Commit

Permalink
fix: set default build version for debian changelog
Browse files Browse the repository at this point in the history
Change-Id: Ia1099685e8119ce050f3ee3a7bb9c39cec387496
  • Loading branch information
Iceyer committed Jan 16, 2018
1 parent 9083dbd commit ec6e2a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/DtkCore/DtkCoreConfig.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

set(INCLUDE_INSTALLED_DIR "/usr/include/libdtk-2.0/DCore")
set(INCLUDE_INSTALLED_DIR "/usr/include/libdtk-2.0.6/DCore")
set(DtkCore_LIBRARIES dtkcore)
include_directories("${INCLUDE_INSTALLED_DIR}")
8 changes: 7 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
export QT_SELECT = qt5

VERSION ?= $(shell if [ ! -f .git/config ];then dpkg-parsechangelog -ldebian/changelog -SVersion | awk -F'-' '{print $$1}'; fi)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export _VER=$(shell if [ ! -f .git/config ];then dpkg-parsechangelog -ldebian/changelog -SVersion | awk -F'-' '{print $$1}'; fi)
export _MAJ_VER=$(shell echo $$_VER|awk '{split($$0,vs,"."); if (length(vs[1]) == 0) print 0; else print int(vs[1]);}')
export _MIN_VER=$(shell echo $$_VER|awk '{split($$0,vs,"."); if (length(vs[2]) == 0) print 0; else print int(vs[2]);}')
export _PAT_VER=$(shell echo $$_VER|awk '{split($$0,vs,"."); if (length(vs[3]) == 0) print 0; else print int(vs[3]);}')
export _BUILD_VER=$(shell echo $$_VER|awk '{split($$0,vs,"."); if (length(vs[4]) != 0) print vs[4]; else { split(vs[3], pvs,"+r"); if (length(pvs[2]) != 0) print int(pvs[2]); else print 0;}}')
VERSION ?= $(shell echo $$_VER|awk '{ if (length($$0)!=0) printf "%s.%s.%s.%s",${_MAJ_VER},${_MIN_VER},${_PAT_VER},${_BUILD_VER}; else printf ""; }')

%:
dh $@ --parallel

Expand Down

0 comments on commit ec6e2a8

Please sign in to comment.