build: do not requite git to build.

Dev builds still needs git. The version number is based on git as well.

Fix  #132
This commit is contained in:
Alexandre Pujol 2023-04-30 20:23:08 +01:00
parent c9c5db9b9a
commit 83a339c683
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC

View file

@ -6,7 +6,6 @@
DESTDIR ?= / DESTDIR ?= /
BUILD := .build BUILD := .build
PKGNAME := apparmor.d PKGNAME := apparmor.d
VERSION := 0.$(shell git rev-list --count HEAD)-1
P = $(filter-out dpkg,$(notdir $(wildcard ${BUILD}/apparmor.d/*))) P = $(filter-out dpkg,$(notdir $(wildcard ${BUILD}/apparmor.d/*)))
.PHONY: all build enforce full install local $(P) pkg dpkg rpm tests lint clean .PHONY: all build enforce full install local $(P) pkg dpkg rpm tests lint clean
@ -74,10 +73,11 @@ pkg:
@makepkg --syncdeps --install --cleanbuild --force --noconfirm @makepkg --syncdeps --install --cleanbuild --force --noconfirm
dpkg: dpkg:
@dch --newversion="${VERSION}" --urgency=medium --distribution=stable --controlmaint "Release ${VERSION}" @dch --newversion="0.$(shell git rev-list --count HEAD)-1" --urgency=medium \
--distribution=stable --controlmaint "Release 0.$(shell git rev-list --count HEAD)-1"
@dpkg-buildpackage -b -d --no-sign @dpkg-buildpackage -b -d --no-sign
@sudo dpkg -i "../apparmor.d_${VERSION}_all.deb" @sudo dpkg -i "../apparmor.d_0.$(shell git rev-list --count HEAD)-1_all.deb"
@make clean @sudo make clean
rpm: rpm:
@make local @make local