-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
27 lines (24 loc) · 952 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
RPMBUILD = rpmbuild --define "_topdir %(pwd)/build" \
--define "_builddir %{_topdir}" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
--define "_sourcedir %(pwd)"
all:
mkdir -p build
date --utc +%Y%m%d%H%M%S > VERSION
${RPMBUILD} --define "_version %(cat VERSION)" -ba rockit-diskspace.spec
${RPMBUILD} --define "_version %(cat VERSION)" -ba python3-rockit-diskspace.spec
mv build/noarch/*.rpm .
rm -rf build VERSION
install:
@date --utc +%Y%m%d%H%M%S > VERSION
@python3 -m build --outdir .
@sudo pip3 install rockit.diskspace-$$(cat VERSION)-py3-none-any.whl
@rm VERSION
@sudo cp diskspaced diskspace /bin/
@sudo cp diskspaced@.service /usr/lib/systemd/system/
@sudo cp completion/diskspace /etc/bash_completion.d/
@sudo install -d /etc/diskspaced
@echo ""
@echo "Installed server, client, and service files."
@echo "Now copy the relevant json config files to /etc/diskspaced/"