diff options
| author | Paul C. Buetow (mars.fritz.box) <paul@buetow.org> | 2014-04-10 07:26:37 +0200 |
|---|---|---|
| committer | Paul C. Buetow (mars.fritz.box) <paul@buetow.org> | 2014-04-10 07:26:37 +0200 |
| commit | 6fedcd84160cb21cb2486ec78b7f7c2c0fd301db (patch) | |
| tree | c74bb5018413ffb42ed22aaa088f6757ac663232 | |
| parent | db09bbb6145f72083239f0a5201ca1440c4aefdd (diff) | |
add README.txt for github
| -rw-r--r-- | Makefile | 7 | ||||
| -rw-r--r-- | README.txt | 114 | ||||
| -rw-r--r-- | docs/template.1 | 10 | ||||
| -rw-r--r-- | docs/template.txt | 12 |
4 files changed, 127 insertions, 16 deletions
@@ -1,5 +1,5 @@ NAME=template -all: version docs build +all: version docu build # THIS IS NEEDED BY THE DEBIAN TOOLS @@ -29,11 +29,12 @@ clean: version: cut -d' ' -f2 debian/changelog | head -n 1 | sed 's/(//;s/)//' > .version -# Builds the docs into a manpage -docs: +# Builds the docu into a manpage +docu: pod2man --release="$(NAME) $$(cat .version)" \ --center="User Commands" ./docs/$(NAME).pod > ./docs/$(NAME).1 pod2text ./docs/$(NAME).pod > ./docs/$(NAME).txt + cp ./docs/$(NAME).txt README.txt # Build a debian package (don't sign it, modify the arguments if you want to sign it) deb: all diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..5200d1f --- /dev/null +++ b/README.txt @@ -0,0 +1,114 @@ +NAME + template - A template project + +WTF? + You may use this project in order to build your own Debian package for + your own project. This has been tested with Debian GNU/Linux Squeeze and + Debian GNU/Linux Wheezy. + + Feel free to modify any aspects. This project is just an empty example + template. + + Follow these steps: + + Install required packages + Run the following: + + sudo aptitude install lintian devscripts dpkg-dev make perl + + Todo: Ensure this are the correct packages. In order to test that I + would have to setup a blank Debian system. + + Compile the project + Go to the to level directory and run + + make + + To test run + + ./bin/template + + It should print out the version number of the project. + + Create a Debian package + Go to the to level directory and run + + make deb + + It will create the files like: + + ../template_0.0.0.0_all.deb + ../template_0.0.0.0.dsc + ../template_0.0.0.0_amd64.changes + ../template_0.0.0.0.tar.gz + + It should create a debian package in ../. Check and install it, e.g: + + lintian --pedantic ../template_0.0.0.0_all.deb + sudo dpkg -i ../template_0.0.0.0_all.deb + + Run + + dpkg -L template + + to see whats in there. You can now run + + /usr/bin/template + + or for example + + man template + + Read the Makefile + Read the Makefile in order to understand what's going on. + +Customize + Now, since you understood everything feel free to customize everything + the way you want it. E.g.: + + Don't use POD for documentation but LaTeX + + Compile a C program + + Include a ./lib dir, add it to the 'install' Makefile rule + + etc etc. + + You should also consider the following: + + Manual page + This template is using POD for creating manual pages. Edit + ./docs/template.pod and run + + make documentation + + in order to build ./docs/template.1. The page will be included in the + resulting debian package automatically. You can review the page with + + man ./docs/template.1 + + Renaming template into your project name + Rename all files which have *template* included into your own new + package name. You can do that with: + + PROJECTNAME=yourproject + find . -name \*template\* | + while read template; do git mv $template ${template/template/$PROJECTNAME}; done + + Search all content and rename *template* into your own new package name. + You can do that with: + + grep -R template . | grep -v .git | + cut -d: -f1 | uniq | xargs sed -i "s/template/$PROJECTNAME/g" + + Updating ./debian + Edit the following files accordingly to your new project (e.g. with + vim): + + vim ./debian/{control,copyright,README} + + Update changelog + Go to the to level directory and run + + dch -i + diff --git a/docs/template.1 b/docs/template.1 index 3e2d73d..a2947fa 100644 --- a/docs/template.1 +++ b/docs/template.1 @@ -123,8 +123,8 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "FOO 1" -.TH FOO 1 "2014-02-03" "template 0.0.0.0" "User Commands" +.IX Title "TEMPLATE 1" +.TH TEMPLATE 1 "2014-04-10" "template 0.0.0" "User Commands" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -254,10 +254,8 @@ Search all content and rename *template* into your own new package name. You can .IX Subsection "Updating ./debian" Edit the following files accordingly to your new project (e.g. with vim): .PP -.Vb 3 -\& ./debian/control -\& ./debian/copyright -\& ./debian/README +.Vb 1 +\& vim ./debian/{control,copyright,README} .Ve .SS "Update changelog" .IX Subsection "Update changelog" diff --git a/docs/template.txt b/docs/template.txt index bd93178..5200d1f 100644 --- a/docs/template.txt +++ b/docs/template.txt @@ -88,15 +88,15 @@ Customize man ./docs/template.1 Renaming template into your project name - Rename all files which have *template* included into your own new package - name. You can do that with: + Rename all files which have *template* included into your own new + package name. You can do that with: PROJECTNAME=yourproject find . -name \*template\* | while read template; do git mv $template ${template/template/$PROJECTNAME}; done - Search all content and rename *template* into your own new package name. You - can do that with: + Search all content and rename *template* into your own new package name. + You can do that with: grep -R template . | grep -v .git | cut -d: -f1 | uniq | xargs sed -i "s/template/$PROJECTNAME/g" @@ -105,9 +105,7 @@ Customize Edit the following files accordingly to your new project (e.g. with vim): - ./debian/control - ./debian/copyright - ./debian/README + vim ./debian/{control,copyright,README} Update changelog Go to the to level directory and run |
