forked from SilentCircle/scpf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpkg.mk
More file actions
24 lines (19 loc) · 787 Bytes
/
pkg.mk
File metadata and controls
24 lines (19 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
include checks.mk
ifeq ($(GIT),)
$(error git is required for this build but is not on the path)
endif
ifneq ($(wildcard ./.git),)
DCH_COMMENT := $(shell $(GIT) log --oneline -1)
EXTRA_VERSION := $(shell $(GIT) describe --long | sed -re 's/^.*-([0-9]+)-([^-]+)$$/\1.\2/')
else
DCH_COMMENT := No .git dir, probably automated build
EXTRA_VERSION := 0
endif
DATE := $(shell date +'%Y-%m-%d')
DATETIME := $(shell date -u +'%Y%m%d%H%M%S')
OSNAME := $(shell lsb_release --short --id)
ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
VERSIONSTRING = $(PACKAGE) ($(PKG_VERSION) $(DATE)) $(OSNAME) $(ARCH)
PKG_VERSION := $(shell dpkg-parsechangelog --count 0 | awk '/^Version:/ { print $$2 }')
DCH_VERSION := $(PKG_VERSION)+0~$(DATETIME).$(EXTRA_VERSION)
DISTDIR = $(CURDIR)/_debian_build