diff --git a/Makefile b/Makefile index 253ae932..d60bc574 100644 --- a/Makefile +++ b/Makefile @@ -98,6 +98,9 @@ strip: $($(ARCH)STRIP) $(BIN) clean: $(RM) $(BIN) $(OBJECTS) *.o *.d *.bak *~ + $(RM) -r dpkg_build + $(RM) dvmhost_1.0.0* dvmhost-dbgsym*.deb + -$(RM) dvmhost.service install: all mkdir -p /opt/dvm/bin || true @@ -118,6 +121,12 @@ install: all sed -i 's/file: tg_acl.dat/file: \/opt\/dvm\/tg_acl.dat/' /opt/dvm/config.yml mkdir -p /opt/dvm/log || true +dpkg: clean + tar -caf ../dvmhost_1.0.0.orig.tar.gz --exclude=.git --exclude=.gitattributes --exclude=.gitignore --exclude=.vscode -v . + mv ../dvmhost_1.0.0.orig.tar.gz . + mkdir -p dpkg_build + cd dpkg_build; tar xvf ../dvmhost_1.0.0.orig.tar.gz .; debuild -us -uc + install-service: install @useradd --user-group -M --system dvmhost --shell /bin/false || true @usermod --groups dialout --append dvmhost || true diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..6381a503 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +dvmhost (1.0.0-1) UNRELEASED; urgency=medium + + * Initial release. + + -- MAINTAINER Fri, 11 May 2018 09:13:00 -0400 diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..f599e28b --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..74f1faed --- /dev/null +++ b/debian/control @@ -0,0 +1,11 @@ +Source: dvmhost +Maintainer: Bryan Biedenkapp +Section: misc +Priority: optional +Standards-Version: 3.9.2 +Build-Depends: debhelper (>= 9) + +Package: dvmhost +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Digital Voice Modem Host diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..13765c04 --- /dev/null +++ b/debian/copyright @@ -0,0 +1 @@ +DVMProject Developers diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..53acd5a3 --- /dev/null +++ b/debian/rules @@ -0,0 +1,22 @@ +#!/usr/bin/make -f +install_root = /opt +build_root = $$(pwd)/debian/dvmhost + +%: + dh $@ --with=systemd + +override_dh_installinit: + dh_systemd_enable -pdvmhost --name=dvmhost linux/dvmhost.service + dh_installinit -pdvmhost --no-start --noscripts + dh_systemd_start -pdvmhost --no-restart-on-upgrade + +override_dh_systemd_start: + echo "Not running dh_systemd_start" + +override_dh_auto_install: + dh_auto_install + mkdir -p $(build_root)/opt/dvm || true + mkdir -p $(build_root)/opt/dvm/bin || true + mkdir -p $(build_root)/opt/dvm/log || true + cp -Rv $(install_root)/dvm $(build_root)/opt + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 00000000..774e5604 --- /dev/null +++ b/debian/source/options @@ -0,0 +1,4 @@ +tar-ignore = ".vscode" +tar-ignore = ".git" +tar-ignore = ".gitignore" +tar-ignore = ".gitattributes"