16.3. Distributing Your Application

A few things remain to be done before you distribute your code. You should provide information about the application in text files and clean up the directories.

16.3.1. Informative Text Files

The Linux Software Map is a project that keeps track of Linux software via small index files (see http://www.execpc.com/lsm/). These index files are also used by the KDE project to keep track of KDE software. When you upload your file, you should upload an LSM, as the index file is called, along with your package.

Listing 16.2 presents an LSM file for the KSimpleApp package. You may copy and edit this file to describe any packages you might create.


Example 16.2. ksimpleapp-1.0.lsm: An LSM File for the KSimpleApp Package

   1 
   2  1: Begin3
   3  2: Title:        KSimpleApp
   4  3: Version:    1.0.0
   5  4: Entered-date:    19MAR2000
   6  5: Description:    A simple KDE application
   7  6: Keywords:    simple KDE Qt
   8  7: Author:         David Sweet <dsweet@kde.org>
   9  8: Maintained-by:  David Sweet <dsweet@kde.org>
  10  9: Primary-site:    ftp://ftp.kde.org/pub/kde/unstable/apps/
  11 10: Home-Page:    http://www.kde.org/~dsweet/KDE/KSimpleApp
  12 11: Original-site:    None
  13 12: Platforms:    KDE 2.0
  14 13: Copying-policy: GPL
  15 14: End

Most fields in this file are self-explanatory. The Primary-site: field (line 9) is often a directory on ftp.kde.org. You should look in pub/kde/unstable/apps for a subdirectory that is appropriate for your application. The Primary-site: may also be on your own server. (The URLs listed here are for demonstration purposes only, and, so, are not active.) The Copying-policy: field (line 13) is important to include. Common licenses are GPL, LGPL, BSD, and Artistic.

The LSM file should be included in the top-level directory of the package and uploaded as a separate file to whichever site you choose to upload to. (See the section "Uploading and Announcing Software" for more information.)

In the top-level directory, you should also include files called README and INSTALL. README should introduce the software and tell the user miscellaneous information that doesn't fit in other places. INSTALL gives the user instructions for installing the software. You should modify the standard INSTALL file that is included in the kexample package.

16.3.2. Cleaning Up

Before distributing your application, you should copy the entrire directory to a directory with a name similar to ksimpleapp-1.0. That is, the name should be (application name)-(version number). It is good to make a copy so that you don't break (or have to remake) your development version.

Now, in the new directory, type


   1 
   2 make maintainer-clean; make -f Makefile.dist dist.

This removes any file that the user does not need to build the software—including Makefile.dist.

Next, tar and gzip the entire directory, like so:


   1 
   2 cd ..tar -cvf ksimpleapp-1.0.tar ksimpleapp-1.0gzip ksimpleapp-1.0.tar

Again, the form of the name for the archive is important. Having a standard style makes it easier to figure out what is inside a package.

Before uploading the package, you should copy the tar.gz archive to a temporary directory and try to unpack, compile, and install it with the following:


   1 
   2 gzip -d ksimpleapp-1.0.tar.gz
   3 tar -xvf ksimpleapp-1.0.tar
   4 cd ksimpleapp-1.0
   5 ./configure
   6 make
   7 make install
   8 

Better yet, you should take it to a different computer and try it out.

16.3.3. Uploading and Announcing Software

If you are distributing GPL KDE software, you may upload it to ftp://upload.kde.org/Incoming.Packages uploaded here are made available for download on over one hundred KDE FTP mirror sites around the world (see http://www.kde.org/mirrors.html for a list of these mirrors).

Note

Please don't upload this sample package to upload.kde.org or any other site for testing purposes—or for any other reason. Thanks.

Be sure to upload both the .tar.gz file and a copy of the LSM file (don't gzip or tar this copy of the LSM file).

Now you are ready to announce the release of your software! One announcement will be made automatically on the kde-announce mailing list. This is done automatically in response to your upload to the Incoming directory and is based on your LSM.

Another good place to announce your software is at Freshmeat, http://www.freshmeat.net. This is a popular place for posting and finding out about new, free software.

If your software works on Linux (which it should if you are writing with KDE), you can announce its release on the USENET newsgroup comp.os.linux.announce. This is a moderated newsgroup, so your post won't appear immediately. Be sure to read http://www.cs.helsinki.fi/u/mjrauhal/linux/cola-submit.html before posting. It gives some rules and tips for posting to this list.

And now, back to work! You have to get the next version out.