Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds artifacts to create a Debian package #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Adds artifacts to create a Debian package #4

wants to merge 1 commit into from

Conversation

eldavido
Copy link

@tompreston

Running "debuild" from the root will generate a new Debian package.

I made several small tweaks to the Makefile, including adding an "install" target, and changing the default build option from being a static library, to one that's dynamic.

Do you know where you'd like to host this package yet (which debian repo)?

Also, I put the header in piface/mcp23s17.h, I'll put the others in "piface" alongside this one. Didn't want to put headers into the root /usr/include namespace as there will be several once I'm done with this lib, and possibly a few others.

@tompreston
Copy link
Member

That's great, thanks. I'm in touch with a maintainer of a Raspberry Pi specific (Raspbian) repo. I usual contact him and he hosts the packages. I'm unsure if this particular library should go there though, since accessing an MCP23S17 via SPI is not restricted to the Raspberry Pi and can be performed on any computer with an SPI bus. Any thoughts?

@eldavido
Copy link
Author

I'm realizing there are actually two packages here:

  • A "runtime" package, libmcp23s17, which contains a shared library -- this is the package with lots of external things (e.g. pifacedigital) referring to it as a dependency
  • A "development" package, allowing new code to link against libmcp23s17

The second would need to header file; the first wouldn't.

I realized this while thinking about dependencies; merely running the library is simple, but compilation requires a whole bunch of other stuff, namely libc6-dev, linux-libc-dev, and a few other things to ensure the headers used in mcp23s17.h are present.

What are your thoughts on this? Do we skip creating the "runtime" package completely and only support static linkage through a -dev package (with all the dependencies), or create both?

We can't create a single package for both without a lot of extraneous dependencies, that runtime-only users definitely won't need.

@tompreston
Copy link
Member

Both, if possible. There are cases where people may not want to develop with libmcp23s17 and so they shouldn't have to download all the dev stuff.

@h0ru5
Copy link

h0ru5 commented Jun 5, 2015

Would it make sense to have the Makefile one as an own PR? I think the install-target is very much needed. (and is needed independent of the Raspbian package)

Yours looks very nice, I was just needing the install target for header+so to bind script-runtimes to the libs.
e.g. for node.js: darrylhodgins/piface-node#11

There, the same is also needed for libpifacedigital
piface/libpifacedigital#9

I did send a (basic) PR for libpifacedigital, but would adjust it to your suggestion.

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.

3 participants