User:Timothee Flutre/Notebook/Postdoc/2012/11/27
From OpenWetWare
Project name | <html><img src="/images/9/94/Report.png" border="0" /></html> Main project page <html><img src="/images/c/c3/Resultset_previous.png" border="0" /></html>Previous entry<html> </html> |
How to make a GNU package?
mkdir mypkg; cd mypkg
touch AUTHORS BUGS ChangeLog NEWS README
wget -O COPYING http://www.gnu.org/licenses/gpl-3.0.txt
mkdir src touch src/mytemplate.cpp
touch configure.ac # and edit it
touch Makefile.am # and edit it
autoreconf --install # use autoreconf --force the next times #if needed, use: 'automake --add-missing' and 'libtoolize --force'
mkdir test; cd test/ touch test/Makefile.am
mkdir doc; cd doc/ wget -O fdl.texi http://cvs.savannah.gnu.org/viewvc/*checkout*/gnustandards/fdl.texi?root=gnustandards&content-type=text%2Fplain touch manual_mypkg.texi # and edit it make pdf
./configure # can be followed by --prefix=$HOME, LDFLAGS=-L/usr/local/lib, 'CXXFLAGS=-O0 -g', etc make # can be followed by LDFLAGS="-L/usr/local/lib -static" as well as CXXFLAGS="-DDEBUG -Wall" make check # to automatically execute the tests
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 git init git add AUTHORS COPYING ChangeLog INSTALL Makefile.am NEWS README TODO build-aux/* configure.ac git add src/Makefile.am src/hello.cpp git add doc/Makefile.am doc/manual_hello.texi doc/fdl.texi git add tests/Makefile.am tests/test1.bash git commit -m "first commit" # and edit .git/info/exclude or .gitignore, tag your release, etc And check that you have all required files in your repo: cd ~/tmp; git clone ~/<path_to_original_repo>/hello autoreconf --force ./configure make make check make install make distcheck
|