Skip to content

Commit

Permalink
New build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudd-O committed Feb 22, 2024
1 parent 8aed29e commit b7381ef
Show file tree
Hide file tree
Showing 31 changed files with 2,777 additions and 2,828 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@
*egg-info
dist
build
__pycache__
.tox
.mypy_cache
.pytest_cache
*.rpm
*.tar.gz
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://github.com/Rudd-O/shared-jenkins-libraries
@Library('shared-jenkins-libraries@master') _

genericFedoraRPMPipeline()
genericFedoraRPMPipeline(null, buildStrategyMakeSRPM(), null, null, testStrategyMakeTest())
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ include TODO
include README.md
include contrib/*
include doc/bitcoin.png
include *.spec
include bin/*
include tox.ini
include mypy.ini
24 changes: 21 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
nothing:
true
ROOT_DIR := $(shell dirname "$(realpath $(MAKEFILE_LIST))")

.PHONY = test install dist rpm srpm clean

test:
cd $(ROOT_DIR) && \
tox --current-env

install:
if test x"$(DESTDIR)" = x; then echo "DESTDIR unset."; exit 1; fi
Expand All @@ -12,4 +17,17 @@ install:
cp contrib/sudoers.zfs-tools $(DESTDIR)/etc/sudoers.d/zfs-shell
chmod 440 $(DESTDIR)/etc/sudoers.d/zfs-shell

.PHONY = install
clean:
cd $(ROOT_DIR) && find -name '*~' -print0 | xargs -0r rm -fv && rm -fr *.tar.gz *.rpm src/*.egg-info *.egg-info dist build

dist: clean
cd $(ROOT_DIR) || exit $$? ; python3 -m build

srpm: dist
@which rpmbuild || { echo 'rpmbuild is not available. Please install the rpm-build package with the command `dnf install rpm-build` to continue, then rerun this step.' ; exit 1 ; }
cd $(ROOT_DIR) || exit $$? ; rpmbuild --define "_srcrpmdir ." -ts dist/`rpmspec -q --queryformat '%{name}-%{version}.tar.gz\n' *spec | head -1`

rpm: dist
@which rpmbuild || { echo 'rpmbuild is not available. Please install the rpm-build package with the command `dnf install rpm-build` to continue, then rerun this step.' ; exit 1 ; }
cd $(ROOT_DIR) || exit $$? ; rpmbuild --define "_srcrpmdir ." --define "_rpmdir builddir.rpm" -ta dist/`rpmspec -q --queryformat '%{name}-%{version}.tar.gz\n' *spec | head -1`
cd $(ROOT_DIR) ; mv -f builddir.rpm/*/* . && rm -rf builddir.rpm
287 changes: 0 additions & 287 deletions bin/zbackup

This file was deleted.

Loading

0 comments on commit b7381ef

Please sign in to comment.