debian: added copyrights for the spanish and french translators
[barry.git] / maintainer / make-yum.sh
blob8a75e68d470cf2424352d91be27047f63807b179
1 #!/bin/bash
4 # Note that to use this script, you need to add "%_gpg_name" to your
5 # ~/.rpmmacros file.
8 set -e
10 if [ -z "$1" ] ; then
11 echo "Usage: make-yum.sh builddir"
12 exit 1
15 if [ -z "$GPG_AGENT_INFO" ] ; then
16 echo "Press enter to continue if gpg-agent is running,"
17 echo "Otherwise, run:"
18 echo
19 echo " eval \$(gpg-agent --daemon --default-cache-ttl n)"
20 echo
21 echo "to preserve your sanity. n is in seconds, and default"
22 echo "from gpg-agent is 600 seconds."
23 read
26 BUILDDIR="$1"
28 # Sign all RPMs found under $BUILDDIR/
29 echo "Note: ~/.rpmmacros has been overridden to use gpg-agent..."
30 echo "Enter an empty password here."
31 rpmsign --addsign $(find $BUILDDIR -name "*.rpm" -print)
33 # Create the YUM repo files for each architecture
34 for arch in i386 source-i386 i586 source-i586 i686 source-i686 x86_64 source-x86_64 ; do
35 for dir in $(find $BUILDDIR -name "$arch" -type d -print) ; do
36 createrepo $dir
37 cp yum/key $dir/RPM-GPG-KEY-barry
38 done
39 done
41 # Sign the repomd.xml files (opensuse checks for this)
42 for rfile in $(find $BUILDDIR -type f -name "repomd.xml" -print) ; do
43 gpg --use-agent --default-key B6C2250E --armor \
44 --output $rfile.asc \
45 --detach-sign $rfile
46 cp yum/key $rfile.key
47 done