Difference between revisions of "Development/Porting Packages"

From Maemo Leste Wiki
Jump to navigationJump to search
Line 21: Line 21:
* https://garage.maemo.org/
* https://garage.maemo.org/
* http://repository.maemo.org/extras/pool/fremantle/free/source/
* http://repository.maemo.org/extras/pool/fremantle/free/source/
* http://repository.maemo.org/extras-devel/pool/fremantle/free/
* http://repository.maemo.org/extras-testing/pool/fremantle/free/


= Example =
= Example =

Revision as of 18:47, 16 January 2023

Porting / Creating packages

If you're looking at creating your own package, or porting software, the first things to do are:

  1. Check if someone already ported the package (if it in the repository? Is there an issue for it?)
  2. Check if there already are Debian packaging scripts/files. Debian packages a LOT of software, so it's likely that the software is already in the Maemo repository, or someone at least has build scripts for it.
  3. (TODO)

Porting existing Maemo Fremantle packages

Maemo Fremantle ("Nokia Maemo for the N900") contains a lot of packages that are open source. Most of them should run with very few changes on Maemo Leste, the main changes you will need to make will be:

  1. Check if someone already ported the package (if it in the repository? Is there an issue for it?)
  2. Updating of the Debian packaging files/scripts.
  3. Porting to newer libraries if old libraries are used (OpenSSL 0.9.8 -> OpenSSL 1.1.x, Qt4 -> Qt5, etc)
  4. Fixing any compile errors/warnings due to more strict compile flags

Source of the packages can be found at one of these places:

Example

Getting the source package

Let's say we'd like to port a package "msid".

it's here:

http://repository.maemo.org/extras/pool/fremantle/free/source/m/msid/

get the latest version:

wget http://repository.maemo.org/extras/pool/fremantle/free/source/m/msid/msid_0.4.8-2.tar.gz
tar zxvf msid_0.4.8-2.tar.gz
cd msid-0.4.8

Creating new repo

init a git repo:

git init
git add *
git commit -a -m "initial commit from fremantle sources"

change content of `debian/compat` to `9`.

edit

debian/changelog

.

let's say the last release was:

msid (0.4.8-2) unstable; urgency=low

now the release should be:

msid (0.4.8-2+leste1) unstable; urgency=low

record your changes, add your name.

look if

debian/control

dependency versions should be changed.

installing build dependencies

sudo apt build-dep .

building

dpkg-buildpackage -b -uc

add

gbp.conf

file in

debian

directory with the following content:

[DEFAULT]
upstream-tag=%(version)s

in

debian/control

file add (if not added)

XSBC-Bugtracker: mailto:yourname@yourserver.am

icon

and the icon (this is not necessary if you port existing maemo5 package).

it is done this way.

you need to have `sharutils` installed. (app-arch/sharutils in gentoo).

  • prepare a `48x48` png file.
  • optimize it:
    optipng -strip all
  • base64 encode it
uuencode -m maeFat.png maeFat.png > maeFat.png.base64
  • Add the field
    XB-Maemo-Icon-26
    to your
    debian/control
    (in Maemo 4 the size of the icons was 26×26 pixels, hence the name of the field, which has not changed in Maemo 5)
  • Open the
    base64
    version of your image and copy from the line under
    begin-base64 644 <name of 48×48 image>
    to the line above the
    ===
    .
  • Add this to the XB-Maemo-Icon-26 field
  • Add a space in front of every line of the encoded icon. You can do that automatically using sed when you base64 encode the image:
uuencode -m <name of 48×48 image> <name of 48×48 image> | sed -e s,^,\ ,  > <name of 48×48 image>.base64

cli apps

if the program that is being ported is a cli application, then cli icon can be used.

cli icon announcement

old unexistent in archive.org too, txt file

icons as images

this is how the icon looks in ham:

Maemo-cli icon appman sample v002.png

and this is the 48x48 size icon:

Maemo-term icon v002 a001 48p.png

its base64 encoded and shifted for maemo text file is here

or here:

 begin-base64 644 maemo-term_icon_v002_a001_48p.png
 iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0
 d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACYtJREFUeNrUWkurZUcVXvXY
 59zbtyXpICEiaFrJQFDo6CDOHAi2UQdOFBw4CAqCDhU0DuIPEBtCRupIBxk4
 MBMHgpIMnChE1OAD2uADEkFpUM9z710vv7Wq6ty6u09f0+nb3Tcb6u7Hqb33
 96361qq1al/1vscfp+Ac3fjH6+S9v3owP/iYMfqyMaabz2ax62wwtnPDOPgY
 ok8pxpQoKKW9UhRC8IFI+UQ4ds7HFKLW1mujffDexRi9MXiGMQG34uborbEO
 515pckopZ7RxuN8RyflgtBrxfKeNGlNMY0ppxItGUnowSm3Rr7ezubfdnCwe
 SuMw2EsPPvi9x957+SlrNAXvCCTIWk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MxObPmzAL8jUPKZpgTMs+wey68ay7fpwLLR/qa1fMlr7gr4EwSK5WNOV2VE
 hgJ6O3HQ3ew6Ab8rRKrm26SMl18APp0l+ErAFZ2rov3YyGczyWv2WX65J5c/
 kVEiIYu3SofvmECxds/1sKQGx/l967DLKfg9hQjLpm9yeV/Ah7sFvh2BPvuv
 LJz4Rj7VYZdTy59SRY37qii6S5tNOaPcFgkxCY5KbMl1ydX3hsry+02yKRnl
 /y1Ezm4EkqzZMAj2Xl0WWLcFaAt+57CTdJjJD/cDfK0HhryEsdvGMiInnHYP
 +Dq79jU1aMBHukebLbPkuoTRVB24AbwsSx7rPYVIXzPKJh1OdA83Wxx4nYNQ
 DqGs7zJhtaFyva+KmoCPdI83duKq91iW0nn9vs0qV00hcqsSMNxry7cFzaaA
 5HqA1/T71KyiVctPqig3qV/vC/hcD2QJLWsWWvKfOgKbAn5qeV+qqPhmqqiz
 deJs8WVd6yyzabU6E7jJ8qUQSfcbfIlCPOuqKiH+gtKu72wby0sJWAqRcwH+
 mECCD+yqMLVbpGoKEUmHzxv4UlIalEZhjVosmKT5i2OtA1rLn2kVdbYE+IOS
 0uyknEp7HfUYVeQlQ65fRTZ3oxA5w2xUeaNpw18tEf99UFHWf/iLSLH8uQVf
 RyBARltrDaaEEPhbbI408jURmh/TeQWf10ZtF9iRu86mAAImSi4WeLklr5ad
 X/BCoOsMf/cdZ11HKJ/4HwdiMHyg0/2cYW8nG+X1IDefzxUI8P9ySP2KITj3
 4PMnpqT4ozZrP3bWxq7rUlmle0tsVv6xgWkg/Bg7IxPr/2K8Nbb/CTAAF12f
 5l7y6xMAAAAASUVORK5CYII=
 ====

Also add the field:

XSBC-Maemo-Display-Name: Photo light meter

pushing to maemo-leste-extras

go to maemo-leste-extras and open an issue in the extras bugtracker repo to request a repository.

ping Wizzup on #maemo-leste@irc.libera.chat to open you repo[s]. then try to be attentive to emails, because you may get github invite which you need to accept, otherwise it’ll time out(not sure when).

push your code to the newly opened repo in maemo/beowulf branch.

beowulf is the codename of the devuan release on which maemo is based.

$ git remote -v
origin  git@github.com:norayr/msid.git (fetch)
origin  git@github.com:norayr/msid.git (push)

$ git remote add maemo git@github.com:maemo-leste-extras/msid

$ git remote -v
maemo   git@github.com:maemo-leste-extras/msid (fetch)
maemo   git@github.com:maemo-leste-extras/msid (push)
origin  git@github.com:norayr/msid.git (fetch)
origin  git@github.com:norayr/msid.git (push)

$ git push maemo main
Enumerating objects: 176, done.
Counting objects: 100% (176/176), done.
Delta compression using up to 4 threads
Compressing objects: 100% (86/86), done.
Writing objects: 100% (176/176), 578.92 KiB | 4.71 MiB/s, done.
Total 176 (delta 105), reused 141 (delta 85)
remote: Resolving deltas: 100% (105/105), done.
To github.com:maemo-leste-extras/msid
 * [new branch]      main -> main

$ git checkout -b maemo/beowulf
Switched to a new branch 'maemo/beowulf'

$ git push maemo maemo/beowulf
Total 0 (delta 0), reused 0 (delta 0)
remote:
remote: Create a pull request for 'maemo/beowulf' on GitHub by visiting:
remote:      https://github.com/maemo-leste-extras/msid/pull/new/maemo/beowulf
remote:
To github.com:maemo-leste-extras/msid
 * [new branch]      maemo/beowulf -> maemo/beowulf
$

the repo needs to be tagged.

git tag 0.0.1

and then the tag has to be pushed:

git push maemo 0.0.1

in case you did some changes but don’t want to bump a tag/changelog version, you need to delete the tag locally:

git tag -d 0.0.1
git push maemo :refs/tags/0.0.1

phoenix

login https://phoenix.maemo.org/

the build sequence is:

  • source
  • binaries
  • repos

find your project. let’s say https://phoenix.maemo.org/job/msid-source/

it has to have ‘build with parameters’ button on the left.

if everything is right it’ll trigger build of binaries https://phoenix.maemo.org/job/msid-binaries/

that link, for instance, will contain arm64 build console output: https://phoenix.maemo.org/job/msid-binaries/architecture=arm64,label=arm64/1/console

wiki

add a wiki page about the package here.

links:

https://leste.maemo.org/Development https://leste.maemo.org/Development/Porting_Packages https://leste.maemo.org/Development/Building_Packages https://leste.maemo.org/Development/Modified_Software


If you import a package, please try to preserve history if possible (converting from svn -> git is not too hard)

Forking Debian/Devuan packages

(TODO - Describe what branches need to be set up, Jenkins integration, etc)

Preparing package for the repositories

See https://leste.maemo.org/Development/Building_Packages