-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
30 lines (24 loc) · 915 Bytes
/
Makefile
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
VERSION := $(shell rpmspec -q hstsparser.spec --queryformat='%{version}')
RELEASE := $(shell rpmspec -q hstsparser.spec --queryformat='%{release}')
FEDORARELEASE := 38
tar:
mkdir -p rpmbuild/SOURCES/
tar --transform 's,^,hstsparser-$(VERSION)/,' -czvhf rpmbuild/SOURCES/hstsparser-$(VERSION).tar.gz hstsparser.spec pyproject.toml LICENSE hstsparser.py README.md .git
srpm: tar
rpmbuild -bs --define "_topdir `pwd`/rpmbuild" ./hstsparser.spec
ifdef outdir
cp ./rpmbuild/SRPMS/* $(outdir)
endif
rpm:
echo "Native building is deprecated. Use \`make mock\` instead."
exit 1
mock: srpm
mock -r fedora-$(FEDORARELEASE)-x86_64 ./rpmbuild/SRPMS/hstsparser-$(VERSION)-$(RELEASE).src.rpm
clean:
rm -rf rpmbuild fedora-review
fedora-review: clean srpm
rpm -q fedora-review || sudo dnf install fedora-review -y
rm -rf review-hstsparser
cp ./rpmbuild/SRPMS/*.src.rpm .
fedora-review -n hstsparser
rm -f *.rpm