-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (31 loc) · 903 Bytes
/
Makefile
File metadata and controls
41 lines (31 loc) · 903 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
31
32
33
34
35
36
37
38
39
40
41
NAME = hpc_eff
VERSION = 0.1
RELEASE = 1
RPMDIR = $(HOME)/rpmbuild
TARBALL = dist/$(NAME)-$(VERSION).tar.gz
SPECFILE = $(RPMDIR)/SPECS/$(NAME).spec
RPMFILE = $(RPMDIR)/RPMS/noarch/$(NAME)-$(VERSION)-1.noarch.rpm
.PHONY: all clean sdist rpm install reinstall rpmdevdirs
all: build
build: clean rpmdevdirs sdist rpm install
clean:
rm -rf build/ dist/ src/$(NAME).egg-info/
rm -rf $(RPMDIR)/BUILD/$(NAME)-$(VERSION)
rm -rf $(RPMDIR)/BUILDROOT/$(NAME)-$(VERSION)-1.x86_64
rm -f $(RPMFILE)
rpmdevdirs:
@mkdir -p $(RPMDIR)/{BUILD,RPMS,SOURCES,SPECS,SRPMS,BUILDROOT}
cp hpc_eff.spec $(RPMDIR)/SPECS/
sdist:
python3 setup.py sdist
cp $(TARBALL) $(RPMDIR)/SOURCES/
rpm:
rpmbuild -ba $(SPECFILE) \
--define "version $(VERSION)" \
--define "release $(RELEASE)"
install:
sudo dnf install -y $(RPMFILE)
reinstall:
sudo rpm -Uvh --replacepkgs $(RPMFILE)
uninstall:
sudo rpm -e $(NAME)