]> gitweb.hhaalo.de Git - albentohandy.git/commitdiff
add build deb package
authorBastian Dehn <hhaalo@arcor.de>
Sat, 26 Sep 2026 10:51:59 +0000 (12:51 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 26 Sep 2026 14:33:05 +0000 (16:33 +0200)
Makefile
src/debian/control [new file with mode: 0644]

index 5a3586b51d8960cb2f6f9739394724a5fba79114..addfba9cefbc3f1a29cf0a67746baab21ada2c0d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,9 +8,9 @@ LIBDIR=usr/lib/$(NAME)
 SHAREDIR=usr/share/doc/$(NAME)
 PACKAGE=$(NAME)_$(VERSION)-$(REVISION)_x86_64
 
-.PHONY: all build test clean
+.PHONY: all build test clean package
 
-all: build test
+all: test package
 
 build: $(BUILDDIR)/$(PACKAGE)/$(BINDIR)/albentohandy \
        $(BUILDDIR)/$(PACKAGE)/$(LIBDIR)/vorbis.sh \
@@ -19,6 +19,8 @@ build: $(BUILDDIR)/$(PACKAGE)/$(BINDIR)/albentohandy \
        $(BUILDDIR)/$(PACKAGE)/$(LIBDIR)/flac.sh \
        $(BUILDDIR)/$(PACKAGE)/$(SHAREDIR)/albentohandy.conf
 
+package: $(BUILDDIR)/$(PACKAGE).deb
+
 test:
        ./tests/albentohandy.bats
        ./tests/vorbis.bats
@@ -56,4 +58,19 @@ $(BUILDDIR)/$(PACKAGE)/$(LIBDIR)/flac.sh:
 
 $(BUILDDIR)/$(PACKAGE)/$(SHAREDIR)/albentohandy.conf:
        mkdir --parents $(@D)
-       cp $(SRCDIR)/albentohandy.conf $(@)
\ No newline at end of file
+       cp $(SRCDIR)/albentohandy.conf $(@)
+
+$(BUILDDIR)/$(PACKAGE)/DEBIAN/control:
+       mkdir --parents $(@D)
+       sed 's/@VERSION@/$(VERSION)/' $(SRCDIR)/debian/control > $(@)
+
+$(BUILDDIR)/$(PACKAGE).deb: $(BUILDDIR)/$(PACKAGE)/$(BINDIR)/albentohandy \
+       $(BUILDDIR)/$(PACKAGE)/$(LIBDIR)/vorbis.sh \
+       $(BUILDDIR)/$(PACKAGE)/$(LIBDIR)/mp3.sh \
+       $(BUILDDIR)/$(PACKAGE)/$(LIBDIR)/opus.sh \
+       $(BUILDDIR)/$(PACKAGE)/$(LIBDIR)/flac.sh \
+       $(BUILDDIR)/$(PACKAGE)/$(SHAREDIR)/albentohandy.conf \
+       $(BUILDDIR)/$(PACKAGE)/DEBIAN/control
+       mkdir --parents $(@D)
+       umask 0022
+       cd build && dpkg-deb --build --root-owner-group $(PACKAGE)
diff --git a/src/debian/control b/src/debian/control
new file mode 100644 (file)
index 0000000..5b368dd
--- /dev/null
@@ -0,0 +1,9 @@
+Package: albentohandy
+Version: @VERSION@
+Priority: optional
+Section: sound
+Maintainer: Bastian Dehn <hhaalo@arcor.de>
+Architecture: amd64
+Depends: rsync (>=3.4.1+ds1-5+deb13u4), coreutils (>=3.4.1+ds1-5+deb13u4), flac (>=3.4.1+ds1-5+deb13u4), lame (>=3.100-6+b3), eyed3 (>=0.9.7-2), parallel (>=20240222+ds-2), opus-tools (>=0.2-1+b3), vorbis-tools (>=1.4.3-1)
+Description: encode flac's from music collection
+ It can encode flacs into mp3, vorbis (.ogg) or opus with cover