Skip to content

Commit

Permalink
FEATURE: Basic Debian packaging for libraries
Browse files Browse the repository at this point in the history
Implement CPack based packaging for the 'libmachinekit-hal', 'libmachinekit-hal-dev' and 'modmachinekit-hal-components' on Debian systems via use of 'dh-cmake' debhelper package.
  • Loading branch information
cerna committed Dec 22, 2021
1 parent 6612dbc commit 984c237
Show file tree
Hide file tree
Showing 46 changed files with 912 additions and 717 deletions.
491 changes: 245 additions & 246 deletions .github/workflows/debian-builder-workflow.yaml

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ string(REGEX REPLACE "_" "/" MACHINEKIT_HAL_PACKAGE_PREFIX_PATH
${MACHINEKIT_HAL_PACKAGE_PREFIX})

include(GNUInstallDirs)
include(CPackComponent)
include(CPack)

set(MACHINEKIT_HAL_NAMESPACE "Machinekit::HAL")
set(MACHINEKIT_HAL_EXECUTABLE_DIRECTORY "${CMAKE_INSTALL_BINDIR}")
Expand Down Expand Up @@ -90,3 +92,8 @@ define_property(
to defined CMake Modules in the source-tree.
]])
add_subdirectory(src)

# Main package CPack groups
cpack_add_component_group(MachinekitHAL_Package_Base_Libraries)
cpack_add_component_group(MachinekitHAL_Package_Base_Libraries_Development)
cpack_add_component_group(MachinekitHAL_Package_Base_Managed_Modules_Components)
5 changes: 0 additions & 5 deletions debian/README.debian

This file was deleted.

2 changes: 1 addition & 1 deletion debian/buildcontainerimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def main(args):
args.target[0] if args.target is not None else None,
args.designation,
args.target[1] if args.target is not None else None,
args.network if args.target is not None else None)
args.network if args.network is not None else None)
print("Container image build ran successfully to completion!")
except ValueError as e:
print(e)
Expand Down
2 changes: 1 addition & 1 deletion debian/buildpackages.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# building .deb and .ddeb native packages for Debian flavoured
# distributions.
#
# Copyright (C) 2020 Jakub Fišer <jakub DOT fiser AT eryaf DOT com>
# Copyright (C) 2020 - Jakub Fišer <jakub DOT fiser AT eryaf DOT com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down
1 change: 0 additions & 1 deletion debian/compat

This file was deleted.

2 changes: 1 addition & 1 deletion debian/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
import importlib.util
spec = importlib.util.spec_from_file_location(
"machinekit_hal_script_helpers",
"{0}/scripts/machinekit_hal_script_helpers.py".format(
"{0}/support/python/machinekit_hal_script_helpers.py".format(
os.path.realpath(
"{0}/..".format(os.path.dirname(os.path.abspath(__file__)))
)))
Expand Down
160 changes: 82 additions & 78 deletions debian/control.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ Maintainer: MachinekitBot <machinekitATeryafDOTcom>
# does not set the Multi-Arch: foreign in its packaging scripts
# Otherwise the dpkg-checkbuilddeps will reject such dependency with :native
# as invalid, ergo autoconf:native (not) vs python:native
Build-Depends:
Build-Depends:
dh-cmake,
dh-cmake-compat (= 1),
dh-sequence-cpack,
debhelper-compat (= 12),
debhelper (>= 10),
autoconf (>= 2.63),
autoconf-archive,
dpkg-sig:native,
automake,
git,
lsb-release,
libmodbus-dev (>= 3.0),
Expand Down Expand Up @@ -53,90 +56,91 @@ Build-Depends:
python3-pip:native,
python3-venv:native,
libck-dev @BUILDTIME_DEPENDENCIES@
Standards-Version: 2.1.0
#Build-conflicts: *linuxcnc
Standards-Version: 4.5.1
Homepage: https://machinekit.io

Package: machinekit-hal
Conflicts: machinekit
Architecture: any
Depends:
${shlibs:Depends},
${python3:Depends},
${misc:Depends},
python3-numpy,
libmodbus-dev (>= 3.0),
python3-xlib,
python3-configobj,
python3-zmq,
python3-protobuf (>= 2.4.1),
python3-avahi,
python3-simplejson,
python3-pyftpdlib,
python3-pydot,
xdot,
bc,
procps,
psmisc,
cgroup-tools,
python3-pil,
python3-gst-1.0,
uuid-runtime,
python3-setproctitle,
@RUNTIME_DEPENDENCIES@,
Description: Universal framework for machine control based on Hardware Abstraction Layer principle
.
Machinekit is the next-generation Machine Controller. It provides
motion and other control for atomation, robot and CNC machine tool
applications.

Package: machinekit-hal-dev
Package: libmachinekit-hal
Architecture: any
Depends:
make,
g++,
${misc:Depends},
machinekit-hal (= ${binary:Version}),
python3-pytest,
yapps2
Section: libs
Description: Universal framework for machine control based on Hardware Abstraction Layer principle
This package includes the development environment for Machinekit-HAL.
.
This package includes files needed to build new realtime components and
alternate front-ends for machinekit
Multi-Arch: same
Depends: ${shlibs:Depends}, ${misc:Depends}, ${cpack:Depends}
Description: dh-cmake example - libraries
This package contains the shared libraries for the Machinekit-HAL project.

Package: machinekit-hal-rt-preempt
Package: libmachinekit-hal-dev
Architecture: any
Suggests: hostmot2-firmware-all [!armhf]
Depends:
machinekit-hal,
linux-image-rt-686-pae [i386],
linux-image-rt-amd64 [amd64],
linux-image-rt-arm64 [arm64],
linux-image-rt-armmp [armhf]
Description: Machinekit HAL RT_PREEMPT
.
This metapackage provides components and drivers that run on a realtime
(PREEMPT RT) system.
Multi-Arch: same
Depends: ${shlibs:Depends}, ${misc:Depends}, ${cpack:Depends}
Description: dh-cmake example - libraries
This package contains the development files for libraries of the Machinekit-HAL project.


Package: machinekit-hal-posix
Package: modmachinekit-hal-components
Architecture: any
Suggests: hostmot2-firmware-all [!armhf]
Description: Universal framework for machine control based on Hardware Abstraction Layer principle
.
This package provides components and drivers that run on a non-realtime
(Posix) system.
Depends:
machinekit-hal
Multi-Arch: same
Depends: ${shlibs:Depends}, ${misc:Depends}, ${cpack:Depends}
Description: dh-cmake example - libraries
This package contains the managed modules - components for the Machinekit-HAL project.

#Package: machinekit-hal-xenomai2
#Package: modmachinekit-hal-drivers
#Architecture: any
#Multi-Arch: same
#Depends: ${shlibs:Depends}, ${misc:Depends}
#Description: dh-cmake example - libraries
# This package contains the managed modules - drivers for the Machinekit-HAL project.
#
#Package: machinekit-hal-unmanaged-modules
#Architecture: any
#Multi-Arch: same
#Depends: ${shlibs:Depends}, ${misc:Depends}
#Description: dh-cmake example - libraries
# This package contains the unmanaged modules for the Machinekit-HAL project.
#
#Package: machinekit-hal
#Conflicts: machinekit
#Architecture: any
#Depends:
# ${shlibs:Depends},
# ${python3:Depends},
# ${misc:Depends},
# python3-numpy,
# libmodbus-dev (>= 3.0),
# python3-xlib,
# python3-configobj,
# python3-zmq,
# python3-protobuf (>= 2.4.1),
# python3-avahi,
# python3-simplejson,
# python3-pyftpdlib,
# python3-pydot,
# xdot,
# bc,
# procps,
# psmisc,
# cgroup-tools,
# python3-pil,
# python3-gst-1.0,
# uuid-runtime,
# python3-setproctitle,
# @RUNTIME_DEPENDENCIES@,
#Description: Universal framework for machine control based on Hardware Abstraction Layer principle
# .
# Machinekit is the next-generation Machine Controller. It provides
# motion and other control for atomation, robot and CNC machine tool
# applications.
#
#Package: machinekit-hal-dev
#Architecture: any
#Suggests: hostmot2-firmware-all [!armhf]
#Conflicts: machinekit-hal-xenomai
#Depends:
# make,
# g++,
# ${misc:Depends},
# machinekit-hal (= ${binary:Version}),
# python3-pytest,
# yapps2
#Section: libs
#Description: Universal framework for machine control based on Hardware Abstraction Layer principle
# This package includes the development environment for Machinekit-HAL.
# .
# This package provides components and drivers that run on a realtime
# (XENOMAI 2) system.
#Depends:
# machinekit-hal,
# xenomai-runtime (<= 2.8)
# This package includes files needed to build new realtime components and
# alternate front-ends for machinekit
1 change: 1 addition & 0 deletions debian/libmachinekit-hal-dev.cpack-component-groups
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MachinekitHAL_Package_Base_Libraries_Development
1 change: 1 addition & 0 deletions debian/libmachinekit-hal.cpack-component-groups
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MachinekitHAL_Package_Base_Libraries
1 change: 1 addition & 0 deletions debian/machinekit-hal-dev.cpack-components
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

8 changes: 0 additions & 8 deletions debian/machinekit-hal-dev.install

This file was deleted.

Empty file.
Empty file.
20 changes: 0 additions & 20 deletions debian/machinekit-hal.install

This file was deleted.

1 change: 1 addition & 0 deletions debian/modmachinekit-hal-components.cpack-component-groups
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MachinekitHAL_Package_Base_Managed_Modules_Components
Empty file.
Loading

0 comments on commit 984c237

Please sign in to comment.