-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
20 lines (14 loc) · 1.03 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
VERSION?=0.1.0
DIST=$(shell rpm --eval %{dist})
rpmbuild/.rpmsetuptree:
mkdir -p rpmbuild/BUILD rpmbuild/SOURCES rpmbuild/RPMS rpmbuild/SRPMS rpmbuild/SPECS
touch rpmbuild/.rpmsetuptree
rpmbuild/SOURCES/dnf-plugin-azure-auth-$(VERSION).tar.gz: rpmbuild/.rpmsetuptree azure_auth.conf azure_auth.py
tar czf dnf-plugin-azure-auth-$(VERSION).tar.gz --xform "s+^+dnf-plugin-azure-auth-$(VERSION)/+" azure_auth.conf azure_auth.py
mv dnf-plugin-azure-auth-$(VERSION).tar.gz rpmbuild/SOURCES/
rpmbuild/SPECS/dnf-plugin-azure-auth.spec: dnf-plugin-azure-auth.spec rpmbuild/.rpmsetuptree
cp dnf-plugin-azure-auth.spec rpmbuild/SPECS/
sed -i "s/%%version%%/$(VERSION)/" rpmbuild/SPECS/dnf-plugin-azure-auth.spec
rpmbuild/RPMS/x86_64/dnf-plugin-azure-auth-$(VERSION)-1$(DIST).x86_64.rpm: rpmbuild/SPECS/dnf-plugin-azure-auth.spec rpmbuild/SOURCES/dnf-plugin-azure-auth-$(VERSION).tar.gz
rpmbuild -D "_topdir $(shell pwd)/rpmbuild" -ba rpmbuild/SPECS/dnf-plugin-azure-auth.spec
rpm: rpmbuild/RPMS/x86_64/dnf-plugin-azure-auth-$(VERSION)-1$(DIST).x86_64.rpm