Skip to content

Fix debian packaging - #548

Open
szechyjs wants to merge 5 commits into
jgarff:masterfrom
szechyjs:debian
Open

Fix debian packaging#548
szechyjs wants to merge 5 commits into
jgarff:masterfrom
szechyjs:debian

Conversation

@szechyjs

Copy link
Copy Markdown

This fixes/updates the debian packaging configs to create development and library packages.

@jgarff

jgarff commented Nov 14, 2024

Copy link
Copy Markdown
Owner

This looks great! Thanks for the changes. @Gadgetoid will this cause any issues with the various language ports?

@ragazenta

Copy link
Copy Markdown

I think if this go this path, DEBIAN (upper-case) should be renamed to debian (lower-case) and the SConscript should be updated to call dpkg-buildpackage (requires debhelper package to be installed) instead of dpkg-deb. Cmiiw.

@szechyjs

szechyjs commented Dec 4, 2024

Copy link
Copy Markdown
Author

and the SConscript should be updated to call dpkg-buildpackage (requires debhelper package to be installed) instead of dpkg-deb. Cmiiw.

I'm not too familiar with SCons, and would appreciate some help/guidance on what to update, it looks like the script currently does some copying of the debian files around before running dpkg-deb, is the copying necessary?

@ragazenta

Copy link
Copy Markdown

I'm not too familiar with SCons

Me too.

it looks like the script currently does some copying of the debian files around before running dpkg-deb, is the copying necessary?

I guess copying is not necessary. I think the whole manual versioning, naming are not necessary after your first commit.

diff --git a/SConscript b/SConscript
index abc59d4..8e200b1 100644
--- a/SConscript
+++ b/SConscript
@@ -62,31 +62,7 @@ test = tools_env.Program('test', objs + tools_env['LIBS'])
 
 Default([test, ws2811_lib])
 
-package_version = "1.1.0-1"
-package_name = 'libws2811_%s' % package_version
-
-debian_files = [
-    'debian/control',
-]
-
-package_files_desc = [
-    [ '/usr/lib', ws2811_slib ],
-]
-
-package_files = []
-for target in package_files_desc:
-    package_files.append(tools_env.Install(package_name + target[0], target[1]))
-
-for deb_file in debian_files:
-    package_files.append(
-        tools_env.Command('%s/%s' % (package_name, deb_file), deb_file, [
-            Copy("$TARGET", "$SOURCE"),
-            Chmod("$TARGET", 0o755)
-        ])
-    )
-
-package = tools_env.Command('%s.deb' % package_name, package_files,
-                            'cd %s; dpkg-buildpackage -b' % (Dir('.').abspath, package_name));
+package = tools_env.Execute('dpkg-buildpackage -us -uc')

Comment thread debian/libws2811.install
@@ -0,0 +1 @@
usr/lib/*/*.so.*

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Also add usr/lib/*/*.so, to make the non-versioned .so symlink installed too. This is required because a lot of apps depend to the non-versioned .so file.

@ragazenta

ragazenta commented Feb 5, 2025

Copy link
Copy Markdown

I don't know if you're still working on this or not, but I left a comment. Overall I agree with these changes, but I cannot merge because I'm not the maintainer here.

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