Menu

Tree [dfe9bc] master /
 History

HTTPS access


File Date Author Commit
 .github 2023-04-15 Jordan Irwin Jordan Irwin [f0fbe3] Fix build script so version info can be retreiv...
 bitmaps 2017-02-18 AntumDeluge AntumDeluge [2e1bdf] Rework clear button image
 data 2023-04-28 Jordan Irwin Jordan Irwin [dfe9bc] Read lintian overrides from cached tags
 dbr 2023-04-26 Jordan Irwin Jordan Irwin [4dacbb] Read contents of file when generating MD5 hashe...
 debian 2023-04-25 Jordan Irwin Jordan Irwin [ef08ac] Attempt to manually parse current user's locale
 docs 2023-04-27 Jordan Irwin Jordan Irwin [dc85a8] Update changelog
 f_export 2023-04-17 Jordan Irwin Jordan Irwin [07c9a1] Delete unused modules
 fields 2023-04-23 Jordan Irwin Jordan Irwin [336dd1] Move modules from 'wiz' to 'ui' package
 globals 2023-04-26 Jordan Irwin Jordan Irwin [fe12ae] Add option to standardize file permissions on b...
 input 2023-04-23 Jordan Irwin Jordan Irwin [f29bb6] Don't try to delete invalid indexes from auto-l...
 lib 2023-04-27 Jordan Irwin Jordan Irwin [dcb371] Add WIP menu option to cache lintian tags
 locale 2023-04-27 Jordan Irwin Jordan Irwin [b8b2a3] Increment development version
 man 2017-01-26 AntumDeluge AntumDeluge [5347e7] Rename log level 'warning' to 'warn':
 scripts 2023-04-17 Jordan Irwin Jordan Irwin [020373] Change development version formatting
 startup 2023-04-23 Jordan Irwin Jordan Irwin [0ee156] Move dbr.app to ui.app
 system 2023-04-17 Jordan Irwin Jordan Irwin [635763] Code & docstring cleanup
 templates 2023-04-12 Jordan Irwin Jordan Irwin [aa10fe] Add Creative Commons & OpenGameArt.org license ...
 tests 2023-04-27 Jordan Irwin Jordan Irwin [613fc3] Explicity strip node separator
 ui 2023-04-28 Jordan Irwin Jordan Irwin [73b8bf] Add methods to download, parse, & cache list of...
 util 2023-04-16 Jordan Irwin Jordan Irwin [1b5723] Move util.appinfo functions into globals.applic...
 wizbin 2023-04-28 Jordan Irwin Jordan Irwin [dfe9bc] Read lintian overrides from cached tags
 .gitignore 2023-04-06 Jordan Irwin Jordan Irwin [4a9d42] Create Debian changelog dynamically in build task
 .mypy.ini 2023-04-14 Jordan Irwin Jordan Irwin [1fb19f] Disable checking wget module with mypy
 .pylintrc 2023-04-07 Jordan Irwin Jordan Irwin [b8e73e] Add build task to check code with mypy & pylint
 BUGS.txt 2023-04-26 Jordan Irwin Jordan Irwin [65ee02] Fix changelog page not resetting
 LICENSE.txt 2023-04-03 Jordan Irwin Jordan Irwin [75659a] Move license text to root directory
 Makefile 2023-04-17 Jordan Irwin Jordan Irwin [b534f9] Add build task for generation documentation wit...
 README.md 2023-04-15 Jordan Irwin Jordan Irwin [4d5c39] Update README
 TODO.txt 2023-04-26 Jordan Irwin Jordan Irwin [bc7ff1] md5sums option no longer dependent on md5sum co...
 build.conf 2023-04-27 Jordan Irwin Jordan Irwin [b8b2a3] Increment development version
 build.py 2023-04-25 Jordan Irwin Jordan Irwin [d18fd1] Fix install location of .dbp mimetype icon
 init.py 2023-04-24 Jordan Irwin Jordan Irwin [5d8aab] Shutdown app on unhandled exceptions
 portable 2023-04-04 Jordan Irwin Jordan Irwin [96d886] Show ID in logger messages

Read Me

Debreate - Debian Package Builder

Table of Contents

Description

Debreate is a utility to aid in creating Debian (.deb) packages. Currently it only
supports binary packaging (note that the term "binary package" is used loosely, as such packages
can contain scripts & non-code items such as media images, audio, & more
) for personal
distribution. Plans for using backends such as dh_make & debuild
for creating source packages are in the works. But source packaging can be quite different & is a
must if you want to get your packages into a distribution's official repositories or a
Launchpad Personal Package Archive (PPA). The latter from which
Debreate is available.

Licensing

Debreate & libdbr are licensed under MIT.

Explanation

The definition of "Debian source package" may be a little confusing, as it was for me, for those
that are new to the Debian format, or perhaps new to packaging in general. Debian
source packages are essentially no different than common tarballed source archives &
they can be available in many of the popular formats such as Gzip (.tar.gz),
BZip2 (.tar.bz2), XZ (tar.xz), Lzip (tar.lzip), et al.

To build Debian binary packages (.deb) from source, it must first be "debianized". A source package
can be debianized using one of two methods:

  1. internal/native:

    Instructions for the build utilities
    are included within the source package in a directory labelled "debian".

  2. external:

    Instructions are contained within a separate package distributed alongside the original source.

The debian directory, or package, contains files with instructions & meta data on how the source is
to be patched, compiled, & built into a binary format.

Source packaging is a must for inclusion of software in official repositories or PPAs. The
debianized package is uploaded to repo/PPA host server where it is built into a binary package &
published for release in .deb format. This differs from systems such as Arch's ABS &
FreeBSD's Ports build systems where only the instructions files are stored on the
host server. Downloading of source packages from the upstream maintainer is done as part of the
build process.

Requirements

Debreate requires the following software:

These packages are recommended to enable some features:

Building

Build Script

The software comes bundled with a build.py script to facilitate the build process & other tasks.
Note that Debreate is written in a scripting language, so building does not
include any compiling of source code. The build script is used for staging the necessary files into
a directory structure for packaging & installation.

Script Usage

The build script is invoked as python3 build.py [args] or ./build.py [args].


Arguments:

  • -h|--help
    • Show help information.
  • -v|--version
    • Show Debreate version.
  • -V|--verbose
    • Include detailed task information when printing to stdout.
  • -l|--log-level <level>
    • Logging output verbosity.
    • Levels are 0 (silent), 1 (error), 2 (warn), 3 (info),
      & 4 (debug).
  • -t|--task <task>
  • -p|--prefix <directory>
    • Path prefix to directory where files are to be installed.
  • -d|--dir <directory>
    • Target directory (defaults to system root). This is useful for directing the script to place files
      in a temporary directory rather than the intended installation path. It is equivalent to the
      "DESTDIR" environment variable used by GNU make.


Build Tasks:

  • stage
    • Prepare files for installation or distribution.
  • install
    • Install files to directory specified by --prefix argument.
  • uninstall
    • Uninstall files from directory specified by by --prefix argument.
  • dist-source
    • Build a source distribution package.
  • dist-bin
    • Build a portable binary .zip distribution package.
  • dist-deb
    • Build a binary Debian distribution package.
  • clean
    • Remove all temporary build files.
  • clean-stage
    • Remove temporary build files from 'build/stage' directory.
  • clean-deb
    • Remove temporary build files from 'debian' directory.
  • clean-dist
    • Remove built packages from 'build/dist' directory.
  • update-version
    • Update relevant files with version information from 'build.conf'.
  • test
    • Run configured unit tests from 'tests' directory.
  • check-code
  • changes
    • Print most recent changes from 'doc/changelog' to stdout.

Makefile

A generic Makefile is included for building with a GNU compliant make
command. It is simply a wrapper for the targets executed by the build.py script. Open a terminal
in the directory where the source code is located & execute make install with
superuser privileges. To uninstall, execute make uninstall. Use the environment
variables prefix & DESTDIR to control the installation target directory.

Building .deb Package

If you have devscripts installed, you can execute python3 build.py dist-deb to
build the debian package (.deb). The package will be located in the 'build/dist' directory. To
install execute dpkg --install build/dist/debreate_\<version\>_all.deb with
superuser privileges. Or open the package with a GUI installer such as
gdebi or QAPT.

Standalone/Portable

To run without installation simply execute the file named "init.py" (from a terminal ./init.py or
python3 init.py).

Usage

Sorry, not up-to-date usage information yet. But you can have a look at this
old PDF document if you like.

Links

Project Pages

Downloads

Other Pages