Both sides previous revisionPrevious revisionNext revision | Previous revision |
wiki:creating_extensions [2025/05/23 11:12] – [Abbreviated steps] GNUser | wiki:creating_extensions [2025/05/23 15:07] (current) – [Abbreviated steps] GNUser |
---|
===== Abbreviated steps ===== | ===== Abbreviated steps ===== |
The Big Steps for creating an extension for application named "foo" and submitting the extension for our repository: | The Big Steps for creating an extension for application named "foo" and submitting the extension for our repository: |
- **configure; make; make DESTDIR=/tmp/package install** (important notes: 1. TCL uses the ///usr/local// prefix for extensions, 2. see recommended compiler flags in the //Installing// section below, 3. ///tmp/package// can be any empty directory) | - **$ [compiler flags] ./configure —prefix=/usr/local; make; make DESTDIR=/tmp/package install** (important notes: 1. see recommended compiler flags in the //Installing// section below, 2. ///tmp/package// can be any empty directory) |
- **strip** debug symbols from executable binaries and .so files in ///tmp/package// (see the example //strip// command in the //Installing// section below) in order to decrease the extension size | - **strip** debug symbols from executable binaries and .so files in ///tmp/package// (see the example //strip// command in the //Installing// section below) in order to decrease the extension size |
- **remove** documentation, locale, and development files from ///tmp/package// (submitting the development files as a separate extension, //foo-dev.tcz//, is required; submitting the documentation and locale files as //foo-doc.tcz// and //foo-locale.tcz// is optional) | - **remove** documentation, locale, and development files from ///tmp/package// (submitting the development files as a separate extension, //foo-dev.tcz//, is required; submitting the documentation and locale files as //foo-doc.tcz// and //foo-locale.tcz// is optional) |
- **sofware license**: common software licenses (e.g., GPL, MIT, BSD) can be specified in the //.tcz.info// file without including the complete text of the license in the extension; text of uncommon licenses should be included in your extension (e.g., ///tmp/package/usr/local/share/doc/foo/COPYING//) | - **sofware license**: common software licenses (e.g., GPL, MIT, BSD) can be specified in the //.tcz.info// file without including the complete text of the license in the extension; text of uncommon licenses should be included in your extension (e.g., ///tmp/package/usr/local/share/doc/foo/COPYING//) |
- **mksquashfs /tmp/package foo.tcz** (note that the files inside ///tmp/package// should be already stripped and you should have already separated out documentation, locale, and development files--see steps 2 and 3 above) | - **$ mksquashfs /tmp/package foo.tcz** (note that the files inside ///tmp/package// should be already stripped and you should have already separated out documentation, locale, and development files--see steps 2 and 3 above) |
- **add support files** into the same directory as //foo.tcz//: source code tarball, text file with notes on how you compiled the applicaiton (you can call it //compile_foo//), //foo.tcz.dep// (if applicable), //foo.tcz.info//--note that other than the source code tarball, all other support files are just plaintext files | - **create a project directory**: create an empty project directory (you can call it //~/foo_project//, for example) and copy //foo.tcz// into the project directory |
- **submitqc**: run the [[https://github.com/tinycorelinux/submitqc|submitqc script]] in the directory containing //foo.tcz//, //foo.tcz.dep//, and //foo.tcz.info//--the script automatically creates //foo.tcz.list//, //foo.tcz.md5.txt//, and //foo.tcz.zsync// for you | - **add these support files to project directory**: source code tarball, text file with notes on how you compiled the applicaiton (you can call it //compile_foo//), //foo.tcz.dep// (only applicable if //foo.tcz// has runtime dependencies), //foo.tcz.info//—note that other than the source code tarball, all other support files are just plaintext files |
- **final check**: a complete extension project's directory should contain //foo.tcz// (the extension itself), source code tarball, //compile_foo// (your compilation notes), //foo.tcz.dep// (if applicable), //foo.tcz.info//, //foo.tcz.list//, //foo.tcz.md5.txt//, and //foo.tcz.zsync// | - **$ cd ~/foo_project; submitqc**: run the [[https://github.com/tinycorelinux/submitqc|submitqc script]] in your project directory; the script will run some checks on //foo.tcz// and will create //foo.tcz.list//, //foo.tcz.md5.txt//, and //foo.tcz.zsync// inside your project directory |
- **tar** up the project directory then **bcrypt** it using the password //tinycore// (bcrypting it is to confuse spam filters, which tend to flag unencrypted tarballs as "dangerous") | - **final check**: a complete project directory should contain //foo.tcz// (the extension itself), source code tarball, //compile_foo// (your compilation notes), //foo.tcz.dep// (if applicable), //foo.tcz.info//, //foo.tcz.list//, //foo.tcz.md5.txt//, and //foo.tcz.zsync// |
- **email** the bcrypted tarball of your project directory to Tiny Core Linux team (tcesubmit AT gmail DOT com) | - **$ tar -cvzf foo.tar.gz ~/foo_project; bcrypt foo.tar.gz**: bcrypt is used evade our spam filter, which detects and blocks tarballs; when //bcrypt// prompts you for a password, use //tinycore//; this step produces //foo.tar.gz.bfe// |
| - **email** //foo.tar.gz.bfe// as an attachment to Tiny Core Linux team (tcesubmit AT gmail DOT com) |
| |
**Note** *.la files should not be included in -dev extensions anymore. See [[http://forum.tinycorelinux.net/index.php/topic,26201.0.html|this topic]]. | **Note** *.la files should not be included in -dev extensions anymore. See [[http://forum.tinycorelinux.net/index.php/topic,26201.0.html|this topic]]. |
===== Installing ===== | ===== Installing ===== |
Before you begin, please do not have any build depend tczs like compiletc, lib* or *dev files ondemand. All depends for building need to be loaded thru onboot or manually such as | Before you begin, please do not have any build depend tczs like compiletc, lib* or *dev files ondemand. All depends for building need to be loaded thru onboot or manually such as |
<code>tce-load -i package</code> | <code>tce-load -wi compiletc foo-dev bar-dev baz-dev</code> |
This means you do not not need to adjust your onboot list, but can use the APPS panel to download (only) packages and then install them when you need them. | This means you do not not need to adjust your onboot list, but can use the APPS panel to download (only) packages and then install them when you need them. |
Use the compiletc extension when compiling your source - it includes the most common tools, all set up for tc (gcc, make, etc). If you are getting strange make errors, try the coreutils extension. Tar errors? Get the tar extension. And so on. | Use the compiletc extension when compiling your source - it includes the most common tools, all set up for tc (gcc, make, etc). If you are getting strange make errors, try the coreutils extension. Tar errors? Get the tar extension. And so on. |