{"id":18247027,"url":"https://github.com/osspkg/deb-builder","last_synced_at":"2025-04-08T19:35:28.522Z","repository":{"id":38151501,"uuid":"381783732","full_name":"osspkg/deb-builder","owner":"osspkg","description":"Utility for building deb packages and repository.","archived":false,"fork":false,"pushed_at":"2023-09-23T19:44:23.000Z","size":163,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T15:17:13.683Z","etag":null,"topics":["build-debian-package","deb","deb-package","deb-repository","debbuild","debian-packages","debian-packaging","debpkg","dpkg-deb","packaging"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osspkg.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-30T17:32:04.000Z","updated_at":"2024-12-29T15:50:12.000Z","dependencies_parsed_at":"2024-06-21T11:11:04.516Z","dependency_job_id":null,"html_url":"https://github.com/osspkg/deb-builder","commit_stats":null,"previous_names":["dewep-online/deb-builder"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osspkg%2Fdeb-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osspkg%2Fdeb-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osspkg%2Fdeb-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osspkg%2Fdeb-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osspkg","download_url":"https://codeload.github.com/osspkg/deb-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247913005,"owners_count":21017078,"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":["build-debian-package","deb","deb-package","deb-repository","debbuild","debian-packages","debian-packaging","debpkg","dpkg-deb","packaging"],"created_at":"2024-11-05T09:28:39.448Z","updated_at":"2025-04-08T19:35:28.506Z","avatar_url":"https://github.com/osspkg.png","language":"Go","readme":"\n# deb-builder\n\n[![Coverage Status](https://coveralls.io/repos/github/osspkg/deb-builder/badge.svg?branch=master)](https://coveralls.io/github/osspkg/deb-builder?branch=master)\n[![Release](https://img.shields.io/github/release/osspkg/deb-builder.svg?style=flat-square)](https://github.com/osspkg/deb-builder/releases/latest)\n[![Go Report Card](https://goreportcard.com/badge/github.com/osspkg/deb-builder)](https://goreportcard.com/report/github.com/osspkg/deb-builder)\n[![CI](https://github.com/osspkg/deb-builder/actions/workflows/ci.yml/badge.svg)](https://github.com/osspkg/deb-builder/actions/workflows/ci.yml)\n\n# install\n\n```go\n go install github.com/osspkg/deb-builder/cmd/deb-builder@latest\n```\n\n# create config file `.deb.yaml`\n\n```bash\ndeb-builder config\n```\n\nexample:\n\n```yaml\npackage: demo-app # The name of the binary package.\nsource: demo # This field identifies the source package name.\nversion: 1:0.0.1 # The version number of a package. The format is: [epoch:]upstream_version.\narchitecture: # OS Architecture: all, 386, amd64, arm, arm64\n  - 386\n  - amd64\n  - arm\n  - arm64\nmaintainer: User Name \u003cuser.name@example.com\u003e # The package maintainer’s name and email address. The name must come first, then the email address inside angle brackets \u003c\u003e (in RFC822 format).\nhomepage: http://example.com/ #The URL of the web site for this package, preferably (when applicable) the site from which the original source can be obtained and any additional upstream documentation or information may be found. \ndescription: # This field contains a description of the binary package, consisting of two parts, the synopsis or the short description, and the long description.\n  - This is a demo utility\n  - It performs some actions. Don't forget to update this text.\nsection: utils # This field specifies an application area into which the package has been classified: admin, cli-mono, comm, database, debug, devel, doc, editors, education, electronics, embedded, fonts, games, gnome, gnu-r, gnustep, graphics, hamradio, haskell, httpd, interpreters, introspection, java, javascript, kde, kernel, libdevel, libs, lisp, localization, mail, math, metapackages, misc, net, news, ocaml, oldlibs, otherosfs, perl, php, python, ruby, rust, science, shells, sound, tasks, tex, text, utils, vcs, video, web, x11, xfce, zope.\npriority: optional # This field represents how important it is that the user have the package installed: required, important, standard, optional, extra.\ncontrol:\n  depends: # This declares an absolute dependency. A package will not be configured unless all of the packages listed in its Depends field have been correctly configured (unless there is a circular dependency as described above).\n    - systemd | supervisor\n    - ca-certificates\n  build: scripts/build.sh %arch% # This field defines the script for building the application from the source code. During the build, the name of the architecture is passed to the script. Example: sh scripts/build.sh amd64\n  conffiles: # The list of package files that are configuration files, when updating, files from this list are not overwritten with new ones, unless this is specified separately;\n    - /etc/demo/config.yaml\n  preinst: scripts/preinst.sh # The script executed before installation.\n  postinst: scripts/postinst.sh # The script executed after installation.\n  prerm: scripts/prerm.sh # The script executed before removal.\n  postrm: scripts/postrm.sh # The script executed after removal.\ndata: # A list of files that will be packaged during the build, where the file in the destination package is preceded by a colon, and the source file is indicated after it. A placeholder %arch% is available indicating the architecture.\n  bin/demo: build/bin/demo_%arch% \n  etc/demo/config.yaml: configs/config.yaml \n  demo/file: '+write file content' # Use the `+` prefix to create a file with the specified content\n  demo/dir: '~/build' # Use the `~` prefix to copy the entire contents of a directory into a package\n```\n\n# build deb package\n\n```bash\ndeb-builder build --base-dir=/path_to_deb_release_directory/pool/main --tmp-dir=/path/to/build/directory\n```\n\n# build release repos\n\n```bash\ndeb-builder release --release-dir=/path_to_deb_release_directory --private-key=/path_to_pgp_key/private.pgp --origin='Company Name' --label='Company Info'\n```\n\nAdd to apt [amd64]\n\n```bash\ncurl -fsSL https://[yourdomain]/key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/[yourdomain].gpg\nsudo chmod a+r /etc/apt/keyrings/[yourdomain].gpg\nsudo tee /etc/apt/sources.list.d/[yourdomain].list \u003c\u003c'EOF'\ndeb [arch=amd64 signed-by=/etc/apt/keyrings/[yourdomain].gpg] https://[yourdomain]/ stable main\nEOF\nsudo apt update\n```\n\nAdd to apt [arm64]\n\n```bash\ncurl -fsSL https://[yourdomain]/key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/[yourdomain].gpg\nsudo chmod a+r /etc/apt/keyrings/[yourdomain].gpg\nsudo tee /etc/apt/sources.list.d/[yourdomain].list \u003c\u003c'EOF'\ndeb [arch=arm64 signed-by=/etc/apt/keyrings/[yourdomain].gpg] https://[yourdomain]/ stable main\nEOF\nsudo apt update\n```\n\n# build pgp key\n\n```bash\ndeb-builder pgp new --name='Company Name' --email='email@company' --comment='Comment about key' --path=/path_to_pgp_key\n```\n\n# Note\n\n## compilation for ARM64 in Golang with support for CGO libraries\n\nInstalling the compiler\n\n```bash\nsudo apt install gcc-aarch64-linux-gnu\n```\n\nBuilding a project\n\n```bash\nGO111MODULE=on CGO_ENABLED=1 GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc go build -a\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosspkg%2Fdeb-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosspkg%2Fdeb-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosspkg%2Fdeb-builder/lists"}