{"id":15051200,"url":"https://github.com/xor-gate/debpkg","last_synced_at":"2025-10-25T11:32:09.979Z","repository":{"id":37849934,"uuid":"57069947","full_name":"xor-gate/debpkg","owner":"xor-gate","description":"Package creation for Debian written in pure Golang","archived":false,"fork":false,"pushed_at":"2024-08-13T20:54:58.000Z","size":367,"stargazers_count":72,"open_issues_count":6,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-03T14:08:10.326Z","etag":null,"topics":["debbuild","debian","debian-packaging","debuild","dh-golang","dpkg","dpkg-deb","go","golang","package-builder","package-creation","package-management"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xor-gate.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-25T19:30:33.000Z","updated_at":"2024-12-30T08:27:38.000Z","dependencies_parsed_at":"2024-06-18T16:40:47.882Z","dependency_job_id":"fd1dfcf6-751f-412d-a720-a1f394435651","html_url":"https://github.com/xor-gate/debpkg","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xor-gate%2Fdebpkg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xor-gate%2Fdebpkg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xor-gate%2Fdebpkg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xor-gate%2Fdebpkg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xor-gate","download_url":"https://codeload.github.com/xor-gate/debpkg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238133812,"owners_count":19421909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debbuild","debian","debian-packaging","debuild","dh-golang","dpkg","dpkg-deb","go","golang","package-builder","package-creation","package-management"],"created_at":"2024-09-24T21:31:38.506Z","updated_at":"2025-10-25T11:32:09.678Z","avatar_url":"https://github.com/xor-gate.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# debpkg\n\n[![License][License-Image]][License-Url]\n[![Godoc][Godoc-Image]][Godoc-Url]\n[![ReportCard][ReportCard-Image]][ReportCard-Url]\n[![Build][Build-Status-Image]][Build-Status-Url]\n[![BuildAppVeyor][BuildAV-Status-Image]][BuildAV-Status-Url]\n[![Coverage][Coverage-Image]][Coverage-Url]\n\ndebpkg is a pure [Go](https://golang.org) library to create [Debian](https://debian.org) Linux packages. The package can be directly imported in your go project or run a `debpkg` cli tool with a custom debpkg YAML specfile (just like a single [RPM spec file](http://ftp.rpm.org/max-rpm/s1-rpm-build-creating-spec-file.html)). It has zero dependencies outside go modules, to\n and doesn't use exec wrappers. Therefor it is able to generate packages from non Linux systems like Mac OS X, *BSD and Windows without the Perl dependency (as with official [debbuild](https://github.com/debbuild/debbuild)). The \"problem\" with the Debian package build system is it universal and flexable nature, which can be a pro or con. Packaging just a small bunch of files with simple configuration the Debian build system is a fairly complex beast to understand. And you must dig deep into the workings of the Debian package management documentation. Debpkg is not able to resolve all the advanced packaging requirements theirfor one must use the official `debbuild` and `debhelper`. It is created for the simple case to convert a directory structure to be installable and maintained via the standard debian way.\n\n## Features\n\nThe feature list below describes the usability state of the project:\n\n- Create debian packages from files and folders\n- Create package from `debpkg.yml` specfile \n- Add custom control files (preinst, postinst, prerm, postrm etcetera)\n\nIt is currently not possible to use the `debpkg` as a framework to manipulate and introspect individual Debian package objects ([see issue #26](https://github.com/xor-gate/debpkg/issues/26)). As it is only capable of creating packages.\n\n## Why this package was created\n\nThis package was created due to the lack to debianize from other platforms (windows/mac/*bsd). Because\n the whole debian package management system is glued together with Perl scripts and uses a bunch of Perl\n modules. Which isn't easy to use in a CI/CD pipeline for Go projects.\n\nConverting a simple directory structure with files into a debian package is a difficult without knowing the `deb`-file internals.\n\nThis package is heavily inspired by [godeb](https://github.com/niemeyer/godeb) and\n [CPackDeb](https://cmake.org/cmake/help/v3.5/module/CPackDeb.html). It is very royal [licensed](LICENSE).\n\n## Installation\n\n`go get -u github.com/xor-gate/debpkg/cmd/debpkg`\n\n## Status\n\nThe package is currently in production state. The API is stable (v1). \n\n# debpkg.yml specfile\n\nThe specfile is written in the [YAML markup format](http://yaml.org/). It controls\n the package information and data.\n\nA simple example is listed below:\n\n```\n# debpkg.yml specfile\nname: foobar\nversion: 7.6.5\narchitecture: all\nmaintainer: Foo Bar\nmaintainer_email: foo@bar.com\nhomepage: https://github.com/xor-gate/debpkg\ndescription:\n  short: This package is just a test\n  long: \u003e\n    This package tests the working of debpkg.\n    And can wrap multiple\n    lines.\n\n    And multiple paragraphs.\n```\n\n# Mentions\n\nThis project originate from an in-company implementation sponsored by [@dualinventive](https://github.com/dualinventive) in 2016-2017, with help from collegue [@rikvdh](https://github.com/rikvdh).\n\nI would like to mention some other noticable projects for debian package management:\n\n* https://github.com/Debian/dh-make-golang\n* https://github.com/niemeyer/godeb\n* https://github.com/smira/aptly\n* https://github.com/esell/deb-simple\n* https://github.com/paultag/go-debian\n* https://github.com/jordansissel/fpm\n* https://github.com/laher/debgo-v0.2\n* https://github.com/debber/debber-v0.3\n* https://github.com/laher/goxc\n* https://github.com/knqyf263/go-deb-version\n\nOther packaging tools in golang:\n\n* https://github.com/google/rpmpack\n\n## Debugging\n\nWhen debugging on a Debian system the following commands are usefull:\n\n* Print package info: `dpkg --info \u003cdebfile\u003e`\n* Extract data.tar.gz: `dpkg --extract \u003cdebfile\u003e data`\n* Verbose extract data.tar.gz: `dpkg --vextract \u003cdebfile\u003e data`\n* Extract control.tar.gz: `dpkg --control \u003cdebfile\u003e control`\n* Show .deb file contents: `dpkg-deb dpkg-deb --contents package.deb`\n* Install .deb file manually without repository: `dpkg -i package.deb`\n\n## Further documentation\n\nMore information can be gathered from the Debian and Ubuntu documentation:\n\n* [dpkg manpage](https://manpages.debian.org/cgi-bin/man.cgi?query=dpkg)\n* [dpkg-deb manpage](https://manpages.debian.org/cgi-bin/man.cgi?query=dpkg)\n* [dpkg-sig manpage](https://manpages.debian.org/cgi-bin/man.cgi?query=dpkg-sig)\n* [Debian New Maintainers' Guide](https://www.debian.org/doc/manuals/maint-guide/)\n* [Debian Policy Manual](https://www.debian.org/doc/debian-policy/)\n* [Setting up signed APT repository with Reprepro](https://wiki.debian.org/SettingUpSignedAptRepositoryWithReprepro)\n* [Create authenticated repository](https://help.ubuntu.com/community/CreateAuthenticatedRepository)\n\n## License\n\n[MIT](LICENSE)\n\n[License-Url]: http://opensource.org/licenses/MIT\n[License-Image]: https://img.shields.io/npm/l/express.svg\n[Stability-Status-Image]: http://badges.github.io/stability-badges/dist/experimental.svg\n[Build-Status-Url]: http://travis-ci.org/xor-gate/debpkg\n[Build-Status-Image]: https://travis-ci.org/xor-gate/debpkg.svg?branch=master\n[BuildAV-Status-Url]: https://ci.appveyor.com/project/xor-gate/debpkg\n[BuildAV-Status-Image]: https://ci.appveyor.com/api/projects/status/iuw1j84l33ynxs32?svg=true\n[Godoc-Url]: https://godoc.org/github.com/xor-gate/debpkg\n[Godoc-Image]: https://godoc.org/github.com/xor-gate/debpkg?status.svg\n[ReportCard-Url]: http://goreportcard.com/report/xor-gate/debpkg\n[ReportCard-Image]: https://goreportcard.com/badge/github.com/xor-gate/debpkg\n[Coverage-Url]: https://coveralls.io/r/xor-gate/debpkg?branch=master\n[Coverage-image]: https://img.shields.io/coveralls/xor-gate/debpkg.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxor-gate%2Fdebpkg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxor-gate%2Fdebpkg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxor-gate%2Fdebpkg/lists"}