1 |
#!/bin/sh |
2 |
|
3 |
[ -d cdrom.image ] || (echo "No cdrom.image directory?"; exit 1) |
4 |
|
5 |
distname='SME Server' |
6 |
distrel=7 |
7 |
distvers=$(basename $(pwd)) |
8 |
distarch=$(uname -i) |
9 |
|
10 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
11 |
--productpath SME \ |
12 |
--withnumbers \ |
13 |
$(pwd)/cdrom.image/ |
14 |
|
15 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \ |
16 |
--product SME \ |
17 |
$(pwd)/cdrom.image \ |
18 |
$distarch > pkgorder |
19 |
|
20 |
for PKG in /releases/$distrel/smeextras/$distarch/RPMS/*.rpm |
21 |
do |
22 |
PKGFILE=$(basename $PKG) |
23 |
if [ ! -f $(pwd)/cdrom.image/SME/$PKGFILE ] |
24 |
then |
25 |
ln -sf $PKG $(pwd)/cdrom.image/SME/RPMS/ |
26 |
fi |
27 |
done |
28 |
|
29 |
PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \ |
30 |
--product "$distname" \ |
31 |
--version "$distrel.0" \ |
32 |
--release "$distname" \ |
33 |
--prodpath SME \ |
34 |
--pkgorder pkgorder \ |
35 |
$(pwd)/cdrom.image/ |
36 |
|
37 |
# Remove previous linked files |
38 |
find $(pwd)/cdrom.image/SME/RPMS/ -type l | xargs rm -f |
39 |
|
40 |
# Copy updated isolinux files |
41 |
sudo cp -f /builds/isolinux/* $(pwd)/cdrom.image/isolinux/ |
42 |
|
43 |
sed -i 's@1,2,3@1@' $(pwd)/cdrom.image/.discinfo |
44 |
|
45 |
sudo chown -R buildcvs:developers $(pwd)/cdrom.image/ |
46 |
sudo chmod -R g+w $(pwd)/cdrom.image/ |
47 |
|
48 |
echo "You now need to run /builds/bin/build_ISO as non-root" |
49 |
|
50 |
# That's it. |