diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | distro/config/apkg.toml | 12 | ||||
-rw-r--r-- | distro/pkg/arch/PKGBUILD | 4 | ||||
-rw-r--r-- | distro/pkg/deb/changelog | 2 | ||||
-rw-r--r-- | distro/pkg/rpm/knot.spec | 7 | ||||
-rwxr-xr-x | scripts/make-dev-archive.sh | 14 |
6 files changed, 35 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore index 66acf991a..1a4374edc 100644 --- a/.gitignore +++ b/.gitignore @@ -81,6 +81,9 @@ src/libknot/libknot.h # Generated tarballs /knot-*.tar.xz +# Packaging output +/pkg + # Code coverage *.gcda *.gcno diff --git a/distro/config/apkg.toml b/distro/config/apkg.toml new file mode 100644 index 000000000..abb8cbcd3 --- /dev/null +++ b/distro/config/apkg.toml @@ -0,0 +1,12 @@ +[project] +name = "knot-dns" +# needed for make-archive +make_archive_script = "scripts/make-dev-archive.sh" + +[upstream] +# needed for get-archive +archive_url = "https://secure.nic.cz/files/knot-dns/knot-{{ version }}.tar.xz" +signature_url = "https://secure.nic.cz/files/knot-dns/knot-{{ version }}.tar.xz.asc" + +[apkg] +compat = 1 diff --git a/distro/pkg/arch/PKGBUILD b/distro/pkg/arch/PKGBUILD index eccde30ae..f8d68eaef 100644 --- a/distro/pkg/arch/PKGBUILD +++ b/distro/pkg/arch/PKGBUILD @@ -6,7 +6,7 @@ # Contributor: Otto Sabart <seberm[at]gmail[dot]com> pkgname=knot -pkgver=__VERSION__ +pkgver={{ version }} pkgrel=1 pkgdesc="High-performance authoritative-only DNS server" arch=('x86_64') @@ -23,7 +23,7 @@ depends=('fstrm' 'protobuf-c' 'systemd') backup=('etc/knot/knot.conf') -source=("${pkgname}_${pkgver}.orig.tar.xz") +source=("${pkgname}-${pkgver}.tar.xz") sha256sums=('SKIP') validpgpkeys=('742FA4E95829B6C5EAC6B85710BB7AF6FEBBD6AB') # Daniel Salzman <daniel.salzman@nic.cz> diff --git a/distro/pkg/deb/changelog b/distro/pkg/deb/changelog index 285b69e2c..5538ae1e3 100644 --- a/distro/pkg/deb/changelog +++ b/distro/pkg/deb/changelog @@ -1,4 +1,4 @@ -knot (__VERSION__-cznic.1) unstable; urgency=medium +knot ({{ version }}-cznic.{{ release }}) unstable; urgency=medium * move changelog to OBS * see NEWS or https://knot-dns.cz diff --git a/distro/pkg/rpm/knot.spec b/distro/pkg/rpm/knot.spec index 8ee8ff8a8..254d6805d 100644 --- a/distro/pkg/rpm/knot.spec +++ b/distro/pkg/rpm/knot.spec @@ -2,17 +2,16 @@ %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}} %define GPG_CHECK 0 -%define VERSION __VERSION__ %define BASE_VERSION %(echo "%{version}" | sed 's/^\\([^.]\\+\\.[^.]\\+\\).*/\\1/') %define repodir %{_builddir}/%{name}-%{version} Summary: High-performance authoritative DNS server Name: knot -Version: %{VERSION} -Release: cznic.1%{?dist} +Version: {{ version }} +Release: cznic.{{ release }}%{?dist} License: GPL-3.0-or-later URL: https://www.knot-dns.cz -Source0: %{name}_%{version}.orig.tar.xz +Source0: %{name}-%{version}.tar.xz %if 0%{?GPG_CHECK} Source1: https://secure.nic.cz/files/knot-dns/%{name}-%{version}.tar.xz.asc diff --git a/scripts/make-dev-archive.sh b/scripts/make-dev-archive.sh new file mode 100755 index 000000000..693ca506e --- /dev/null +++ b/scripts/make-dev-archive.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later +# Create a develpoment tarball +set -o errexit -o nounset -o xtrace + +cd "$(dirname ${0})/.." + +# configure Knot DNS in order to create archive +autoreconf -if +./configure +# create archive and parse output for archive name +TARDIR=$(make dist 2>&1 | sed -n 's/tardir=\([^ ]\+\).*/\1/p') +# print created archive name +ls -1 $TARDIR.tar.* |