Skip to content

Generate .deb package from build#15

Open
finrodfelagund97 wants to merge 9 commits into
masterfrom
staging_finrod
Open

Generate .deb package from build#15
finrodfelagund97 wants to merge 9 commits into
masterfrom
staging_finrod

Conversation

@finrodfelagund97

Copy link
Copy Markdown
Collaborator

Now we're able to generate a .deb package after building aedile-ndk.
This .deb package can be installed like other .deb package: sudo dpkg -i /path/to/deb/package.deb

I've also disable naive test build.

Now during the cmake configure step, to build the tests, the variable 'ENABLE_TESTS' must be set to 1
I've shown how to do that in the README.

@Silberengel Silberengel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is seriously cool.

Comment thread README.md
Comment thread CMakeLists.txt
websocketpp::websocketpp
)
target_include_directories(aedile PUBLIC ${INCLUDE_DIR})
target_include_directories(aedile PUBLIC $<BUILD_INTERFACE:${INCLUDE_DIR}/>)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain what the BUILD_INTERFACE part means here?

Comment thread gen_deb.sh
mkdir -p ${DEB_PACKAGE_ROOT}/usr/include/aedile/client
mkdir -p ${DEB_PACKAGE_ROOT}/usr/lib

ln -s ${INSTALL_DIR}/include/nostr.h ${DEB_PACKAGE_ROOT}/usr/include/aedile/nostr.h

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we adding this nostr.h file?

@VnUgE VnUgE Oct 17, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we ditched it between master and note_signing. It probably shouldn't exist as it just does some C++ header imports.

#include <nostr.hpp>
#include <client/web_socket_client.hpp>

Edit: I'm retarded, it was added below. I'll wait for explanation :)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do need to get note_signing up to speed and merge it into master, it's been divergent from master for too long at this point.

My guess is that nostr.h is acting as a whole-library "entrypoint" header file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It made me realize we need to prune up some of our public api headers too. I don't think they need to be including all the headers listed at the moment.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we will eventually have just a nostr.hpp that, in turn, imports everything from the project internals. But we're not there yet.

Comment thread gen_deb.sh
#! /bin/bash

export PACKAGE_NAME="libaedile-dev"
export VERSION="0.0.2"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be centralizing the build version somehow so we don't need to remember to increment versions at every location? Or will this be the entry-point for the entire package? I assume some users will be building from cmake directly.

@finrodfelagund97 finrodfelagund97 Nov 24, 2024

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, this is a util script.

Ideally, the build will be done on a jenkins job, and there we can set these variables as env variables for the job.

Comment thread gen_deb.sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be in dos format, needed to convert to unix line endings before running on Debian.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure?
I'm pretty sure it's unix line endings

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like your probably right. Pulled a clean version and ran dos2unix then git diff and no changes were detected this time. It looks like git might have changed it to crlf and staged it without me noticing, which is why when I converted it last time it showed up in the diff. Not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants