Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/rpms
diff options
context:
space:
mode:
authorBernie Innocenti <bernie@codewiz.org>2010-07-29 19:28:19 (GMT)
committer Bernie Innocenti <bernie@codewiz.org>2010-07-29 19:28:19 (GMT)
commitf4b1bc86804246c067e9dc5501b53693f2bcca70 (patch)
treeb43d5a20f2468f91a65660c3151c6be197a5205f /rpms
parent6c3bb362ef40b32d60ed1df09b68a0cf4fabfaa5 (diff)
Add script to upload rpms
Diffstat (limited to 'rpms')
-rw-r--r--rpms/common/Makefile.common4
-rwxr-xr-xrpms/common/uploadrpm48
2 files changed, 52 insertions, 0 deletions
diff --git a/rpms/common/Makefile.common b/rpms/common/Makefile.common
index 146d46b..ae8df28 100644
--- a/rpms/common/Makefile.common
+++ b/rpms/common/Makefile.common
@@ -844,3 +844,7 @@ rebase : clean download
# there is more stuff to clean, now that we have upstream files
clean ::
@rm -fv $(UPSTREAM_FILES)
+
+#bernie
+uploadrpm::
+ $(COMMON_DIR)/uploadrpm $(NAME).spec
diff --git a/rpms/common/uploadrpm b/rpms/common/uploadrpm
new file mode 100755
index 0000000..f68539a
--- /dev/null
+++ b/rpms/common/uploadrpm
@@ -0,0 +1,48 @@
+#!/bin/bash
+#
+# Copyright 2007, 2008, 2010 Bernie Inncenti <bernie@codewiz.org>
+#
+
+repodir=/upload/dextrose/testing/f11-0.88/rpms
+arch=i386
+remote=sunjammer.sugarlabs.org
+
+me=`basename $0`
+if [ ! $# = 1 ] ; then
+ me=`basename $0`
+ echo "Usage: $me <spec>"
+ echo " (does not rebuild)"
+ exit 1
+fi
+
+if [ -n "$remote" ]; then
+ repourl="$remote:$repodir"
+else
+ repourl="$repodir"
+fi
+
+rsync="rsync -aP"
+spec=`basename $1`
+dir=`dirname $1`
+base=${spec/.spec}
+
+rpms_dir=$dir/../RPMS
+[ -d $rpms_dir ] || rpms_dir=$dir
+
+srpm_dir=$dir/../SRPMS
+[ -d $srpm_dir ] || srpm_dir=$dir
+
+shopt -s extglob
+set -x
+$rsync $dir/$spec "$repourl/specs/"
+$rsync $rpms_dir/$base-!(debuginfo-*|*src).rpm "$repourl/$arch/os/"
+$rsync $rpms_dir/$base-debuginfo-*.rpm "$repourl/$arch/debug/"
+$rsync $srpm_dir/$base-*.src.rpm "$repourl/source/"
+
+for repo in "$repodir/$arch/os" "$repodir/$arch/debug" "$repodir/source"; do
+ if [ -n "$remote"]; then
+ ssh $remote "createrepo '$repo'; chmod -R g+w '$repo/repodata'"
+ else
+ createrepo "$repo"; chmod -R g+w "$repo/repodata"
+ fi
+done