User:Timothee Flutre/Notebook/Postdoc/2012/11/27

From OpenWetWare

(Difference between revisions)
Jump to: navigation, search
(How to make a GNU package?: add autotools info)
(How to make a GNU package?: add info about documentation)
Line 17: Line 17:
* 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]):
-
** write the files <code>configure.ac</code> and <code>Makefile.am</code>
+
touch configure.ac Makefile.am src/Makefile.am doc/Makefile.am #and edit
-
** run the tool (repeat until there is no error anymore):
+
  autoreconf --install
  autoreconf --install
  ./configure #can be followed by --prefix=... or LDFLAGS=...
  ./configure #can be followed by --prefix=... or LDFLAGS=...
  make
  make
  make check
  make check
 +
 +
* write some documentation in [http://en.wikipedia.org/wiki/Texinfo Texinfo]:
 +
<nowiki>
 +
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
 +
</nowiki>
 +
 +
* make your package available to anyone:
  make install
  make install
  make distclean
  make distclean
  make dist
  make dist
-
 
-
* write some documentation
 
* 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 00:52, 28 November 2012

Project name Main project page
Previous entry      

How to make a GNU package?

  • find a name for the package
  • structure the package directory:
touch README INSTALL NEWS AUTHORS COPYING ChangeLog
mkdir src build-aux doc test #lib
  • populate the src/ directory with your code, e.g. hello.cpp
touch configure.ac Makefile.am src/Makefile.am doc/Makefile.am #and edit
autoreconf --install
./configure #can be followed by --prefix=... or LDFLAGS=...
make
make check
  • write some documentation in Texinfo:
 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 your package available to anyone:
make install
make distclean
make dist


Personal tools