From e249941611607ecdab15ed8b7be316be07006932 Mon Sep 17 00:00:00 2001 From: Janis Streib Date: Fri, 2 Dec 2022 02:42:03 +0100 Subject: [PATCH] ADD: debian control files --- debian/.gitignore | 9 +++++++ debian/README.Debian | 6 +++++ debian/README.source | 10 ++++++++ debian/aes67-linux-dkms.dkms | 1 + debian/aes67-linux.docs | 2 ++ debian/aes67-linux.service | 19 ++++++++++++++ debian/changelog | 5 ++++ debian/config/aes67-dkms.dkms | 7 ++++++ debian/config/daemon.json | 27 ++++++++++++++++++++ debian/control | 28 +++++++++++++++++++++ debian/copyright | 43 ++++++++++++++++++++++++++++++++ debian/rules | 47 +++++++++++++++++++++++++++++++++++ debian/source/format | 1 + 13 files changed, 205 insertions(+) create mode 100644 debian/.gitignore create mode 100644 debian/README.Debian create mode 100644 debian/README.source create mode 100644 debian/aes67-linux-dkms.dkms create mode 100644 debian/aes67-linux.docs create mode 100644 debian/aes67-linux.service create mode 100644 debian/changelog create mode 100644 debian/config/aes67-dkms.dkms create mode 100644 debian/config/daemon.json create mode 100644 debian/control create mode 100644 debian/copyright create mode 100755 debian/rules create mode 100644 debian/source/format diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..71f4703 --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,9 @@ +*.debhelper +*.substvars +/aes67-linux-ui/ +/aes67-linux/ +/aes67-linux-dkms/ +/.debhelper/ +files +*.log +debhelper-build-stamp diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..189cbe5 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,6 @@ +aes67-linux for Debian +--------------------- + + + + -- root Thu, 01 Dec 2022 19:04:00 +0100 diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 0000000..3b6adaf --- /dev/null +++ b/debian/README.source @@ -0,0 +1,10 @@ +aes67-linux for Debian +--------------------- + + + + + + -- root Thu, 01 Dec 2022 19:04:00 +0100 + diff --git a/debian/aes67-linux-dkms.dkms b/debian/aes67-linux-dkms.dkms new file mode 100644 index 0000000..ca43dfb --- /dev/null +++ b/debian/aes67-linux-dkms.dkms @@ -0,0 +1 @@ +debian/config/aes67-dkms.dkms diff --git a/debian/aes67-linux.docs b/debian/aes67-linux.docs new file mode 100644 index 0000000..efea0a6 --- /dev/null +++ b/debian/aes67-linux.docs @@ -0,0 +1,2 @@ +README.Debian +README.source diff --git a/debian/aes67-linux.service b/debian/aes67-linux.service new file mode 100644 index 0000000..22e2b6c --- /dev/null +++ b/debian/aes67-linux.service @@ -0,0 +1,19 @@ +[Unit] +Description=AES67 Daemon +Wants=network-online.target +After=network.target network-online.target + +[Service] +ExecStartPre=+/usr/sbin/modprobe MergingRavennaALSA +ExecStopPost=+/usr/sbin/modprobe -r MergingRavennaALSA +ExecStart=/bin/aes67-daemon --config /etc/aes67-linux/daemon.json +ProtectSystem=strict +ReadWritePaths=/var/lib/aes67-linux/ /etc/aes67-linux/daemon.json +ProtectHome=true +PrivateTmp=true +SystemCallFilter=~@mount +CapabilityBoundingSet=CAP_NET_ADMIN +ProtectKernelModules=true + +[Install] +WantedBy=default.target diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..9759bed --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +aes67-linux (0~20221129-1) unstable; urgency=medium + + * Initial release + + -- Janis Streib Thu, 01 Dec 2022 19:04:00 +0100 diff --git a/debian/config/aes67-dkms.dkms b/debian/config/aes67-dkms.dkms new file mode 100644 index 0000000..37ae4e9 --- /dev/null +++ b/debian/config/aes67-dkms.dkms @@ -0,0 +1,7 @@ +PACKAGE_NAME=aes67-linux +PACKAGE_VERSION="#MODULE_VERSION#" +AUTOINSTALL="yes" +MAKE[0]="make -C driver" +BUILT_MODULE_LOCATION[0]="driver/" +BUILT_MODULE_NAME[0]="MergingRavennaALSA" +DEST_MODULE_LOCATION[0]="/kernel/drivers/audio" diff --git a/debian/config/daemon.json b/debian/config/daemon.json new file mode 100644 index 0000000..51de292 --- /dev/null +++ b/debian/config/daemon.json @@ -0,0 +1,27 @@ +{ + "http_port": 8080, + "rtsp_port": 8854, + "http_base_dir": "/usr/share/aes67-linux-ui", + "log_severity": 4, + "playout_delay": 144, + "tic_frame_size_at_1fs": 192, + "max_tic_frame_size": 1024, + "sample_rate": 48000, + "rtp_mcast_base": "239.2.0.1", + "rtp_port": 5004, + "ptp_domain": 0, + "ptp_dscp": 46, + "sap_mcast_addr": "239.255.255.255", + "sap_interval": 30, + "syslog_proto": "", + "syslog_server": "255.255.255.254:1234", + "status_file": "/var/lib/aes67-linux/status.json", + "mdns_enabled": true, + + "configure_me_on_toplevel": { + "interface_name": "eth0", + "mac_addr": "example", + "ip_addr": "example", + "node_id": "example" + } +} diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..2a84d00 --- /dev/null +++ b/debian/control @@ -0,0 +1,28 @@ +Source: aes67-linux +Section: unknown +Priority: optional +Maintainer: root +Build-Depends: debhelper-compat (= 13), git, build-essential, dh-sequence-dkms, cmake, libboost-all-dev, libavahi-client-dev, libasound2-dev, wget +Standards-Version: 4.5.1 +Homepage: https://github.com/bondagit/aes67-linux-daemon +#Vcs-Browser: https://salsa.debian.org/debian/aes67-linux +#Vcs-Git: https://salsa.debian.org/debian/aes67-linux.git +Rules-Requires-Root: no + +Package: aes67-linux-dkms +Architecture: all +Depends: ${misc:Depends}, dkms +Description: + + +Package: aes67-linux +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, aes67-linux-dkms +Recommends: aes67-linux-ui +Description: + + +Package: aes67-linux-ui +Architecture: all +Description: + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..ea3a515 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,43 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: aes67-linux +Upstream-Contact: +Source: + +Files: * +Copyright: + +License: + + + . + + +# If you want to use GPL v2 or later for the /debian/* files use +# the following clauses, or change it to suit. Delete these two lines +Files: debian/* +Copyright: 2022 root +License: GPL-2+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. +# Please avoid picking licenses with terms that are more restrictive than the +# packaged work, as it may make Debian's contributions unacceptable upstream. +# +# If you need, there are some extra license texts available in two places: +# /usr/share/debhelper/dh_make/licenses/ +# /usr/share/common-licenses/ diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..1554656 --- /dev/null +++ b/debian/rules @@ -0,0 +1,47 @@ +#!/usr/bin/make -f +include /usr/share/dpkg/default.mk +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed +SHELL=/bin/bash + +%: + dh $@ + +override_dh_dkms: + dh_dkms -paes67-linux-dkms -V $(DEB_VERSION_UPSTREAM) + +override_dh_auto_configure: + cd 3rdparty/ && [ -d ravenna-alsa-lkm ] || git clone --single-branch --branch aes67-daemon https://github.com/bondagit/ravenna-alsa-lkm.git + cd 3rdparty/ && ([ -d cpp-httplib ] || git clone https://github.com/bondagit/cpp-httplib.git) && cd cpp-httplib && git checkout 42f9f9107f87ad2ee04be117dbbadd621c449552 + mkdir -p daemon/build + cd daemon/build && cmake -DCPP_HTTPLIB_DIR="$(shell pwd)/3rdparty/cpp-httplib" -DRAVENNA_ALSA_LKM_DIR="$(shell pwd)/3rdparty/ravenna-alsa-lkm" -DENABLE_TESTS=ON -DWITH_AVAHI=ON -DFAKE_DRIVER=OFF .. + + wget -O- https://github.com/bondagit/aes67-linux-daemon/releases/latest/download/webui.tar.gz | tar -xzvC webui + +override_dh_auto_install: + mkdir -p debian/aes67-linux-dkms/usr/src/aes67-linux-$(DEB_VERSION_UPSTREAM) + cp -rv 3rdparty/ravenna-alsa-lkm/{driver,common} debian/aes67-linux-dkms/usr/src/aes67-linux-$(DEB_VERSION_UPSTREAM) + + mkdir -p debian/aes67-linux/usr/bin + cp daemon/build/aes67-daemon debian/aes67-linux/usr/bin + mkdir -p debian/aes67-linux/etc/aes67-linux/ + cp debian/config/daemon.json debian/aes67-linux/etc/aes67-linux/ + mkdir -p debian/aes67-linux/var/lib/aes67-linux/ + + mkdir -p debian/aes67-linux-ui/usr/share/aes67-linux-ui/ + cp -r webui/dist/* debian/aes67-linux-ui/usr/share/aes67-linux-ui/ + + +override_dh_auto_build: + make -j $(shell nproc) -C daemon/build diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)