29
by martin at piware
remove testbuilds scripts, add binary mode to packages script |
1 |
#!/bin/bash -e
|
1
by martin at piware
state for breezy final |
2 |
|
3 |
# this is part of langpack-o-matic, by Martin Pitt <martin.pitt@canonical.com>
|
|
4 |
#
|
|
5 |
# (C) 2005 Canonical Ltd.
|
|
6 |
#
|
|
29
by martin at piware
remove testbuilds scripts, add binary mode to packages script |
7 |
# Process all packages in "updated-packages": Build source packages and
|
118
by Martin Pitt
packages: drop obsolete binary; add ppa option for uploading to PPA and required .changes mangling |
8 |
# optionally upload them. Generated source tar.gz/dsc/changes files are deleted
|
9 |
# after successful upload. Entries from updated-packages are removed after
|
|
10 |
# successful processing.
|
|
1
by martin at piware
state for breezy final |
11 |
|
12 |
cd $(dirname $0) |
|
13 |
||
29
by martin at piware
remove testbuilds scripts, add binary mode to packages script |
14 |
while [ -n "$1" ]; do |
15 |
case "$1" in |
|
118
by Martin Pitt
packages: drop obsolete binary; add ppa option for uploading to PPA and required .changes mangling |
16 |
ppa)
|
17 |
PPA=ppa |
|
29
by martin at piware
remove testbuilds scripts, add binary mode to packages script |
18 |
;;
|
19 |
upload)
|
|
20 |
UPLOAD=1 |
|
21 |
;;
|
|
22 |
'') |
|
23 |
break
|
|
24 |
;;
|
|
25 |
*)
|
|
118
by Martin Pitt
packages: drop obsolete binary; add ppa option for uploading to PPA and required .changes mangling |
26 |
echo "Invalid option! Usage: $0 [ppa] [upload]" |
29
by martin at piware
remove testbuilds scripts, add binary mode to packages script |
27 |
exit 1 |
28 |
;;
|
|
29 |
esac
|
|
30 |
shift
|
|
31 |
done
|
|
32 |
||
33 |
[ -f updated-packages ] || { |
|
34 |
echo "updated-packages does not exist, nothing to do" >&2 |
|
2
by martin at piware
combined changes from breezy to head from old revision control |
35 |
exit 1 |
36 |
}
|
|
37 |
||
1
by martin at piware
state for breezy final |
38 |
for i in $(< updated-packages); do |
39 |
pushd $i >/dev/null |
|
29
by martin at piware
remove testbuilds scripts, add binary mode to packages script |
40 |
p=$(basename $i) |
74
by martin at piware
use dpkg-buildpackage instead of debuild |
41 |
chmod 755 debian/rules
|
118
by Martin Pitt
packages: drop obsolete binary; add ppa option for uploading to PPA and required .changes mangling |
42 |
dpkg-buildpackage -rfakeroot -S -us -uc |
1
by martin at piware
state for breezy final |
43 |
|
118
by Martin Pitt
packages: drop obsolete binary; add ppa option for uploading to PPA and required .changes mangling |
44 |
# PPAs only accept release pockets, fudge the .changes
|
45 |
if [ -n "$PPA" ]; then |
|
308
by Arne Goetje
* packages: accept security uploads |
46 |
sed -ri '/^Distribution:/ s/-(proposed|updates|security)$//' ../${p}_*_source.changes |
29
by martin at piware
remove testbuilds scripts, add binary mode to packages script |
47 |
fi
|
120
by Martin Pitt
packages: fix path of .changes files |
48 |
debsign ../${p}_*_source.changes |
29
by martin at piware
remove testbuilds scripts, add binary mode to packages script |
49 |
|
50 |
if [ -n "$UPLOAD" ]; then |
|
2
by martin at piware
combined changes from breezy to head from old revision control |
51 |
cd ..
|
118
by Martin Pitt
packages: drop obsolete binary; add ppa option for uploading to PPA and required .changes mangling |
52 |
dput $PPA ${p}_*_source.changes |
29
by martin at piware
remove testbuilds scripts, add binary mode to packages script |
53 |
rm -f ${p}_*_source.changes ${p}_*_source.upload ${p}_*.dsc ${p}_*.tar.gz |
54 |
cd -
|
|
2
by martin at piware
combined changes from breezy to head from old revision control |
55 |
fi
|
1
by martin at piware
state for breezy final |
56 |
|
29
by martin at piware
remove testbuilds scripts, add binary mode to packages script |
57 |
cd ..
|
30
by martin at piware
packages: remove non-source changes files |
58 |
rm -f ${p}_*.build *[^r][^c][^e].changes |
29
by martin at piware
remove testbuilds scripts, add binary mode to packages script |
59 |
|
1
by martin at piware
state for breezy final |
60 |
popd >/dev/null
|
61 |
||
62 |
# this seems to be overly complicated, but it allows us to run this script
|
|
63 |
# again if dput fails for a single package
|
|
63
by martin.pitt at ubuntu
packages: fix removal from updated-packages |
64 |
sed -i -e "s#^$i\$##" -e '/^$/d' updated-packages |
1
by martin at piware
state for breezy final |
65 |
done
|
66 |