File: openswan_release.sh

package info (click to toggle)
openswan 1%3A2.4.6%2Bdfsg.2-1.1%2Betch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 25,000 kB
  • ctags: 16,877
  • sloc: ansic: 121,112; sh: 19,782; xml: 9,699; asm: 4,422; perl: 4,087; makefile: 3,367; tcl: 713; exp: 657; yacc: 396; pascal: 328; lex: 289; sed: 265; awk: 124; lisp: 3
file content (67 lines) | stat: -rwxr-xr-x 2,195 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh

OS_CVS=anoncvs@anoncvs.openswan.org:/cvs/openswan
OS_FTP=$USER@localhost:/tmp
GNUPGHOME=/mnt/build/openswan-2
export GNUPGHOME OS_CVS OS_FTP


echo "Checking out CVS ..."
rm -rf openswan-$1 > /dev/null
cvs -z9 -d $OS_CVS co openswan-2

mv openswan-2 openswan-$1
cd openswan-$1

echo "Fixing Makefile.inc..."
cat Makefile.inc | sed s/^USE_LWRES.*/USE_LWRES?=false/ | sed s/^USE_OE.*/USE_OE?=false/ > Makefile.inc2 && mv Makefile.inc2 Makefile.inc


echo "I am setting the Version info..."
cat Makefile.ver | sed s/2.CVSHEAD/$1/ > Makefile.ver2 && mv Makefile.ver2 Makefile.ver
cat packaging/redhat/openswan.26spec | sed s/2.CVSHEAD/$1/ > n && mv n packaging/redhat/openswan.26spec
cat packaging/redhat/openswan.spec | sed s/2.CVSHEAD/$1/ > n && mv n packaging/redhat/openswan.spec
cat packaging/suse/openswan.26spec | sed s/2.CVSHEAD/$1/ > n && mv n packaging/suse/openswan.26spec
echo "If there were any errors above, abort now... [2 second pause]"
sleep 2


# TAG CVS
echo "Tagging CVS..."
TAG=`echo $1 | sed s/\\\./_/g`
cvs tag v$TAG

echo "Removing CVS bits (CVS dirs, .cvsignore files, etc...)"
# Clean up CVS remnants
find ./ -name CVS | xargs rm -rf
find ./ -name .cvsignore | xargs rm -rf
cd  ..
echo "Creating & Signing Package..."
tar -czf openswan-$1.tar.gz openswan-$1
echo "Building patches..."
cd openswan-$1
make kernelpatch2.4 > ../openswan-$1.kernel-2.4-klips.patch
make kernelpatch2.6 > ../openswan-$1.kernel-2.6-klips.patch
make nattpatch2.4 > ../openswan-$1.kernel-2.4-natt.patch
make nattpatch2.6 > ../openswan-$1.kernel-2.6-natt.patch
cd  ..
# Compress patches
gzip openswan-$1.kernel-2.4-klips.patch
gzip openswan-$1.kernel-2.4-natt.patch
gzip openswan-$1.kernel-2.6-klips.patch
gzip openswan-$1.kernel-2.6-natt.patch
# Sign binaries
gpg -sba openswan-$1.tar.gz 
gpg -sba openswan-$1.kernel-2.4-klips.patch.gz
gpg -sba openswan-$1.kernel-2.4-natt.patch.gz
gpg -sba openswan-$1.kernel-2.6-klips.patch.gz
gpg -sba openswan-$1.kernel-2.6-natt.patch.gz
chmod 644 openswan-$1*.asc

echo "Uploading to ftp/www sites..."
scp openswan-$1.*.gz* $OS_FTP
scp openswan-$1/CHANGES $OS_FTP

# Move to old/ since we're done.
mv openswan-$1* old/ 
echo "Releasing Process Done"