This commit was manufactured by cvs2svn to create branch 'decode'.
[gnokii.git] / packaging / make_dist
diff --git a/packaging/make_dist b/packaging/make_dist
new file mode 100755 (executable)
index 0000000..614d028
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+#
+# This script is used for preparing the tarballs.
+# Do not use it, please.
+#
+
+#
+# DeMorgan rules applied :-) I like math...
+#
+
+if [ "x`whoami`" != xpavel -a "x`whoami`" != xhugh -a "x`whoami`" != xpkot ]
+then
+   echo "No way to test this :-)"
+fi
+
+VERSION=`cat ../VERSION`
+
+rm -rf /tmp/gnokii-${VERSION}
+cp -r ../../gnokii /tmp/gnokii-${VERSION}
+
+# Some files and directories in CVS are useless
+rm -rf /tmp/gnokii-${VERSION}/xkeyb
+
+(
+   cd /tmp/gnokii-${VERSION}
+   autoconf
+   ./configure
+   cp packaging/RedHat/gnokii.spec .
+   make distclean
+   chmod 755 mkinstalldirs
+   cd ..
+   tar cvfz /tmp/gnokii-${VERSION}.tar.gz gnokii-${VERSION} --exclude CVS
+)
+
+rm -rf /tmp/gnokii-${VERSION}
+
+echo "Distribution generated in /tmp/gnokii-${VERSION}.tar.gz"