GithubHelp home page GithubHelp logo

ppa_packaging's Introduction

PPA Packaging

Script for preparing PPA packages. No need to handle all the messy Debian tools ๐Ÿ˜ฌ

The purpose and working has been described in an article in my blog.

Usages

The program is driven by enviroment variables, which need to be set:

# Details of the env variables are described in the script help (`prepare_ppa_package --help`).

export PPA_PAK_LAUNCHPAD_ID='myuser'
export PPA_PAK_EMAIL='[email protected]'

export PPA_PAK_COPYRIGHT='gpl2'
export PPA_PAK_DESCRIPTION='Interpreter of object-oriented scripting language Ruby'
export PPA_PAK_HOMEPAGE='https://www.ruby-lang.org/'
export PPA_PAK_DISTROS='focal,jammy'
export PPA_PAK_SECTION='interpreters'
export PPA_PAK_BUILD_DEPS='autoconf,automake,bison,ca-certificates,curl,libc6-dev,libffi-dev,libgdbm-dev,libncurses5-dev,libsqlite3-dev,libtool,libyaml-dev,make,openssl,patch,pkg-config,sqlite3,zlib1g,zlib1g-dev,libreadline-dev,libssl-dev,libgmp-dev'

# These activate one of the two different modes, based on the format; see sections below.
#
export PPA_PAK_PACKAGE_NAME='foo'
export PPA_PAK_VERSION='bar'

# This will launch the procedure.
#
# `--cowbuild` will perform a test build locally, before uploading to Launchpad.
#
prepare_ppa_package --cowbuild /path/to/ruby

The above command will prepare the deb source package and upload it to Launchpad, which will build the binary packages and make them available in the specified PPA ๐Ÿ˜

Tarball-based workflow

When publishing a package from a (unpacked) tarball, one specifies the exact package name and version:

export PPA_PAK_VERSION='3.1.2'
export PPA_PAK_PACKAGE_NAME='ruby3.1'

The disadvantage, in this mode, is that one needs to manually find and unpack the tarball, and set the variables above.

Repository-based workflow

In this mode, one provides the repository, and specifies a regex that describes the version tag and package name:

# Note that this variable has a leading and trailing slash, and captures the version numbers in round brackets (capturing groups).
#
export PPA_PAK_VERSION='/v(3)_(1)_([0-9]+)/'
export PPA_PAK_PACKAGE_NAME='ruby$1.$2'

The program will:

  • fetch the latest tags,
  • find the latest one (based on $PPA_PAK_VERSION),
  • check it out,
  • then prepare the package version and name using the capturing groups matched by $PPA_PAK_VERSION,
  • and follow up with the same procedure as the tarball mode.

With the example variables above, the resulting metadata is:

  • latest tag: v3_1_2
  • package version: 3.1.2
  • package name: ruby3.1

If the package name is fixed, it's not necessary to specify matching variables.

Licenses

Due to limitations of the dh_make tool, only a few preset licenses are available (see script help), and multiple licenses are not possible; as of v2.202102 (Oct/2022), the MIT license is not included.

In order to specify any other license(s), create a license file, and set it as PPA_PAK_COPYRIGHT value.

Presets

See the presets directory for some preset configurations.

ppa_packaging's People

Contributors

64kramsystem avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ticketsolve

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.