diff options
author | Olivier Gayot <olivier.gayot@sigexec.com> | 2023-05-15 00:40:53 +0200 |
---|---|---|
committer | Olivier Gayot <olivier.gayot@sigexec.com> | 2023-05-15 00:40:53 +0200 |
commit | e5aefcad18f15f0787dbd9985ec664db9a7b3bdd (patch) | |
tree | 577232dace7fa661b51a1f7bed520fae1fb39988 |
No upstream tarball exists so I built one based on
8cec1786196ae6f6a8b35e66181277457f2a2bb2
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/control | 30 | ||||
-rw-r--r-- | debian/copyright | 32 | ||||
-rw-r--r-- | debian/libconfigator-dev.install | 3 | ||||
-rw-r--r-- | debian/libconfigator0.install | 1 | ||||
-rw-r--r-- | debian/patches/0001-Replace-makefile-by-meson-build-system.patch | 92 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rwxr-xr-x | debian/rules | 4 | ||||
-rw-r--r-- | debian/source/format | 1 |
9 files changed, 171 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..b7938fb --- /dev/null +++ b/debian/changelog @@ -0,0 +1,7 @@ +configator (0.0.1-1~ppa1) lunar; urgency=medium + + * Initial release. + * Replaced upstream makefile by meson build system. + * Build-time tests are not run + + -- Olivier Gayot <olivier.gayot@sigexec.com> Sat, 11 Feb 2023 22:00:19 +0100 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..6d07eae --- /dev/null +++ b/debian/control @@ -0,0 +1,30 @@ +Source: configator +Section: libs +Priority: optional +Maintainer: Olivier Gayot <olivier.gayot@sigexec.com> +Build-Depends: + debhelper-compat (= 13), + meson, + pkg-config, +Standards-Version: 4.5.1 + +Package: libconfigator0 +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +Depends: + ${shlibs:Depends}, + ${misc:Depends}, +Description: Lightweight library for ini config file parsing + This package includes the shared library. + +Package: libconfigator-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: + libconfigator0 (= ${binary:Version}), + ${shlibs:Depends}, + ${misc:Depends}, +Description: Lightweight library for ini config file parsing + This package includes the development headers. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..af9e17f --- /dev/null +++ b/debian/copyright @@ -0,0 +1,32 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: cameltris +Upstream-Contact: Olivier Gayot <olivier.gayot@sigexec.com> +Source: https://git.sigexec.com/cgit.cgi/cameltris.git + +Files: * +Copyright: Copyright (c) 2023 Olivier Gayot +License: BSD-3-clause + +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/debian/libconfigator-dev.install b/debian/libconfigator-dev.install new file mode 100644 index 0000000..fe77cba --- /dev/null +++ b/debian/libconfigator-dev.install @@ -0,0 +1,3 @@ +usr/include +usr/lib/*/libconfigator.so +usr/lib/*/pkgconfig diff --git a/debian/libconfigator0.install b/debian/libconfigator0.install new file mode 100644 index 0000000..d3fa7b1 --- /dev/null +++ b/debian/libconfigator0.install @@ -0,0 +1 @@ +usr/lib/*/libconfigator.so.0* diff --git a/debian/patches/0001-Replace-makefile-by-meson-build-system.patch b/debian/patches/0001-Replace-makefile-by-meson-build-system.patch new file mode 100644 index 0000000..b7861df --- /dev/null +++ b/debian/patches/0001-Replace-makefile-by-meson-build-system.patch @@ -0,0 +1,92 @@ +From ee134d214144c0932b555db87f72d19664487bd8 Mon Sep 17 00:00:00 2001 +From: Olivier Gayot <olivier.gayot@sigexec.com> +Date: Mon, 15 May 2023 00:34:05 +0200 +Subject: [PATCH] Replace makefile by meson build system + +This is ok for debian packaging but does not run the build-time test +suite. + +Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com> +--- + makefile | 41 ----------------------------------------- + meson.build | 20 ++++++++++++++++++++ + 2 files changed, 20 insertions(+), 41 deletions(-) + delete mode 100644 makefile + create mode 100644 meson.build + +diff --git a/makefile b/makefile +deleted file mode 100644 +index 0ca9ee1..0000000 +--- a/makefile ++++ /dev/null +@@ -1,41 +0,0 @@ +-NAME = sample +-CC = gcc +-FLAGS = -std=c99 -pedantic -g +-FLAGS+= -Wall -Wno-unused-parameter -Wextra -Werror=vla -Werror +-VALGRIND = --show-leak-kinds=all --track-origins=yes --leak-check=full +- +-BIND = bin +-OBJD = obj +-SRCD = src +-RESD = res +- +-INCL = -I$(SRCD) +- +-SRCS = $(SRCD)/example.c +-SRCS+= $(SRCD)/configator.c +- +-OBJS:= $(patsubst $(SRCD)/%.c,$(OBJD)/$(SRCD)/%.o,$(SRCS)) +- +-.PHONY: all +-all: $(BIND)/$(NAME) run +- +-$(OBJD)/%.o: %.c +- @echo "building object $@" +- @mkdir -p $(@D) +- @$(CC) $(INCL) $(FLAGS) -c -o $@ $< +- +-$(BIND)/$(NAME): $(OBJS) +- @echo "compiling executable $@" +- @mkdir -p $(@D) +- @$(CC) -o $@ $^ $(LINK) +- @cp $(RESD)/test.ini $(BIND)/config.ini +- +-run: +- @cd $(BIND) && ./$(NAME) +- +-leakgrind: $(BIND)/$(NAME) +- @cd $(BIND) && valgrind $(VALGRIND) 2> ../valgrind.log ./$(NAME) +- +-clean: +- @echo "cleaning" +- @rm -rf $(BIND) $(OBJD) valgrind.log +diff --git a/meson.build b/meson.build +new file mode 100644 +index 0000000..1153b55 +--- /dev/null ++++ b/meson.build +@@ -0,0 +1,20 @@ ++project('libconfigator', 'c') ++ ++src_libconfigator = [ ++ 'src/configator.c', ++] ++ ++pkgconfig = import('pkgconfig') ++ ++lib_libconfigator = library('configator', src_libconfigator, ++ version: '0.0.1', ++ install: true) ++ ++install_headers('src/configator.h') ++ ++pkgconfig.generate( ++ filebase: 'libconfigator', ++ name: 'LibConfigator', ++ description: 'Lightweight library for ini config file parsing', ++ version: meson.project_version(), ++ libraries: lib_libconfigator) +-- +2.39.2 + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..c9d13de --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-Replace-makefile-by-meson-build-system.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..2d33f6a --- /dev/null +++ b/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ 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) |