{"id":18924004,"url":"https://github.com/mkjt2/lzdeb","last_synced_at":"2025-04-15T12:32:21.673Z","repository":{"id":57438901,"uuid":"182935073","full_name":"mkjt2/lzdeb","owner":"mkjt2","description":"Lazy Debian Package Builds","archived":false,"fork":false,"pushed_at":"2022-10-11T09:31:00.000Z","size":22,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T01:48:44.812Z","etag":null,"topics":["debian","debian-packaging","package-creation","ubuntu"],"latest_commit_sha":null,"homepage":"https://github.com/mkjt2/lzdeb","language":"Python","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/mkjt2.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}},"created_at":"2019-04-23T04:49:53.000Z","updated_at":"2024-02-07T18:41:12.000Z","dependencies_parsed_at":"2022-09-11T12:42:56.899Z","dependency_job_id":null,"html_url":"https://github.com/mkjt2/lzdeb","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkjt2%2Flzdeb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkjt2%2Flzdeb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkjt2%2Flzdeb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkjt2%2Flzdeb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkjt2","download_url":"https://codeload.github.com/mkjt2/lzdeb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249072420,"owners_count":21208183,"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":["debian","debian-packaging","package-creation","ubuntu"],"created_at":"2024-11-08T11:05:14.849Z","updated_at":"2025-04-15T12:32:21.388Z","avatar_url":"https://github.com/mkjt2.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LZDeb - build Debian packages the lazy way\n\nWant to install something from a debian / apt package but prebuilt packages don't exist?\n\n_Build your own, the easy (and lazy) way!_\n\n### Usage\n\nRun (/d is a directory):\n```bash\n$ lzdeb build /d\n```\n\nCollect the resulting debian package file in your working directory.\n\n\n```bash\n$ lzdeb build /d\n...\n$ ls *.deb\n```\n\n#### Directory `/d` should contain these files:\n1. `/d/config.yml`\n1. (optional) `/d/build`\n1. `/d/install`\n1. (optional) `/d/validate`\n\n#### Example: `examples/silversearcher-ag`\n\nCreate a debian package for [the silver searcher](https://github.com/ggreer/the_silver_searcher.git).\n\n##### `lzdeb.yml`\n```yaml\nbuilder:\n  image: ubuntu:16.04\n  bootstrap_cmds:\n    - apt update\n    - apt install -y git\nvalidator:\n  image: ubuntu:18.04\n  bootstrap_cmds:\n    - apt update\nsource:\n  type: git\n  url: https://github.com/ggreer/the_silver_searcher.git\n  ref: 2.2.0\n  pull_submodules: yes\ndeb_info:\n  pkgname: silversearcher-ag\n  pkgversion: 2.2.0\n  pkgrelease: 1\n  pkglicense: Apache 2.0\n  pkggroup: main\n  maintainer: example@lzdeb.invalid\n  description: \"A code-searching tool similar to ack, but faster. http://geoff.greer.fm/ag/\"\n  requires:\n    - liblzma-dev\u003e=5.1.1\n    - libpcre3-dev\u003e=2:8.38\n    - zlib1g-dev\u003e=1:1.2.8\n```\n\n`builder` defines the docker container within which the deb package is built.\n\n`validator` defines the docker container within which the built deb is validated (install the package, may be some test commands)\n\n`source` defines where to get the source code to be built.\n\n`deb_info` defines debian package metadata to be used when creating the debian package.\n\n##### 1. `build`\n\nInstall build tools and required libraries.  Build (compile) the code.\n```bash\n#!/usr/bin/env bash\n\nset -e\n\napt-get update\napt-get install -y \\\n  automake \\\n  pkg-config \\\n  libpcre3-dev \\\n  zlib1g-dev \\\n  liblzma-dev\n\ncd the_silver_searcher*/\n./build.sh\n```\n\n##### 2. `install`\n\nPerform a \"make install\".  A debian package is built automatically based on filesystem changes.\n```bash\n#!/usr/bin/env bash\n\nset -e\n\ncd the_silver_searcher*/\nmake install\n```\n\n##### 3. `validate`\n\nTry installing the built debian package.  Verify program runs.\n```bash\n#!/usr/bin/env bash\n\nset -e\n\napt install -y ./*.deb\nag -h\n```\n\n##### Tying it all together\n```bash\n$ lzdeb build example/silversearcher-ag\n... spin up build container\n...\n... build script gets run\n...\n... install script gets run (deb package file created)\n...\n... validate script gets run (deb package file gets installed in fresh container)\n...\n$ ls *.deb\nsilversearcher-ag_2.2.0-1_amd64.deb\n```\n\n### Installation\n\n1. [Install Python 3](https://docs.python-guide.org/starting/installation/)\n1. [Install Docker](https://docs.docker.com/install/)\n1. [Install the pip package](https://pip.pypa.io/en/stable/):\n```bash\n$ pip3 install lzdeb\n```\n\nTested on MacOS.  Probably works on Linux as well.\n\n### Caveats\n\nThere are many!\n\nWe will populate this section with the most important ones, as users report them.\n\n### How To Contribute\n\n* Fork the repo.\n* In a [virtualenv](https://virtualenv.pypa.io/en/latest/#):\n   * `pip3 install -r requirements.txt`\n   * `pip3 install -r .circleci/test_requirements`\n* _Hack Away!_\n* Testing:\n   * New unit tests to go in `test/`\n   * If you have [CircleCI](https://circleci.com) access, make sure the `test_all` workflow passes.\n   * Otherwise, you could run tests locally (see `.circleci/config.yml`):\n      * unit tests: `py.test --cov=lzdeb test/`\n      * lint: `pylint -E lzdeb test`\n      * pep8: `pycodestyle lzdeb test`\n      * type hint checking: `mypy lzdeb test`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkjt2%2Flzdeb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkjt2%2Flzdeb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkjt2%2Flzdeb/lists"}