Porting to OS/2: First port #5 distribution
Source distribution
To port FLAC, what we do first is to download a source tarball. If you want to distribute your port, you can want to distribute with a patched source tarball. How can we do that ?
Autotools provides a method to do this. It provides several archive type, but on our platform, .zip is popular. To archive a source tarball as .zip, use dist-zip target when calling make.
- gmake dist-zip
Of course, zip should be installed first, and use gmake.cmd instead of make. Otherwise, you may encounter this error.
1 2 3 4 5 | make.exe[2]: Entering directory `F:/lang/work/flac/flac-1.3.0/src/share' cp: cannot create regular file '../../flac-1.3.0/src/share/getopt/getopt.c': No such file or directory make.exe[2]: *** [distdir] Error 1 make.exe[2]: Leaving directory `F:/lang/work/flac/flac-1.3.0/src/share' |
I recommend to use gmake.cmd instead of make in general.
Now you can get flac-1.3.0.zip.
Binary distribution
In a previous article, we looked into DESTDIR. Use this variable.
- make install DESTDIR=/flac-1.3.0
Then, you can see FLAC installed into /flac-1.3.0.
Now, just zip it.
- zip -rpSm flac-1.3.0.zip \flac-1.3.0
To avoid name clash with a source tarball, it would be better to rename a source taball to flac-1.3.0-src.zip.
Now zip flac-1.3.0-src.zip into flac-1.3.0.zip, then distribute flac-1.3.0.zip. That's it. You can distribute your port with binaries and sources.
Finally, to port FLAC more perfectly, you should install libogg and nasm. How about porting them by yourself ?
Tips
If you used some non-default build options to port, then include such options into your distribution. Without that, someone else should waste a time to find the options.
If you used your own build scripts including config.site, then provide them as well.
If you want to distribute static builds only, then use --disabled-shared --enable-static with configure.
If you want to distribute shared builds only, then use --enable-shared --disable-static with configure.
The default is --enable-shared --enable-static. So both static and shared builds are built.
댓글
댓글 쓰기