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

Fix debian packaging #548

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Fix debian packaging #548

wants to merge 5 commits into from

Conversation

szechyjs
Copy link

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

@jgarff
Copy link
Owner

jgarff commented Nov 14, 2024

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

@ragazenta
Copy link

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
Copy link
Author

szechyjs commented Dec 4, 2024

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

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')

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