User:Timothee Flutre/Notebook/Postdoc/2012/11/27
From OpenWetWare
(Difference between revisions)
(→How to make a GNU package?: add info about documentation) |
(→How to make a GNU package?: distcheck + license + misc) |
||
| Line 8: | Line 8: | ||
==How to make a GNU package?== | ==How to make a GNU package?== | ||
| - | * find a name for the package | + | * find a name for the package, for instance "mypkg" |
* structure the package directory: | * structure the package directory: | ||
| - | touch README INSTALL NEWS AUTHORS | + | mkdir mypkg; cd mypkg |
| - | mkdir src build-aux doc test #lib | + | touch COPYING README INSTALL NEWS AUTHORS ChangeLog |
| + | mkdir src build-aux doc test #lib scripts | ||
* populate the <code>src/</code> directory with your code, e.g. <code>hello.cpp</code> | * populate the <code>src/</code> directory with your code, e.g. <code>hello.cpp</code> | ||
| + | |||
| + | * retrieve the license, for instance [http://www.gnu.org/licenses/gpl.html GPLv3]: | ||
| + | wget -O COPYING http://www.gnu.org/licenses/gpl-3.0.txt | ||
| + | |||
| + | * fill the information files, such as README, INSTALL... | ||
* use [http://en.wikipedia.org/wiki/GNU_build_system Autotools] (see [http://www.lrde.epita.fr/~adl/autotools.html tutorial]): | * use [http://en.wikipedia.org/wiki/GNU_build_system Autotools] (see [http://www.lrde.epita.fr/~adl/autotools.html tutorial]): | ||
touch configure.ac Makefile.am src/Makefile.am doc/Makefile.am #and edit | touch configure.ac Makefile.am src/Makefile.am doc/Makefile.am #and edit | ||
autoreconf --install | autoreconf --install | ||
| - | ./configure #can be followed by --prefix= | + | ./configure #can be followed by --prefix=~/bin, LDFLAGS=-L/usr/local/lib, etc |
make | make | ||
make check | make check | ||
| Line 29: | Line 35: | ||
ards&content-type=text%2Fplain | ards&content-type=text%2Fplain | ||
touch manual.texi #and edit | touch manual.texi #and edit | ||
| + | make pdf | ||
</nowiki> | </nowiki> | ||
* make your package available to anyone: | * make your package available to anyone: | ||
make install | make install | ||
| - | make | + | make distcheck #can be followed by DISTCHECK_CONFIGURE_FLAGS=LDFLAGS=-L/usr/local/lib for instance |
| - | + | tar tzvf mypkg-0.1.tar.gz #to check what is in the release | |
* share your code, for instance on [http://en.wikipedia.org/wiki/GitHub GitHub] (see [http://openwetware.org/wiki/User:Timothee_Flutre/Notebook/Postdoc/2012/08/14 my tips]) | * share your code, for instance on [http://en.wikipedia.org/wiki/GitHub GitHub] (see [http://openwetware.org/wiki/User:Timothee_Flutre/Notebook/Postdoc/2012/08/14 my tips]) | ||
Revision as of 01:54, 28 November 2012
Main project page Previous entry
| |
How to make a GNU package?
mkdir mypkg; cd mypkg touch COPYING README INSTALL NEWS AUTHORS ChangeLog mkdir src build-aux doc test #lib scripts
wget -O COPYING http://www.gnu.org/licenses/gpl-3.0.txt
touch configure.ac Makefile.am src/Makefile.am doc/Makefile.am #and edit autoreconf --install ./configure #can be followed by --prefix=~/bin, LDFLAGS=-L/usr/local/lib, etc make make check
cd doc wget -O fdl.texi http://cvs.savannah.gnu.org/viewvc/*checkout*/gnustandards/fdl.texi?root=gnustand ards&content-type=text%2Fplain touch manual.texi #and edit make pdf
make install make distcheck #can be followed by DISTCHECK_CONFIGURE_FLAGS=LDFLAGS=-L/usr/local/lib for instance tar tzvf mypkg-0.1.tar.gz #to check what is in the release | |



