annotate pidgin/win32/nsis/rpm2zip.sh @ 30865:1cdae196aac8

Standardize on "cancelled". QuLogic: so, canceled or cancelled? that patch on #12130 is pretty thorough... wabz: cancelled :D wabz: that cancelled thing actually bothered me in the past wabz: never quite enough to do such a patch :p elb: that's an en_US vs en_GB thing elb: both are correct, but canceled is more common in en_{US,CA} and cancelled in en_{GB,AU,NZ,etc.} elb: personally, I use cancelled QuLogic: yea, that's what I went for before, but I think I couldn't change any strings because we were frozen QuLogic: you all had to pick the spelling that was opposite from the guy's patch, didn't you... rekkanoryo: well, considering we're generally en_US in our strings, it should be canceled in our source elb: considering they're both correct, and while I'm anal retentive, I'm not anal retentive about that, I have no preference ;-) rekkanoryo: I don't really care either way, I just think that we should be consistently en_US or en_GB throughout elb: right elb: my point is, they're both correct for en_US elb: one 'l' is simply more common rekkanoryo: ah rekkanoryo: if they're both technically correct for en_US, then "cancelled" is my vote rekkanoryo: one 'l' always looks wrong to me elb: the dictionary claims they are Sorry, dwc. Closes #12130.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 23 Aug 2010 01:41:31 +0000
parents 23b3627ecec3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30427
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
1 #!/bin/sh
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
2
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
3 here=`pwd`
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
4 for F in $*; do
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
5 case $F in
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
6 mingw32-*.noarch.rpm|mingw64-*.noarch.rpm|*/mingw32-*.noarch.rpm|*/mingw64-*.noarch.rpm)
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
7 package=`rpm -qp $F 2>/dev/null`
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
8 case $package in
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
9 mingw32-*|mingw64-*)
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
10 case $package in
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
11 mingw32-*)
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
12 cpu=i686
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
13 bits=32
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
14 ;;
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
15 mingw64-*)
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
16 cpu=x86_64
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
17 bits=64
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
18 ;;
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
19 esac
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
20 origname=`rpm -qp --queryformat='%{NAME}' $F 2>/dev/null`
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
21 name=$origname
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
22 case $name in
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
23 *-devel)
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
24 name=${name%el}
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
25 ;;
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
26 esac
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
27 shortpackage="$name"_`rpm -qp --queryformat='%{VERSION}-%{RELEASE}'_win${bits} $F 2>/dev/null`
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
28 shortpackage=${shortpackage#mingw32-}
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
29 shortpackage=${shortpackage#mingw64-}
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
30 shortname=$name
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
31 shortname=${shortname#mingw32-}
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
32 shortname=${shortname#mingw64-}
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
33 tmp=`mktemp -d`
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
34 #rpm2cpio $F | lzcat | (cd $tmp && cpio --quiet -id)
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
35 rpm2cpio $F | (cd $tmp && cpio --quiet -id)
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
36 (
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
37 cd $tmp
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
38 zipfile="$here/$shortpackage.zip"
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
39 rm -f $zipfile
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
40 (cd usr/${cpu}-pc-mingw32/sys-root/mingw && zip -q -r -D $zipfile .)
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
41 if [ -d usr/share/doc/packages/$origname ] ; then
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
42 mv usr/share/doc/packages/$origname usr/share/doc/packages/$shortname
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
43 (cd usr && zip -q -r -D $zipfile share/doc/packages/$shortname)
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
44 fi
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
45 mkdir -p manifest
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
46 unzip -l $zipfile >manifest/$shortpackage.mft
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
47 zip -q $zipfile manifest/$shortpackage.mft
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
48 N=`unzip -l $zipfile | wc -l | sed -e 's/^ *\([0-9]*\).*/\1/'`
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
49 Nm1=`expr $N - 1`
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
50 unzip -l $zipfile | sed -e "1,3 d" -e "$Nm1,$N d" | awk '{print $4}' | grep -v -E '/$' >manifest/$shortpackage.mft
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
51 zip -q $zipfile manifest/$shortpackage.mft
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
52 echo $zipfile
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
53 )
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
54 rm -rf $tmp
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
55 ;;
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
56 *)
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
57 echo $F is not a mingw32/64 RPM package >&2
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
58 ;;
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
59 esac
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
60 ;;
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
61 *)
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
62 echo $F is not a mingw32/64 RPM package >&2
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
63 ;;
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
64 esac
23b3627ecec3 Add support for the binaries built by the opensuse build service to the
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
65 done