Hi Mypresus
Attached is the script I used for the most recent package I submitted. It's fairly well commented but I'll point out
some of the things I'm doing anyway. The script handles compiling and creating all of the package files. If you
open the script using the following command you can view it with line numbers to follow along:
less -N CompileResizer
You can navigate with the PageUp, PageDown, up arrow, and down arrow keys.
-------------------------------------------------------------------------------------------------------
Line:
__3 I alias to busybox commands when possible since they are always present and because the GNU counterparts
sometimes behave differently. I also set options to the commands there.
_28 Sets the compiler flags to match the processor you are currently running on.
_65 to _79 I don't use make files for stuff I write so the compile and link commands go here. The size and
ls commands give me an indication of how big my program is getting as I develop it.
You would replace this with:
export CFLAGS CXXFLAGS LDFLAGS PREFIX DESTDIR plus any other variables you need to export.
./configure --prefix=$PREFIX
make
make install
_81 Uncomment this line to exit the script early if you are getting build errors. Re-comment it once the
errors have been resolved and rerun the script.
_94 The build results are archived in a separate subdirectory for each processor type. This way you can
use a removable drive to build on different architectures while retaining a backup of the other builds.
117 This is where the .info file is created. Most of the variable fields get updated automatically. The
Change-log: field (line 188) needs to be updated manually when new versions are created.
-------------------------------------------------------------------------------------------------------
You can download the the Resizer tarball (8 KBytes) from here if you want to run the script and see the results:
http://tinycorelinux.net/12.x/x86/tcz/src/Resizer/I've also attached an older less refined script that builds the gpicview image viewer. That package does use
./configure and make. It also makes other fixes for Tinycore compatibility, such as .desktop files and icons.
It also sets some variables such as PREFIX and DESTDIR so you may want to take a peek at that.
You should be able to run this script directly since it downloads the source code itself. Place the script in its
own subdirectory if you want to do this.