X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm-build.sh;h=22f6d7bbbea8e76f0bc5433b05087ff513262813;hb=6a0001771440ee44e4281072e45536a9a9e141d4;hp=da60f3a7c79591dffe6ae45a48b8bac433b7d256;hpb=8c550ffc70cc3e2332e1ada91af9be3b2f8c1b68;p=packages%2Frpm-build-tools.git diff --git a/rpm-build.sh b/rpm-build.sh index da60f3a..22f6d7b 100644 --- a/rpm-build.sh +++ b/rpm-build.sh @@ -20,9 +20,24 @@ alias $dist-provides="ipoldek-$dist what-provides" alias $dist-tag="./builder -cf -T $(echo $dist | tr '[a-z]' '[A-Z]')-branch -r HEAD" alias $dist-verify=dist-verify +# undo spec utf8 +# note: it will do it blindly, so any lang other than -pl is most likely broken +specutfundo() { + local spec="$1" + iconv -futf8 -tlatin2 "$spec" > m + sed -e 's/\.UTF-8//' m > "$spec" + rm -f m +} + dist-verify() { - poldek --sn $dist --sn $dist-ready --up - poldek --sn $dist --sn $dist-ready --verify=deps "$@" + case "$dist" in + ac) + args='--ignore=kdenetwork-kopete-tool-conectionstatus --ignore=gimp-plugin-swfdec --ignore=wine-drv-arts' + ;; + esac + + poldek --sn $dist --sn $dist-updates --up + poldek --sn $dist --sn $dist-updates --noignore --verify=deps $args "$@" } # displays latest used tag for a specfile @@ -105,6 +120,8 @@ pmerge() { sfget() { local url="$1" url="${url%?download}" + url="${url%?use_mirror=*}" + url="${url#http://downloads.}" url="http://dl.${url#http://prdownloads.}" # use mirror local mirror="http://nchc.dl.sourceforge.net" @@ -142,3 +159,21 @@ cvslog() { [ "$d" = "$f" ] && d=. (builtin cd $d && cvs log ${f##*/}) } + +# does diff between FILE and FILE~ +# the diff can be applied with patch -p1 +d() { + local file="$1" + local dir + if [[ "$file" = /* ]]; then + # full path -- no idea where to strip + dir=. + diff=$file + else + # relative path -- keep one path component from current dir + dir=.. + diff=${PWD##*/}/${file} + fi + + (builtin cd "$dir"; dif $diff{~,}) +}