Package: packagecore
Python 3 library for building and testing Linux packages for
multiple distributions.
Works inTravis-CIandCircle-CI.Documentation atpackagecore.readthedocs.io.RequirementsPackageCore is written inpython 3and uses thePyYAMLandsetuptoolsmodules.PackageCore utilizes Docker to provide the distribution environments
for building and testing packages.InstallationThe easiest way to get PackageCore is viapip(after installing Docker and
your distro'slibyamlpackage).pip3 install packagecoreAlternatively, Linux packages are provided on our release page or you can
install in manually from this repo using thesetup.pymodule../setup.py installExecutionYou can build packages by executing:packagecore <version> [<release num>]from the source directory.In your source directory ifpackagecore.yamlcontains the configuration.
Otherwise, the configuration file can be explicitly specified:packagecore -c myfile.yaml <version> [<release num>]Use the-hflag to get a full list of options:packagecore -hConfigurationPackageCore uses YAML files for configuration. The basic structure is:name: wx-calc
maintainer: Dominique LaSalle <packagecore@solidlake.com>
license: GPL3
summary: A simple calculator using wxWidgets.
homepage: https://solidlake.com
commands:
  compile:
    - mkdir build
    - cd build
    - cmake ../ -DCMAKE_INSTALL_PREFIX=/usr
    - make
  install:
    - make install -C build DESTDIR="${BP_DESTDIR}"
  testinstall:
    - ls /usr/bin/wxcalc
packages:
  archlinux:
    buildeps:
      - gcc
      - cmake
    deps:
      - wxgtk
    container: "example.com/my/custom/container"
  centos7.3:
    buildeps:
      - gcc
      - cmake
      - wxGTK3-devel
    deps:
      - wxGTK3
  fedora25:
    buildeps:
      - gcc
      - cmake
      - wxGTK3-devel
    deps:
      - wxGTK3
  ubuntu16.04:
    buildeps:
      - gcc
      - cmake
      - libwxgtk3-dev
    deps:
      - libwxgtk3-0v5When executinginstallcommands, the environment variableBP_DESTDIRis
defined, and should be used as the root directory for installation (e.g.,
specify things likeinstall -D -m755 mybin ${BP_DESTDIR}/usr/bin/mybin).If a specifc Linux distribution requires special commands to build, you can
override the top-level commands inside of the package listing:centos7.3:
    commands:
      compile:
        - mkdir build
        - cd build
        - cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-3.0Usage in Travis-CITo use intravis-ci, you must be using at least Ubuntu 14.04 (Trusty) withdockerandsudo.sudo: required
services:
  - dockerThen, add the followingbefore_deploycommands:before_deploy:
  - sudo apt-get update -qy
  - sudo apt-get install -qy python3 python3-pip libyaml-dev
  - sudo python3 -m pip install packagecore
  - packagecore -o dist "${TRAVIS_TAG#v}"Which will build your packages with the version defined by your tag (assumes
you prefixed it with av), and place the packages in adistdirectory. Then
add the following to thedeploysection:deploy:
  ...
  file_glob: true
  file:
    - dist/*
  on:
    tags: true
  ...If you want to upload your packages to your GitHub release page, follow theTravis-CIinstructions
for how to fill out the rest of the deploy section.Usage in Circle-CITo use incircle-ci, add the following to your configurationcircle.yamlfile (assuming version 1).machine:
  services:
    - docker
...
deployment:
  package:
    tag: /^v.*$/
    commands:
      - sudo apt-get update -qy
      - sudo apt-get install -qy python3 python3-pip libyaml-dev
      - sudo python3 -m pip install packagecore
      - packagecore -o "${CIRCLE_ARTIFACTS}" "${CIRCLE_TAG#v}"