1 |
#!/bin/sh |
2 |
|
3 |
[ -d cdrom.image ] || (echo "No cdrom.image directory?"; exit 1) |
4 |
|
5 |
distname='SME Server' |
6 |
disttag='smeserver' |
7 |
distvers=$(basename $(pwd)) |
8 |
|
9 |
[ -f cdrom.image/updates/anaconda ] && chmod a+rx cdrom.image/updates/anaconda |
10 |
|
11 |
for img in product updates |
12 |
do |
13 |
/usr/bin/mkcramfs \ |
14 |
$(pwd)/cdrom.image/$img \ |
15 |
$(pwd)/cdrom.image/CentOS/base/$img.img |
16 |
done |
17 |
|
18 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
19 |
--withnumbers \ |
20 |
$(pwd)/cdrom.image/ |
21 |
|
22 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \ |
23 |
$(pwd)/cdrom.image \ |
24 |
$(uname -i) > pkgorder |
25 |
|
26 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
27 |
--withnumbers \ |
28 |
--fileorder pkgorder \ |
29 |
$(pwd)/cdrom.image/ |
30 |
|
31 |
rm -f $disttag-$distvers.iso smeserver.iso |
32 |
|
33 |
cd cdrom.image |
34 |
|
35 |
createrepo . |
36 |
sync; rm -rf .olddata |
37 |
repoview . |
38 |
sync; rm -rf .repodata |
39 |
|
40 |
bootimg='isolinux/isolinux.bin' |
41 |
bootcat='isolinux/boot.cat' |
42 |
mkisopts='-v -U -J -r -T' |
43 |
today="$(date '+%d %b %Y')" |
44 |
mkisofs $mkisopts \ |
45 |
-V "$distname $distvers" \ |
46 |
-A "$distname created on $today" \ |
47 |
-b "$bootimg" \ |
48 |
-c "$bootcat" \ |
49 |
-no-emul-boot -boot-load-size 4 -boot-info-table \ |
50 |
-x lost+found \ |
51 |
-x CVS \ |
52 |
-o "../$disttag-$distvers".iso \ |
53 |
. |
54 |
|
55 |
cd .. |
56 |
/usr/lib/anaconda-runtime/implantisomd5 $disttag-$distvers.iso |
57 |
dd if=/dev/zero bs=2048 count=150 >> $disttag-$distvers.iso |
58 |
md5sum $disttag-$distvers.iso > $disttag-$distvers.iso.md5sum |
59 |
ls -lRt > $disttag-$distvers.iso.ls-lRt |
60 |
zsyncmake $disttag-$distvers.iso |
61 |
mv $disttag-$distvers.iso $disttag.iso |
62 |
ln -sf $disttag.iso $disttag-$distvers.iso |
63 |
|
64 |
[ -d SRPMS ] || (echo "No SRPMS directory?"; exit 1) |
65 |
|
66 |
echo "Building SRPMS ISO" |
67 |
|
68 |
rm -f $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso |
69 |
|
70 |
mkisofs $mkisopts \ |
71 |
-V "$distname $distvers SRPMS" \ |
72 |
-A "$distname SRPMS created on $today" \ |
73 |
-x lost+found \ |
74 |
-x CVS \ |
75 |
-x cdrom.image \ |
76 |
-o "$disttag-$distvers-SRPMS".iso \ |
77 |
--graft-points \ |
78 |
./SRPMS=SRPMS \ |
79 |
GPL=cdrom.image/GPL \ |
80 |
RPM-GPG-KEY-SMEServer7=cdrom.image/RPM-GPG-KEY-SMEServer |
81 |
|
82 |
md5sum $disttag-$distvers-SRPMS.iso > $disttag-$distvers-SRPMS.iso.md5sum |
83 |
zsyncmake $disttag-$distvers-SRPMS.iso |
84 |
mv $disttag-$distvers-SRPMS.iso $disttag-SRPMS.iso |
85 |
ln -sf $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso |
86 |
|
87 |
# That's it. |
88 |
|