summaryrefslogtreecommitdiff
path: root/setup/Linux/mkpkg.sh
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-05-03 21:08:42 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-05-03 21:08:42 +0400
commit1058def8e7827e56ce4a70afb4aeacb5dc44148f (patch)
tree4495d23e7b54ab5700e3839081e797c1eafe0db9 /setup/Linux/mkpkg.sh
downloadoss4-upstream.tar.gz
Imported Upstream version 4.2-build2006upstream/4.2-build2006upstream
Diffstat (limited to 'setup/Linux/mkpkg.sh')
-rw-r--r--setup/Linux/mkpkg.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/setup/Linux/mkpkg.sh b/setup/Linux/mkpkg.sh
new file mode 100644
index 0000000..4ccfe90
--- /dev/null
+++ b/setup/Linux/mkpkg.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+. ./.directories
+
+VERSION=`sh showversion.sh`
+RELEASE=`cat buildid.dat`
+ARCH=`uname -i`
+OSSNAME=oss-linux
+
+RPMNAME=$OSSNAME-$VERSION
+PKGNAME=$OSSNAME-$VERSION-$RELEASE.$ARCH
+echo building $RPMNAME.rpm
+
+rm -rf spec $RPMNAME
+mkdir $RPMNAME
+echo "Version: " $VERSION > spec
+echo "Release: " $RELEASE >> spec
+echo "Name: " $OSSNAME >> spec
+cat setup/Linux/spec.tmpl | sed "s:OSSLIBDIR:\"$OSSLIBDIR\":g" >> spec
+echo "%files" >> spec
+(cd prototype; find . -type f -print | sed 's/^.//g' > /tmp/filelist)
+cat /tmp/filelist >> spec
+rm -rf /tmp/prototype
+cp -af prototype /tmp
+tar zcvf /tmp/oss $RPMNAME
+rpmbuild -bb --define "_sourcedir /tmp" --define "_rpmdir ./" --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' spec
+# Cleanup
+rm -rf /tmp/oss /tmp/filelist $RPMNAME spec
+
+if test -f 4front-private/export_package.sh
+then
+ sh 4front-private/export_package.sh $PKGNAME.rpm . `sh showversion.sh` /tmp `uname -i`-26
+fi