distro FEATURE apkg-powered upstream rpm packaging
Using this .spec file originally provided by Martin Winter with some
modifications and apkg magic, I'm able to build both source package
libyang2-2.0.0.9.gf60c0dbf-1.fc34.src.rpm
and native RPM packages
libyang2-2.0.0.9.gf60c0dbf-1.fc34.x86_64.rpm
libyang2-devel-2.0.0.9.gf60c0dbf-1.fc34.x86_64.rpm
libyang2-tools-2.0.0.9.gf60c0dbf-1.fc34.x86_64.rpm
libyang2-debuginfo-2.0.0.9.gf60c0dbf-1.fc34.x86_64.rpm
libyang2-debugsource-2.0.0.9.gf60c0dbf-1.fc34.x86_64.rpm
libyang2-tools-debuginfo-2.0.0.9.gf60c0dbf-1.fc34.x86_64.rpm
by running
apkg build -i
on this commit. It should work on any RPM-based distro including SUSE.
I was able to install resulting packages on each testing system.
I've tested this on:
* Fedora 33 VM
* Fedora 34 docker container (fedora:34)
* openSUSE 15 docker container (opensuse/leap)
distro/README.md contains (3 lines of) instructions on howto test this
using apkg in a VM/container/machine of your choice.
diff --git a/distro/config/apkg.toml b/distro/config/apkg.toml
new file mode 100644
index 0000000..95f92ed
--- /dev/null
+++ b/distro/config/apkg.toml
@@ -0,0 +1,10 @@
+[project]
+name = "libyang2"
+make_archive_script = "tools/make-dev-archive.sh"
+
+[upstream]
+archive_url = "https://github.com/CESNET/libyang/archive/refs/tags/v{{ version }}.tar.gz"
+version_script = "tools/upstream-version.sh"
+
+[apkg]
+compat = 1