Skip to content

Commit

Permalink
package: Harmonize metadata and document recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
matteodelabre committed Sep 10, 2020
1 parent c5a99c2 commit 598747a
Show file tree
Hide file tree
Showing 15 changed files with 164 additions and 47 deletions.
2 changes: 2 additions & 0 deletions docs/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Adding a new package

See [instructions for creating a package recipe](package.md).

* clone this repository
* switch to `testing` branch
* edit package/$PACKAGE/package, making sure to bump the version
Expand Down
94 changes: 94 additions & 0 deletions docs/package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
## Structure of a package recipe

For consistency, please list the fields in your recipes in the same order as they are described below.

Derived from:

* <https://www.debian.org/doc/debian-policy/ch-controlfields.html>
* <https://wiki.archlinux.org/index.php/PKGBUILD>

### Metadata fields

#### `pkgname` (required)

Name of the built package. Must only contain ASCII lowercase letters, digits and dashes. Should match the name of the upstream as closely as possible.

#### `pkgdesc` (required)

Helpful, non-technical description for the package. This should help a potential user decide if the packaged application will be useful to them. Must start with a name (e.g. “Scientific calculator” instead of “A scientific calculator”). Do not explicit the fact that the package is for the reMarkable, because it is redundant (e.g. avoid “Scientific calculator ~~for the reMarkable~~”).

#### `url` (required)

Link to the project home page.

#### `pkgver` (required)

Current version of the package. This is a Debian-style version number, that is equal to the concatenation of Arch-style versioning fields: `$epoch:$pkgver-$pkgrel`. The [deb-version rules](https://manpages.debian.org/wheezy/dpkg-dev/deb-version.5.en.html) apply, in particular make sure to:

* Make the newer version number actually greater than all the previous ones, otherwise users will not see it as an available upgrade.
* Always include a package revision number at the end of the version, reseting it to `-1` when bumping the software version, and increasing it when making changes to the recipe itself.
* Match closely the upstream version number.
- Use the version number `0.0.0` if upstream has no versioning scheme, and then only use the package revision number for increasing the version number.
- Use the `~beta` suffix for beta versions. `~` has a special meaning in Debian version numbers that makes it sort lower than any other character, even the empty string.

#### `timestamp` (required)

ISO-8601-formatted date of publication of the current software version. Note that increasing the package version (the part after the final `-`) does not require updating the `timestamp`, as it should only reflect the last modification of the source code.

#### `section` (required)

Choose one of the following sections:

Section name | Description
----------------|----------------------------------
games |
launchers | Automatically started after boot. Presents to the user a list of other apps that can be launched.
math |
readers | Document readers (PDF, EPUB, …).
utils | System tools.

If the package does not fit into one of the existing sections, add a new one to this document.

#### `maintainer` (required)

#### `license` (required)

[SPDX identifier](https://spdx.org/licenses/) of the license under which the upstream allows distribution. Note that this may be different from the license of the recipe file itself.

#### `depends` (optional)

Comma-separated list of package names that must be installed for this package to work.

See <https://www.debian.org/doc/debian-policy/ch-relationships.html>.

### Build fields

#### `image` (required)

Docker image used for building this package.

See <../image>.

#### `origin` (required)

URL to the source Git repository used for building this package.

#### `revision` (required)

SHA-1 sum of the commit corresponding to the current package version.

### Functions

#### `build()` (required)

#### `package()` (required)

### Extra files

#### `preinst` (optional)

#### `postinst` (optional)

#### `prerm` (optional)

#### `postrm` (optional)
8 changes: 5 additions & 3 deletions package/appmarkable/package
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# vim: set ft=sh:
pkgname=appmarkable
pkgver=0.1.1-1
pkgdesc="Turn your program into a very simple app for draft similar. "
section=utilities
pkgdesc="Turn your program into a very simple app for draft similar"
url=https://github.com/LinusCDE/appmarkable
pkgver=0.0.0-1
timestamp=2020-09-10T10:00Z
section=utils
maintainer="Linus K. <[email protected]>"
license=MIT

Expand Down
8 changes: 5 additions & 3 deletions package/calculator/package
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# vim: set ft=sh:
pkgname=calculator
pkgver=0.0.0-5
pkgdesc="Calculator for the reMarkable"
section=remarkable-apps
pkgdesc="Calculator"
url=https://github.com/reHackable/Calculator
pkgver=0.0.0-6
timestamp=2020-09-10T10:00Z
section=math
maintainer="Mattéo Delabre <[email protected]>"
license=GPL-v3

Expand Down
8 changes: 5 additions & 3 deletions package/draft/package
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# vim: set ft=sh:
pkgname=draft
pkgver=0.2.0-6
pkgdesc="Launcher for the reMarkable tablet which wraps around the standard interface"
section=remarkable-launchers
pkgdesc="Launcher which wraps around the standard interface"
url=https://github.com/dixonary/draft-reMarkable
pkgver=0.2.0-7
timestamp=2020-07-20T10:23Z
section=launchers
maintainer="Mattéo Delabre <[email protected]>"
license=Apache

Expand Down
6 changes: 4 additions & 2 deletions package/fingerterm/package
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# vim: set ft=sh:
pkgname=fingerterm
pkgdesc="Terminal emulator with a custom virtual keyboard"
url=https://github.com/dixonary/fingerterm-reMarkable
pkgver=1.3.5-3
pkgdesc="A terminal emulator with a custom virtual keyboard"
section=remarkable-apps
timestamp=2017-12-08T15:40Z
section=utils
maintainer="Mattéo Delabre <[email protected]>"
license=GPL2

Expand Down
11 changes: 6 additions & 5 deletions package/oxide/package
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# vim: set ft=sh:
pkgname=oxide
pkgdesc="Launcher application for the reMarkable tablet"
pkgver=1.3.2~beta-2
pkgdesc="Launcher application"
url=https://github.com/Eeems/oxide
pkgver=1.3.2~beta-3
timestamp=2020-09-10T03:41Z
section=launcher
maintainer="raisjn<[email protected]>"
section=launchers
maintainer="raisjn <[email protected]>"
license=Apache

image=qt
origin=https://github.com/Eeems/oxide
origin=https://github.com/Eeems/oxide.git
revision=17ecf0eaf9564ac5fe8745dc7f6de0f98e7f6f1e

build-app() {
Expand Down
8 changes: 5 additions & 3 deletions package/plato/package
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# vim: set ft=sh:
pkgname=plato
pkgver=0.9.1-1
pkgdesc="Port of the plato document reader to the reMarkable"
section=remarkable-apps
pkgdesc="Document reader"
url=https://github.com/LinusCDE/plato
pkgver=0.9.1-2
timestamp=2020-09-05T01:45Z
section=readers
maintainer="Linus K. <[email protected]>"
license=AGPL-v3

Expand Down
14 changes: 7 additions & 7 deletions package/remux/package
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# vim: set ft=sh:
pkgname=remux
pkgver=0.0.1-3
pkgdesc="remux is an app launcher that supports multi-tasking applications"
section=remarkable-launchers
maintainer="raisjn fan<[email protected]>"
pkgdesc="App launcher that supports multi-tasking applications"
url=https://github.com/rmkit-dev/rmkit
pkgver=0.0.1-4
timestamp=2020-09-10T03:30Z
section=launchers
maintainer="raisjn <[email protected]>"
license=MIT
depends=
conflicts="oxide draft"

image=python
origin=https://github.com/rmkit-dev/rmkit
origin=https://github.com/rmkit-dev/rmkit.git
revision=d8b29baa477ab7a4117f5b5b3e4ded0d2d87bf87

build() {
Expand Down
8 changes: 5 additions & 3 deletions package/remux/postinst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env bash

echo "Enabling remux"
systemctl daemon-reload
systemctl enable remux
systemctl start remux
echo ""
echo "Run the following commands to make remux your launcher"
echo "$ systemctl disable --now xochitl"
echo "$ systemctl enable --now remux"
echo ""
7 changes: 7 additions & 0 deletions package/remux/postrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

systemctl daemon-reload
echo ""
echo "Run the following command to enable xochitl again"
echo "$ systemctl enable --now xochitl"
echo ""
6 changes: 1 addition & 5 deletions package/remux/prerm
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#!/usr/bin/env bash

echo "Disabling remux"
systemctl disable remux --now
systemctl daemon-reload
echo "Enabling xochitl"
# just making sure we have xochitl enabled
systemctl enable xochitl --now
systemctl disable --now remux
8 changes: 5 additions & 3 deletions package/retris/package
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# vim: set ft=sh:
pkgname=retris
pkgver=0.5.5-1
pkgdesc="Implementation of rust tetris_core on the reMarkable using libremarkable"
section=remarkable-apps
pkgdesc="Tetris game"
url=https://github.com/LinusCDE/retris
pkgver=0.5.5-2
timestamp=2020-09-09T15:20Z
section=games
maintainer="Linus K. <[email protected]>"
license=MIT

Expand Down
13 changes: 7 additions & 6 deletions package/rmkit/package
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# vim: set ft=sh:
pkgname=rmkit
pkgver=0.0.1-4
pkgdesc="rmkit apps for the remarkable, includes harmony, mines and simple app script"
section=remarkable
maintainer="raisjn fan<[email protected]>"
pkgdesc="simple, harmony, mines and nao"
url=https://github.com/rmkit-dev/rmkit
pkgver=0.0.1-5
timestamp=2020-09-10T03:30Z
section=utils
maintainer="raisjn <[email protected]>"
license=MIT

image=python
origin=https://github.com/rmkit-dev/rmkit
origin=https://github.com/rmkit-dev/rmkit.git
revision=d8b29baa477ab7a4117f5b5b3e4ded0d2d87bf87

build() {
Expand All @@ -26,7 +28,6 @@ package() {
install -D -m 755 "$srcdir"/src/build/mines.exe "$pkgdir"/opt/bin/mines
install -D -m 755 "$srcdir"/src/build/nao.sh "$pkgdir"/opt/bin/nao


mkdir -p "$pkgdir"/opt/etc/draft/
install -D -m 755 "$srcdir"/src/harmony/harmony.draft "$pkgdir"/opt/etc/draft/
install -D -m 755 "$srcdir"/src/minesweeper/mines.draft "$pkgdir"/opt/etc/draft/
Expand Down
10 changes: 6 additions & 4 deletions package/rmservewacominput/package
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# vim: set ft=sh:
pkgname=rmservewacominput
pkgver=0.2.5-2
pkgdesc="Open a server on port 33333 and serve pen input"
section=remarkable-apps
depends=appmarkable
pkgdesc="Serve pen input on port 33333"
url=https://github.com/LinusCDE/rmWacomToMouse
pkgver=0.2.5-3
timestamp=2020-09-06T23:23Z
section=utils
maintainer="Linus K. <[email protected]>"
license=MIT
depends=appmarkable

image=base
origin=https://github.com/LinusCDE/rmWacomToMouse.git
Expand Down

0 comments on commit 598747a

Please sign in to comment.