mirror of
https://github.com/gwebu-team/profile.d.git
synced 2025-12-11 12:15:47 +00:00
Add a Makefile (dist, rpm, clean).
This commit is contained in:
parent
6d196f9627
commit
82b91c2bf0
1 changed files with 33 additions and 0 deletions
33
Makefile
Normal file
33
Makefile
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
SHELL:=/bin/bash # Use bash syntax, mitigates dash's printf on Debian
|
||||||
|
ver:=$(shell git describe --tags --always --match='v[0-9]*.[0-9]*' | cut -c 2-)
|
||||||
|
|
||||||
|
|
||||||
|
help:
|
||||||
|
@echo
|
||||||
|
@echo "▍Help"
|
||||||
|
@echo "▀▀▀▀▀▀"
|
||||||
|
@echo
|
||||||
|
@echo "Available targets:"
|
||||||
|
@echo " dist: create source distribution package in dist/"
|
||||||
|
@echo " rpm: create an RPM package"
|
||||||
|
@echo
|
||||||
|
@echo " clean: clean all generated files"
|
||||||
|
@echo
|
||||||
|
@echo "Version $(ver)."
|
||||||
|
.PHONY: help
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: dist
|
||||||
|
dist:
|
||||||
|
test -d dist || mkdir dist
|
||||||
|
git archive --prefix="profile.d-$(ver)/" HEAD | xz -9v > "dist/profile.d-$(ver).tar.xz"
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: rpm
|
||||||
|
rpm: dist
|
||||||
|
rpmbuild -ta "dist/profile.d-$(ver).tar.xz"
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -rf dist
|
||||||
Loading…
Add table
Add a link
Reference in a new issue