Browse files

script debian binary package

  • Loading branch information...
1 parent ccfe717 commit 1bf6783325c543c4ddfa1dd08d428a192d0c823b @MarwanG MarwanG committed Jul 9, 2013
Showing with 58 additions and 0 deletions.
  1. +58 −0
@@ -0,0 +1,58 @@
+#creates a binary debian package from source files
+if [ ! -f arbogen ]; then
+ echo "checking for binary file... no"
+ exit 1;
+ echo "checking for binary file... ok"
+if which dpkg >/dev/null; then
+ echo "checking for dpkg... ok"
+ echo "checking for dpkg... no"
+ exit 1;
+if which fakeroot >/dev/null; then
+ echo "checking for fakeroot... ok"
+ echo "checking for fakeroot... no"
+ exit 1;
+#creating of directories
+mkdir $file
+mkdir -p $file/DEBIAN
+mkdir -p $file/usr/bin
+mkdir -p $file/usr/share/doc/arbogen
+mkdir -p $file/usr/share/man/man1
+#creation of text files
+cat <<EOF > $file/DEBIAN/control
+Package: arbogen
+Version: $1
+Section: ocaml
+Priority: optional
+Source: arbogen
+Architecture: amd64
+Maintainer: Frédéric Peschanski <>
+Description: Generates trees
+ Trees are generated randomly in different formats depending on grammar.
+#placing files in correct place
+cp doc/arbogen.1 $file/usr/share/man/man1/arbogen.1
+gzip --best $file/usr/share/man/man1/arbogen.1
+cp LICENSE.txt $file/usr/share/doc/arbogen/copyright
+cp arbogen $file/usr/bin/
+chmod -R 755 $file
+chmod a-x $file/usr/share/man/man1/arbogen.1.gz
+chmod a-x $file/usr/share/doc/arbogen/copyright
+fakeroot dpkg-deb --build $file

0 comments on commit 1bf6783

Please sign in to comment.