Skip to content

Creates a .deb Debian binary package from a specification file through the dotnet CLI command or as standalone command-line tool.

License

Notifications You must be signed in to change notification settings

ygoe/DotnetMakeDeb

Repository files navigation

DotnetMakeDeb logo

dotnet-make-deb

Creates a .deb Debian binary package from a specification file through the dotnet CLI command or as standalone command-line tool.

NuGet

Installation

dotnet local tool

Install the NuGet package Unclassified.DotnetMakeDeb to your project directory. Then you can run it from the project directory to create your Debian package. This requires the .NET 6.0 runtime to be installed.

Installation:

dotnet new tool-manifest
dotnet tool install Unclassified.DotnetMakeDeb

Command invocation:

dotnet publish -c Release
dotnet make-deb app.debspec

dotnet global tool

Install the NuGet package Unclassified.DotnetMakeDeb as a global tool. Then you can run it from all directories to create your Debian package. This requires the .NET 6.0 runtime to be installed.

Installation:

dotnet tool install -g Unclassified.DotnetMakeDeb

Command invocation:

make-deb app.debspec

Learn more about managing .NET tools.

standalone

To use this tool in other environments than dotnet projects and without a dependency on the new .NET runtime, use the separate standalone console application. It’s a single executable that depends on the .NET Framework 4.8 or later. You can place this program file somewhere in your %PATH% so you can quickly run it from all your projects. But you can simply save it in your project directory as well. It is invoked similarly and accepts all the same command line options:

make-deb app.debspec

You will also need a package specification file which is described in the separate document MakeDeb.html.

Package version

The package version is normally specified in the package specification file (.debspec).

Alternatively, the version can be overridden from a second command line argument after the specification file:

[dotnet] make-deb app.debspec 1.2.0

In automated build scenarios, the package version can also be looked up from another file, like the built application assembly. Use the -vf option to specify the file to read the version from:

[dotnet] make-deb app.debspec -vf bin\Release\netcoreapp3.0\linux-x64\publish\MyApp.dll

Other options

The -v option activates verbose output. It prints some progress information while running. Otherwise, it remains silent in normal operation.

Building

You can build this solution in Visual Studio or by running the command:

build.cmd

Requirements

Visual Studio 2022 or later with .NET 6.0 support is required to build this solution.

License

MIT license

About

Creates a .deb Debian binary package from a specification file through the dotnet CLI command or as standalone command-line tool.

Topics

Resources

License

Stars

Watchers

Forks