WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Step by step guide to building a package.  (Read 2444 times)

Offline squeezypeas

  • Newbie
  • *
  • Posts: 22
Step by step guide to building a package.
« on: October 03, 2015, 04:13:52 AM »
I'm trying to follow the wiki to build a package that I have written but I am struggling to make any sense from it and would be grateful for any help.

I have compiled and tested my code and it works from the command line but I've been trying to get the package to work manually with no success. I have created the package and copied it to optional and edited the onboot.lst but what now? How do I get it to run? How do I create a startup script with optional arguments?

wrt the wiki...
How do I create a configure file or make file?
Are the EXPORT flags commands to be typed into the console or entered into a config file?
Can't I just compile with gcc and set flags on the command line?
If so, do I still need to make, and how?
Is /tmp the assumed compilation folder?
In “mkdir -p /tmp/package/usr/local/tce.installed”, is tce-installed an assumed name for something?
The compiletc extension is deprecated.
Should I add a version number to the executable/package?

An update to the wiki with a basic step by step example would be helpful, where filename and folder name assumptions are clearly identifiable.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
Re: Step by step guide to building a package.
« Reply #1 on: October 03, 2015, 10:54:38 AM »
Hi squeezypeas
Quote
Are the EXPORT flags commands to be typed into the console or entered into a config file?
They can be entered at the command line if you wish.
Quote
Can't I just compile with gcc and set flags on the command line?
Yes.
Quote
If so, do I still need to make, and how?
No.
Quote
Is /tmp the assumed compilation folder?
It often is used for compilation, but you could use a subdirectory under  /home/tc.
Quote
In “mkdir -p /tmp/package/usr/local/tce.installed”, is tce-installed an assumed name for something?
No, that's the actual name of the subdirectory. If your package requires a startup script, place it in that subdirectory.
The script should have the same name as the package without the  .tcz  suffix. If you don't require a startup script,
place an empty file there with the same name as the package without the  .tcz  suffix.

Quote
The compiletc extension is deprecated.
No, that's what the build package is called under X86. Under PI it was named compile-essentials.
Quote
Should I add a version number to the executable/package?
Version information should be listed in the  .info  file and be accessible by the program itself.

    [EDIT]: Crossed out incorrect statement.  Rich
« Last Edit: October 05, 2015, 08:47:38 AM by Rich »

Offline squeezypeas

  • Newbie
  • *
  • Posts: 22
Re: Step by step guide to building a package.
« Reply #2 on: October 03, 2015, 01:10:42 PM »
Thanks. That will help a lot.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Step by step guide to building a package.
« Reply #3 on: October 04, 2015, 11:20:19 PM »

If you don't require a startup script, place an empty file there with the same name as the package without the  .tcz  suffix.


If you don't have a startup script, do not add empty file, it will be created by the system automatically. In such case you do not need the empty /usr/local/tce.installed directory.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline squeezypeas

  • Newbie
  • *
  • Posts: 22
Re: Step by step guide to building a package.
« Reply #4 on: October 05, 2015, 12:11:35 AM »
Even if I just copy the tcz to optional?

Offline jncl

  • Newbie
  • *
  • Posts: 38
Re: Step by step guide to building a package.
« Reply #5 on: October 05, 2015, 04:28:46 AM »
Hi squeezypeas,

    Have you got a copy of the TCL book http://tinycorelinux.net/~curaga/corebook.pdf, some very useful info in here in relation to creating extensions, although it's based on the x86 version.

    In simple terms, extensions, .tcz files, are loaded during the boot process, if their name is included in the onboot.lst file and they exist in the optional directory. To run a startup script add a entry for it in the /opt/bootlocal.sh file, or /opt/bootnetwork.sh if it requires network access.

  My understanding of the use of 'startup scripts' in /tmp/package/usr/local/tce.installed is that they are used to manage extension loading functions, such as placement of default configuration files etc, rather than actually starting the application, as other necessary extensions may not have been loaded at that time, or the system may not yet be fully functionally.

HTH

  Jon

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
Re: Step by step guide to building a package.
« Reply #6 on: October 05, 2015, 09:04:48 AM »
Hi bmarkus

If you don't require a startup script, place an empty file there with the same name as the package without the  .tcz  suffix.


If you don't have a startup script, do not add empty file, it will be created by the system automatically. In such case you do not need the empty /usr/local/tce.installed directory.

Sorry, I stand corrected. Don't know why that popped into my head. Updated my previous reply.

Offline squeezypeas

  • Newbie
  • *
  • Posts: 22
Re: Step by step guide to building a package.
« Reply #7 on: October 05, 2015, 09:26:36 AM »
I do have it working now but still have to do a few things to satisfy the requirements to get it into the repo (manual/info file/etc.). I have a persistent package that runs with /bin/<program>, which is more than I had a week ago so thanks to everyone that replied.