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 \
$(BUILDDIR)/$(PACKAGE)/$(LIBDIR)/flac.sh \
$(BUILDDIR)/$(PACKAGE)/$(SHAREDIR)/albentohandy.conf
+package: $(BUILDDIR)/$(PACKAGE).deb
+
test:
./tests/albentohandy.bats
./tests/vorbis.bats
$(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)
--- /dev/null
+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