-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (24 loc) · 744 Bytes
/
Makefile
File metadata and controls
30 lines (24 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.ONESHELL:
.SHELLFLAGS := -e -c
VERSION := $(shell rpmspec libdnf5-plugins-rhsm.spec --query --queryformat '%{version}')
# The 'build' target is not used during packaging; it is present for upstream development purposes.
.PHONY: build
build: clean
mkdir build
cd build
cmake ../
make
.PHONY: archive
archive:
git archive --prefix libdnf5-plugins-rhsm-$(VERSION)/ --format tar.gz HEAD > libdnf5-plugins-rhsm-$(VERSION).tar.gz
.PHONY: srpm
srpm: archive
rpmbuild --define "_sourcedir $$(pwd)" -bs libdnf5-plugins-rhsm.spec
.PHONY: rpm
rpm: archive
rpmbuild --define "_sourcedir $$(pwd)" -bb libdnf5-plugins-rhsm.spec
# The 'clean' target removes build artifacts.
.PHONY: clean
clean:
rm -rf build
rm -f libdnf5-plugins-rhsm-*.tar*