summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2022-09-23 20:06:21 +0200
committerxengineering <me@xengineering.eu>2022-09-23 20:10:06 +0200
commit4a439a96abb04537152c99d170e84e79ae941ef1 (patch)
treed8636bab4c918bc71ea37d825139593f44c08ade
parentae91c75df75678d504fd3d1fd4fdf416df9296dd (diff)
downloadxbackup-4a439a96abb04537152c99d170e84e79ae941ef1.tar
xbackup-4a439a96abb04537152c99d170e84e79ae941ef1.tar.zst
xbackup-4a439a96abb04537152c99d170e84e79ae941ef1.zip
Refactor folder structure
This removes the `install` target. Should be re-introduced later.
-rw-r--r--Makefile22
-rwxr-xr-x[-rw-r--r--]main.py (renamed from src/scripts/xbackup)0
-rw-r--r--setup.py (renamed from src/setup.py)4
-rw-r--r--src/.gitignore1
-rw-r--r--src/Makefile19
-rw-r--r--src/debug.py18
-rw-r--r--xbackup/__init__.py (renamed from src/xbackup/__init__.py)0
-rw-r--r--xbackup/backup.py (renamed from src/xbackup/backup.py)0
-rw-r--r--xbackup/config.py (renamed from src/xbackup/config.py)0
-rw-r--r--xbackup/prune.py (renamed from src/xbackup/prune.py)0
-rw-r--r--xbackup/script.py (renamed from src/xbackup/script.py)0
-rw-r--r--xbackup/utils.py (renamed from src/xbackup/utils.py)0
12 files changed, 5 insertions, 59 deletions
diff --git a/Makefile b/Makefile
index 6a4c10e..d9dcf55 100644
--- a/Makefile
+++ b/Makefile
@@ -1,29 +1,13 @@
# vim: shiftwidth=4 softtabstop=4 tabstop=4 noexpandtab
-
-DESTDIR="" # leave empty for the current system or provide a fakeroot here
-PREFIX="/usr"
-
-
-.PHONY: all clean install tarball
-
+.PHONY: all clean tarball
all:
- make -C src all
-
+ python setup.py build
clean:
find . -type d -iname '__pycache__' -exec rm -rf {} +;
- make -C src clean
-
-
-install: all
- install -Dm 644 config/default.json $(DESTDIR)/etc/xbackup/config.json
- mkdir -p $(DESTDIR)/var/lib/xbackup/borg
- chown -R root:root $(DESTDIR)/var/lib/xbackup
- chmod -R 700 $(DESTDIR)/var/lib/xbackup
- make -C src install DESTDIR=$(abspath $(DESTDIR))
-
+ rm -rf build
tarball: clean
tar --exclude-vcs -cvf xbackup.tar *
diff --git a/src/scripts/xbackup b/main.py
index 569202e..569202e 100644..100755
--- a/src/scripts/xbackup
+++ b/main.py
diff --git a/src/setup.py b/setup.py
index 0ba6d7a..f83b318 100644
--- a/src/setup.py
+++ b/setup.py
@@ -13,11 +13,11 @@ from distutils.core import setup
setup(
name="xbackup",
- version="1.0.0",
+ version="1.0.0-dev",
description="Convenience wrapper around the Borg backup tool",
author="xengineering",
author_email="me@xengineering.eu",
url="https://xengineering.eu",
packages=["xbackup"],
- scripts=["scripts/xbackup"],
+ scripts=["main.py"],
)
diff --git a/src/.gitignore b/src/.gitignore
deleted file mode 100644
index 378eac2..0000000
--- a/src/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-build
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index 5401e84..0000000
--- a/src/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# vim: shiftwidth=4 softtabstop=4 tabstop=4 noexpandtab
-
-
-DESTDIR="" # leave empty for the current system or provide a fakeroot here
-
-
-.PHONY: all clean install
-
-
-all:
- python3 setup.py build
-
-
-clean:
- rm -rf build
-
-
-install: all
- python3 setup.py install --root=$(DESTDIR) --optimize=1 --skip-build
diff --git a/src/debug.py b/src/debug.py
deleted file mode 100644
index 1deaf45..0000000
--- a/src/debug.py
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/python3
-# vim: shiftwidth=4 softtabstop=4 tabstop=4 expandtab
-
-
-"""A Debug Script for Development Purposes"""
-
-
-from xbackup import script
-
-
-def main():
- """main function of this script"""
-
- script.run()
-
-
-if __name__ == "__main__":
- main()
diff --git a/src/xbackup/__init__.py b/xbackup/__init__.py
index e69de29..e69de29 100644
--- a/src/xbackup/__init__.py
+++ b/xbackup/__init__.py
diff --git a/src/xbackup/backup.py b/xbackup/backup.py
index 8378977..8378977 100644
--- a/src/xbackup/backup.py
+++ b/xbackup/backup.py
diff --git a/src/xbackup/config.py b/xbackup/config.py
index 4c72915..4c72915 100644
--- a/src/xbackup/config.py
+++ b/xbackup/config.py
diff --git a/src/xbackup/prune.py b/xbackup/prune.py
index 7e57830..7e57830 100644
--- a/src/xbackup/prune.py
+++ b/xbackup/prune.py
diff --git a/src/xbackup/script.py b/xbackup/script.py
index 9d80603..9d80603 100644
--- a/src/xbackup/script.py
+++ b/xbackup/script.py
diff --git a/src/xbackup/utils.py b/xbackup/utils.py
index e1480d1..e1480d1 100644
--- a/src/xbackup/utils.py
+++ b/xbackup/utils.py