summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog7
-rw-r--r--debian/control30
-rw-r--r--debian/copyright32
-rw-r--r--debian/libdragonfail-dev.install3
-rw-r--r--debian/libdragonfail0.install1
-rw-r--r--debian/patches/0001-Replace-makefile-by-meson-build-system.patch100
-rw-r--r--debian/patches/series1
-rwxr-xr-xdebian/rules4
-rw-r--r--debian/source/format1
9 files changed, 179 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..6ddd290
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,7 @@
+dragonfail (0.0.1-1~ppa2) 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..62f53f2
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,30 @@
+Source: dragonfail
+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: libdragonfail0
+Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
+Depends:
+ ${shlibs:Depends},
+ ${misc:Depends},
+Description: Library providing basic error handling functionalities
+ This package includes the shared library.
+
+Package: libdragonfail-dev
+Section: libdevel
+Architecture: any
+Multi-Arch: same
+Depends:
+ libdragonfail0 (= ${binary:Version}),
+ ${shlibs:Depends},
+ ${misc:Depends},
+Description: Library providing basic error handling functionalities
+ 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/libdragonfail-dev.install b/debian/libdragonfail-dev.install
new file mode 100644
index 0000000..7f6e992
--- /dev/null
+++ b/debian/libdragonfail-dev.install
@@ -0,0 +1,3 @@
+usr/include
+usr/lib/*/libdragonfail.so
+usr/lib/*/pkgconfig
diff --git a/debian/libdragonfail0.install b/debian/libdragonfail0.install
new file mode 100644
index 0000000..93d6104
--- /dev/null
+++ b/debian/libdragonfail0.install
@@ -0,0 +1 @@
+usr/lib/*/libdragonfail.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..51b8c2f
--- /dev/null
+++ b/debian/patches/0001-Replace-makefile-by-meson-build-system.patch
@@ -0,0 +1,100 @@
+From 9a840c43bd531700c2a3e712b29bc03bb6e3b619 Mon Sep 17 00:00:00 2001
+From: Olivier Gayot <olivier.gayot@sigexec.com>
+Date: Mon, 15 May 2023 00:15:49 +0200
+Subject: [PATCH] Replace makefile by meson build system
+
+This is ok for now but does not run the test-suite
+
+Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
+---
+ makefile | 49 -------------------------------------------------
+ meson.build | 21 +++++++++++++++++++++
+ 2 files changed, 21 insertions(+), 49 deletions(-)
+ delete mode 100644 makefile
+ create mode 100644 meson.build
+
+diff --git a/makefile b/makefile
+deleted file mode 100644
+index 9982bf5..0000000
+--- a/makefile
++++ /dev/null
+@@ -1,49 +0,0 @@
+-NAME = dragonfail
+-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
+-EXPD = example
+-
+-INCL = -I$(SRCD)
+-INCL+= -I$(EXPD)
+-
+-SRCS = $(EXPD)/example.c
+-SRCS+= $(SRCD)/dragonfail.c
+-
+-SRCS_OBJS := $(patsubst %.c,$(OBJD)/%.o,$(SRCS))
+-
+-# aliases
+-.PHONY: final
+-final: $(BIND)/$(NAME)
+-
+-# generic compiling command
+-$(OBJD)/%.o: %.c
+- @echo "building object $@"
+- @mkdir -p $(@D)
+- @$(CC) $(INCL) $(FLAGS) -c -o $@ $<
+-
+-# final executable
+-$(BIND)/$(NAME): $(SRCS_OBJS) $(FINAL_OBJS)
+- @echo "compiling executable $@"
+- @mkdir -p $(@D)
+- @$(CC) -o $@ $^ $(LINK)
+-
+-run:
+- @cd $(BIND) && ./$(NAME)
+-
+-# tools
+-## valgrind memory leak detection
+-leak: $(BIND)/$(NAME)
+- @echo "# running valgrind"
+- rm -f valgrind.log
+- cd $(BIND) && valgrind $(VALGRIND) 2> ../valgrind.log ./$(NAME)
+- less valgrind.log
+-## repository cleaning
+-clean:
+- @echo "# cleaning"
+- rm -rf $(BIND) $(OBJD) valgrind.log
+diff --git a/meson.build b/meson.build
+new file mode 100644
+index 0000000..e94eae3
+--- /dev/null
++++ b/meson.build
+@@ -0,0 +1,21 @@
++project('libdragonfail', 'c')
++
++src_libdragonfail = [
++ 'src/dragonfail.c',
++]
++
++pkgconfig = import('pkgconfig')
++
++lib_libdragonfail = library('dragonfail', src_libdragonfail,
++ include_directories: ['example'],
++ version: '0.0.1',
++ install: true)
++
++install_headers('src/dragonfail.h')
++
++pkgconfig.generate(
++ filebase: 'libdragonfail',
++ name: 'LibDragonFail',
++ description: 'Library providing basic error handling functionalities',
++ version: meson.project_version(),
++ libraries: lib_libdragonfail)
+--
+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)