Skip to content
Snippets Groups Projects
Commit 7e914793 authored by Jakub Ružička's avatar Jakub Ružička
Browse files

distro: add apkg support

Change packaging templates distro/pkg/* to use {{ version }}.

Add scripts/make_dev_archive.sh to create dev archives.

Add apkg config: distro/config/apkg.toml

With these changes, apkg can be used to package Knot DNS.
parent 19dbbbcc
Branches
Tags
1 merge request!1298distro: add apkg support
Pipeline #82487 passed with stages
in 10 minutes and 44 seconds
...@@ -81,6 +81,9 @@ src/libknot/libknot.h ...@@ -81,6 +81,9 @@ src/libknot/libknot.h
# Generated tarballs # Generated tarballs
/knot-*.tar.xz /knot-*.tar.xz
# Packaging output
/pkg
# Code coverage # Code coverage
*.gcda *.gcda
*.gcno *.gcno
......
[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
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Contributor: Otto Sabart <seberm[at]gmail[dot]com> # Contributor: Otto Sabart <seberm[at]gmail[dot]com>
pkgname=knot pkgname=knot
pkgver=__VERSION__ pkgver={{ version }}
pkgrel=1 pkgrel=1
pkgdesc="High-performance authoritative-only DNS server" pkgdesc="High-performance authoritative-only DNS server"
arch=('x86_64') arch=('x86_64')
...@@ -23,7 +23,7 @@ depends=('fstrm' ...@@ -23,7 +23,7 @@ depends=('fstrm'
'protobuf-c' 'protobuf-c'
'systemd') 'systemd')
backup=('etc/knot/knot.conf') backup=('etc/knot/knot.conf')
source=("${pkgname}_${pkgver}.orig.tar.xz") source=("${pkgname}-${pkgver}.tar.xz")
sha256sums=('SKIP') sha256sums=('SKIP')
validpgpkeys=('742FA4E95829B6C5EAC6B85710BB7AF6FEBBD6AB') # Daniel Salzman <daniel.salzman@nic.cz> validpgpkeys=('742FA4E95829B6C5EAC6B85710BB7AF6FEBBD6AB') # Daniel Salzman <daniel.salzman@nic.cz>
......
knot (__VERSION__-cznic.1) unstable; urgency=medium knot ({{ version }}-cznic.{{ release }}) unstable; urgency=medium
* move changelog to OBS * move changelog to OBS
* see NEWS or https://knot-dns.cz * see NEWS or https://knot-dns.cz
......
...@@ -2,17 +2,16 @@ ...@@ -2,17 +2,16 @@
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}} %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}}
%define GPG_CHECK 0 %define GPG_CHECK 0
%define VERSION __VERSION__
%define BASE_VERSION %(echo "%{version}" | sed 's/^\\([^.]\\+\\.[^.]\\+\\).*/\\1/') %define BASE_VERSION %(echo "%{version}" | sed 's/^\\([^.]\\+\\.[^.]\\+\\).*/\\1/')
%define repodir %{_builddir}/%{name}-%{version} %define repodir %{_builddir}/%{name}-%{version}
Summary: High-performance authoritative DNS server Summary: High-performance authoritative DNS server
Name: knot Name: knot
Version: %{VERSION} Version: {{ version }}
Release: cznic.1%{?dist} Release: cznic.{{ release }}%{?dist}
License: GPL-3.0-or-later License: GPL-3.0-or-later
URL: https://www.knot-dns.cz URL: https://www.knot-dns.cz
Source0: %{name}_%{version}.orig.tar.xz Source0: %{name}-%{version}.tar.xz
%if 0%{?GPG_CHECK} %if 0%{?GPG_CHECK}
Source1: https://secure.nic.cz/files/knot-dns/%{name}-%{version}.tar.xz.asc Source1: https://secure.nic.cz/files/knot-dns/%{name}-%{version}.tar.xz.asc
......
#!/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.*
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment