Recent

Author Topic: Creating .deb packages for Lazarus applications?  (Read 15112 times)

circular

  • Hero Member
  • *****
  • Posts: 3307
    • Personal webpage
Re: Creating .deb packages for Lazarus applications?
« Reply #15 on: May 20, 2020, 12:07:46 pm »
You're welcome.  :)

As I have spent sometime struggling with those, I would prefer others not to have to go through that.
Conscience is the debugger of the mind

dbannon

  • Hero Member
  • *****
  • Posts: 1040
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Creating .deb packages for Lazarus applications?
« Reply #16 on: May 20, 2020, 02:43:36 pm »
You might like to look through this script, its very specific for my project, I build 32bit and 64bit linux and windows binaries and then make debs (and a few other packages as well).

https://github.com/tomboy-notes/tomboy-ng/blob/master/package/package.bash

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

circular

  • Hero Member
  • *****
  • Posts: 3307
    • Personal webpage
Re: Creating .deb packages for Lazarus applications?
« Reply #17 on: May 20, 2020, 09:36:42 pm »
Interesting.

I learnt about the icon folders  :)
/usr/share/icons/hicolor/*/apps

If I understand correctly you add the files:
/usr/share/locale/*/LC_MESSAGES/lclstrconsts.mo
Wouldn't that may cause an interference with another program doing the same? When removing the other program, wouldn't that remove this file as well?

The Installed-Size seems to be fixed to 4096. Instead, you could compute it when all files are ready to be archived:
Code: [Select]
SIZE_IN_KB="$(du -s ${STAGING_DIR} | awk '{print $1;}')"
echo "Installed-Size: ${SIZE_IN_KB}" >> "${STAGING_DIR}/DEBIAN/control"
Conscience is the debugger of the mind

Gizmo

  • Hero Member
  • *****
  • Posts: 698
Re: Creating .deb packages for Lazarus applications?
« Reply #18 on: May 20, 2020, 11:00:56 pm »
Also this (it used to deb package one of my tools)

https://github.com/darealshinji/debian-packaging
Lazarus 2.0.4 and fpc 3.0.4 - Linux Mint 19 LTS, Windows 10 64 and Mac OSX Catlina
Useful Page to remember : http://wiki.freepascal.org/Cross_compiling#From_Linux_x64_to_Linux_i386

dbannon

  • Hero Member
  • *****
  • Posts: 1040
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Creating .deb packages for Lazarus applications?
« Reply #19 on: May 21, 2020, 01:39:38 am »
If I understand correctly you add the files:
/usr/share/locale/*/LC_MESSAGES/lclstrconsts.mo
Wouldn't that may cause an interference with another program doing the same? When removing the other program, wouldn't that remove this file as well?
Possibly, but the lclstrconsts.mo does not change with your application, its the same file for every application you make on one version of Lazarus, it may change in small ways between versions. I have not yet come across an end user with more than one Lazarus app installed - thats sad !
The Installed-Size seems to be fixed to 4096. Instead, you could compute it when all files are ready to be archived:
Code: [Select]
SIZE_IN_KB="$(du -s ${STAGING_DIR} | awk '{print $1;}')"
echo "Installed-Size: ${SIZE_IN_KB}" >> "${STAGING_DIR}/DEBIAN/control"
Indeed you are right. I put 4096 in because, when I started, my app was less than this, it has grown since then so its certainly wrong now !

Good hint !

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

circular

  • Hero Member
  • *****
  • Posts: 3307
    • Personal webpage
Re: Creating .deb packages for Lazarus applications?
« Reply #20 on: May 21, 2020, 10:23:42 am »
Indeed there are not many installed Lazarus applications. To be fair, just making the Deb is a challenge.

You're welcome for the tip. Long live to peer review.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018