diff --git a/Earthfile b/Earthfile index 55db2af..a109639 100644 --- a/Earthfile +++ b/Earthfile @@ -35,7 +35,7 @@ deps: build: FROM +deps - COPY --dir include packages src premake5.lua strip . + COPY --dir include packages src premake5.lua . RUN premake5 gmake && make -j$(nproc) libniven package: @@ -43,9 +43,9 @@ package: ARG DISTRIBUTION=bionic RUN cd packages && dpkg-buildpackage -b -uc -us - SAVE ARTIFACT packages/libniven-dev_*.deb libniven-dev.deb - SAVE ARTIFACT packages/libniven0_*.deb libniven0.deb - SAVE ARTIFACT libniven*.deb AS LOCAL build/ + # SAVE ARTIFACT libniven-dev_*.deb libniven-dev.deb + # SAVE ARTIFACT libniven0_*.deb libniven0.deb + SAVE ARTIFACT libniven*.*deb AS LOCAL build/ all: BUILD --platform=linux/amd64 --platform=linux/arm64 +package --DISTRIBUTION=bionic diff --git a/packages/debian/changelog b/packages/debian/changelog index 27c37f4..383fcf1 100644 --- a/packages/debian/changelog +++ b/packages/debian/changelog @@ -1,3 +1,10 @@ +libniven0 (0.0.16) unstable; urgency=medium + + * Tidy up and packaging fixes + * Added a dbg package + + -- Dan Parnham Wed, 27 Jul 2022 12:58:26 +0100 + libniven0 (0.0.15) unstable; urgency=medium * Patched to build on ubuntu 22.04 diff --git a/packages/debian/control b/packages/debian/control index fdd77cb..cee9d7a 100644 --- a/packages/debian/control +++ b/packages/debian/control @@ -20,3 +20,13 @@ Depends: ${misc:Depends}, libniven0 (= ${binary:Version}), libmicrohttpd-dev Description: C++17 REST services made easy Allows simple construction of self-hosted REST services using lambdas and fluent configuration. + +Package: libniven-dbg +Section: debug +Priority: extra +Architecture: any +Depends: libniven0 (= ${binary:Version}) +Description: C++17 REST services made easy + Allows simple construction of self-hosted REST + services using lambdas and fluent configuration. + This package contains the debug symbols. diff --git a/packages/debian/rules b/packages/debian/rules index 9af0a4d..a0b54c7 100755 --- a/packages/debian/rules +++ b/packages/debian/rules @@ -20,7 +20,7 @@ binary: dh_installchangelogs dh_compress dh_fixperms - dh_strip + dh_strip --dbg-package=libniven-dbg dh_makeshlibs dh_shlibdeps dh_installdeb diff --git a/packages/update b/packages/update index 28d60ee..41ad1f1 100755 --- a/packages/update +++ b/packages/update @@ -6,4 +6,4 @@ VERSION[2]=`expr ${VERSION[2]} + 1` echo "${VERSION[*]}" > version -dch -v "${VERSION[*]}" --distribution=unstable +dch -Mv "${VERSION[*]}" --distribution=unstable diff --git a/packages/version b/packages/version index ceddfb2..e3b86dd 100644 --- a/packages/version +++ b/packages/version @@ -1 +1 @@ -0.0.15 +0.0.16 diff --git a/premake5.lua b/premake5.lua index 452718b..2a4c312 100644 --- a/premake5.lua +++ b/premake5.lua @@ -20,8 +20,8 @@ solution "niven" links { "microhttpd", "gcrypt", "stdc++fs" } linkoptions { "-Wl,-soname,libniven.so.0" } files { "include/niven/**h", "src/niven/**.cpp" } - configuration "linux" - postbuildcommands "./strip lib/libniven.so" + -- configuration "linux" + -- postbuildcommands "./strip lib/libniven.so" project "test" kind "ConsoleApp" diff --git a/strip b/strip deleted file mode 100755 index c8d7d15..0000000 --- a/strip +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -if [ $# -ne 1 ]; then - echo "Usage: `basename $0` binary" - exit 65 -fi - -if [ ! -e "$1" ]; then - echo "Binary to strip must exist" - exit 65 -fi - -count=`nm -a $1 | grep -c -w N` -if [[ $count > 0 ]]; then - echo -n "Stripping binary..." - objcopy --only-keep-debug $1 $1.dbg - objcopy --strip-unneeded $1 - objcopy --add-gnu-debuglink=$1.dbg $1 - chmod -x $1.dbg - echo "done" -else - echo "Skipping since binary has already been stripped" -fi - -exit 0