Recent

Author Topic: myrelease-20260508-1 A script that generates deb and rpm packages based on lpi  (Read 179 times)

gasensor

  • Jr. Member
  • **
  • Posts: 80
# myrelease
==================

myRelease is a Linux script that quickly packages Lazarus(.lpi) project files into deb and rpm packages in batch. It supports multiple CPU architectures and multiple OS platforms (in development). Main features include:
* Automatically generates rpm and deb packages, filling in required information
* Includes i18n translation files
* Includes necessary .icon and .desktop files
* Supports multiple CPU architectures
* Supports multiple OS platforms (in development)

### Compilation
This is a script, no compilation is required.

### Installation
Make sure myrelease.sh has executable permission.
Enter the terminal and run ./myrelease.sh -i
Enter your password when prompted. If not installed, you must include the full path to the script each time you use it.

### Runtime Environment
myrelease requires the following packages/commands:
xmlstarlet, dpkg-deb, rpmbuild, zip, fakeroot
The script will check at runtime and show an error if any are missing.

### Usage
* By default, it packages all projects contained in .lpi files in the current directory, generating rpm and deb packages in the ./dist/ directory. All information is set to default.
  ~$ cd /your_lazarus_project_dir/
  ~$ myrelease

* Package a specific .lpi project file, generating rpm and deb packages in ./dist/. All information is set to default.
  ~$ myrelease -f /your_lazarus_project_dir/project.lpi

* Other parameters:
  -o dir   Specify output directory (default ./dist/)
  -p       Format version number as XXXX-XX-XX
  -q       Quiet mode, minimal output
  -z       Compress output package files
  -k       Keep temporary files for debugging
  -i       Install myrelease to /usr/bin/
  -c       Clear config file
  -v       Show version number
  -h       Show help

* Modify current project/package information:
Edit your_lazarus_project_dir/myrelease.cfg with a text editor. Note: you must have run myrelease at least once in that directory.

* Modify myrelease default information (to avoid editing myrelease.cfg each time):
Edit ~/.config/myrelease/config with a text editor.

* Examples:
The archive includes two sample projects:
- testprjsingle: a default Lazarus blank project
- testprjmulti: a multi-CPU architecture Lazarus blank project, including linux_x86, linux_aarch64, and win_x86

### Known Issues
* Windows platform functionality is incomplete
* rpm group, Debian section, and desktop categories are untested and may cause issues
* Does not support additional programs/libraries

### License
MIT

### Contact
Eric Quan <gasensor@sina.com> / <gasensor@gmail.com>
www.gasensor.cn


https://gasensor.cn/files/myrelease-2026.05.08-1.tar.xz
https://gasensor.cn/files/myrelease_example-2026.05.08-1.tar.xz

dbannon

  • Hero Member
  • *****
  • Posts: 3826
    • tomboy-ng, a rewrite of the classic Tomboy
 :o

Wow Eric, this is something indeed.  A few questions ?  Do you make (deb, rpm) source packages or binary ?  Have you ran lintian over the deb packages ? (the rpm equivalent is buggy and badely doc'ed, don't bother).

Debian official packages have an ever expanding and very frustrating list of additional requirements, reproducible build, various machine readable information, man pages ....

Davo
Lazarus 4, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

gasensor

  • Jr. Member
  • **
  • Posts: 80
Hi Davo

myrelease can currently only generate binary packages. I haven't figured out the source code package yet.

This script currently does not involve the lintian part; it will be attempted later.

“ reproducible build,, readable information, man pages”, these are not reflected in the LPI files... If this script is indeed helpful, I will consider adding it.




:o

Wow Eric, this is something indeed.  A few questions ?  Do you make (deb, rpm) source packages or binary ?  Have you ran lintian over the deb packages ? (the rpm equivalent is buggy and badely doc'ed, don't bother).

Debian official packages have an ever expanding and very frustrating list of additional requirements, reproducible build, various machine readable information, man pages ....

Davo

 

TinyPortal © 2005-2018