XOOPS: How to use the GPL or LGPL

Posted by: Okion 2002/12/11 20:33:02 3776 reads This is a brief explanation of how to place a program under the GNU General Public License or the Lesser General Public License. (The Lesser GPL, also called the LGPL, has superseded the Library GPL, which was also called the LGPL.) If you are looking for more detailed information, consider perusing our list of frequently-asked questions about the GNU General Public License.


If you are considering using the GNU Lesser General Public License, please read the article "Why you shouldn't use the Library GPL for your next library" first. The article explains why it may be better to use the ordinary GPL instead, and how we would make the decision.

Whichever license you plan to use, the process involves adding two elements to each source file of your program: a copyright notice (such as "Copyright 1999 Linda Jones"), and a statement of copying permission, saying that the program is distributed under the terms of the GNU General Public License (or the Lesser GPL).

You should also include a copy of the license itself somewhere in the distribution of your program. In GNU programs the license is usually in a file called COPYING; it should be the plain ASCII text version of the license. Use either the text version of the GPL or the text version Lesser GPL.

The copyright notice should include the year in which you finished preparing the release (so if you finished it in 1998 but didn't post it until 1999, use 1998). You should add the proper year for each release: for example, "Copyright 1998, 1999 Linda Jones" if some versions were finished in 1998 and some were finished in 1999. If several people have helped write the code, use all their names.

If you have copied code from other programs covered by the same license, copy their copyright notices too. Put all the copyright notices together, right near the top of each file.

It is very important for practical reasons to include contact information for how to reach you, perhaps in the README file, but this has nothing to do with the legal issues of applying the license.

The copying permission statement should come right after the copyright notices. For a one-file program, the statement (for the GPL) should look like this:


This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

For programs that are more than one file, it is better to replace "this program" with the name of the program, and begin the statement with a line saying "This file is part of NAME". For instance,


This file is part of Foobar.

Foobar is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Foobar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Foobar; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

This statement should go near the beginning of every source file, close to the copyright notices. For using the Lesser GPL, insert the word "Lesser" before "General" in all three places.

For interactive programs, it is usually a good idea to make the program print out a brief notice about copyright and copying permission when it starts up. See the end of the GNU GPL for more information about this.

There is no legal requirement to register your copyright with anyone; simply distributing the program makes it copyrighted. However, it is a very good idea to register the copyright with the US Registry of Copyrights, because that puts you in a stronger position against anyone who violates the license in the US. Most other countries have no system of copyright registration.

If the program runs on some form of the GNU operating system, such as GNU/Linux or GNU/Hurd, we would probably like to make a link to the web site for your program. So please tell webmasters@gnu.org the URL. Also, we would like to list your program in the Free Software Directory once it is working solidly. Please contact directory@gnu.org.

It is also possible to make your program a GNU package, a part of the GNU Project. (That's if we like the program--we have to look at it first, and decide.) If you might be interested in joining up with the GNU Project in this way, please tell gnu@gnu.org, and we'll explain more.

But you can use the GPL or the Lesser GPL even if your program is not a GNU package. Anyone can use these licenses.

Please send FSF & GNU inquiries & questions to gnu@gnu.org. There are also other ways to contact the FSF.

Please send comments on these web pages to webmasters@gnu.org, send other questions to gnu@gnu.org.

Copyright (C) 2001 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.