]> gitweb.hhaalo.de Git - simple-backup.git/commitdiff
add build deb package
authorBastian Dehn <hhaalo@arcor.de>
Sun, 17 May 2026 09:54:42 +0000 (11:54 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 17 May 2026 09:54:42 +0000 (11:54 +0200)
Makefile
control

index 2936bd7172d11d5b4a5b81bb6536449fa9b7c2c0..66b544a6f27c5551d0d51476d470c96d7341a163 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,13 +13,12 @@ build: $(BINDIR)/backup \
        $(BINDIR)/backupmount \
        $(BINDIR)/restore
 
-package: build \
-       $(BUILDDIR)/DEBIAN/control
+package: $(BUILDDIR)/$(PACKAGENAME).deb
 
 clean:
        rm -rf build
 
-$(BUILDDIR)/DEBIAN/control:
+$(BUILDDIR)/$(PACKAGENAME)/DEBIAN/control:
        mkdir --parents $(@D)
        cat control | sed "s/\$$VERSION/$(VERSION)/" > $(@)
 
@@ -34,3 +33,13 @@ $(BINDIR)/backupmount:
 $(BINDIR)/restore:
        mkdir --parents $(@D)
        cp restore $(@)
+
+$(BUILDDIR)/$(PACKAGENAME).deb: \
+       $(BINDIR)/backup \
+       $(BINDIR)/backupmount \
+       $(BINDIR)/restore \
+       $(BUILDDIR)/$(PACKAGENAME)/DEBIAN/control
+
+       mkdir --parents $(@D)
+       umask 0022
+       cd build && dpkg-deb --build --root-owner-group $(PACKAGENAME)
diff --git a/control b/control
index e0a7e28e6ead3ec83e47b8b164aa5e9d91559bec..afa1eac81c8cf36d7be76c237275ac271255c8d2 100644 (file)
--- a/control
+++ b/control
@@ -2,6 +2,6 @@ Package: simple-backup
 Version: $VERSION
 Section: admin
 Priority: optional
-Architecture: x86_64
+Architecture: amd64
 Maintainer: Bastian Dehn <hhaalo@arcor.de>
 Description: backup bash script on rsync base