Permalink
Browse files

packaging scripts fix

  • Loading branch information...
1 parent 419c43b commit f55676c3e9cef0f67b1024cc0a0bf094bba0f95a @MarwanG MarwanG committed Jul 12, 2013
Showing with 33 additions and 10 deletions.
  1. +17 −2 debianBin_amd64.sh
  2. +15 −7 debianBin_i386.sh
  3. +1 −1 opampackaging.sh
View
19 debianBin_amd64.sh
@@ -4,6 +4,14 @@
file=arbogen_`cat VERSION`_1
+#testing if in correct folder
+if [ ! -f configure.in ]; then
+ echo "checking if in correct folder... no"
+ exit 1;
+else
+ echo "checking if in correct folder... ok"
+fi
+
if which dpkg >/dev/null; then
echo "checking for dpkg... ok"
else
@@ -31,7 +39,7 @@ mkdir -p $file/usr/share/man/man1
#creation of text files
cat <<EOF > $file/DEBIAN/control
Package: arbogen
-Version: $1
+Version: `cat VERSION`
Section: ocaml
Priority: optional
Source: arbogen
@@ -44,10 +52,17 @@ EOF
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/
+
+#compiling to create a executable.
+./compile.sh
+cp bin/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
#packaging
fakeroot dpkg-deb --build $file
+
+#cleaning up
+./cleanup.sh
View
22 debianBin_i386.sh
@@ -2,12 +2,12 @@
#debianBin.sh
#creates a binary debian package from source files
-
-if [ ! -f arbogen ]; then
- echo "checking for binary file... no"
+#testing if in correct folder
+if [ ! -f configure.in ]; then
+ echo "checking if in correct folder... no"
exit 1;
else
- echo "checking for binary file... ok"
+ echo "checking if in correct folder... ok"
fi
if which dpkg >/dev/null; then
@@ -24,7 +24,8 @@ else
exit 1;
fi
#creating of directories
-file=arbogen_$1_1
+file=arbogen_`cat VERSION`_1
+
mkdir $file
mkdir -p $file/DEBIAN
mkdir -p $file/usr/bin
@@ -36,7 +37,7 @@ mkdir -p $file/usr/share/man/man1
#creation of text files
cat <<EOF > $file/DEBIAN/control
Package: arbogen
-Version: $1
+Version: `cat VERSION`
Section: ocaml
Priority: optional
Source: arbogen
@@ -45,14 +46,21 @@ Maintainer: Frédéric Peschanski <Frederic.Peschanski@lip6.fr>
Description: Generates trees
Trees are generated randomly in different formats depending on grammar.
EOF
+
#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/
+
+#compiling
+./compile.sh
+cp bin/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
#packaging
fakeroot dpkg-deb --build $file
+
+#clean up
+./cleanup.sh
View
2 opampackaging.sh
@@ -3,7 +3,7 @@
#creates an opam package
#the verision is passed as a parameter
-file=arbogen.$1
+file=arbogen.`cat VERSION`
mkdir $file
cat <<EOF > $file/descr

0 comments on commit f55676c

Please sign in to comment.