aboutsummaryrefslogtreecommitdiffstats
path: root/create_dual.sh
blob: 60012e221db0599da89a01f668c4f4b91585c316 (plain)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/sh

DISTRIB=Mageia
TAG=manon
VERSION=2
SUPPORT=dual-CD
VV=1
MEDIAMAIN=media/core
PIECES="$HOME/build_bcd/pieces"
OLDBUILDPATH="$HOME/build_bcd/build/mageia-dual-$VERSION"
BUILDPATH="$HOME/build_bcd/build/$DISTRIB-$VERSION-$SUPPORT"
BUILDISOPATH="$HOME/build_bcd/iso/$DISTRIB-$VERSION-$SUPPORT"

# genisoimage options
AGENISO="$DISTRIB - 2 rc"
PUBLISHER="Mageia.Org"
SYSID="$PUBLISHER"
TOOL="$SYSID BCD"
VOLSET="$SYSID $DISTRIB - $VERSION"
VOLUME="$DISTRIB-$VERSION"

echo $BUILDPATH/x86_64/$MEDIAMAIN

# build both arch
./bcd.pl dual.xml all copy noiso 
./bcd.pl dual64.xml all copy noiso 

# clean
rm -rf $BUILDPATH
rm -rvf $BUILDISOPATH
mkdir -p $BUILDPATH
mkdir -p $BUILDISOPATH

# remove stuff to make size fit
for i in i586 x86_64
do
	cp -af $OLDBUILDPATH-$i/$i $BUILDPATH
	rm -rf $BUILDPATH/$i/install/images
	rm -rf $BUILDPATH/$i/isolinux
	cp -f $PIECES/iso/dual/compssUsers.pl $PIECES/iso/dual/rpmsrate $BUILDPATH/$i/media/media_info
done
sync
cp -r $PIECES/iso/dual/isolinux $BUILDPATH

# use symbolic links on noarch
cd $BUILDPATH/x86_64/$MEDIAMAIN

for i in *noarch.rpm
do
	if [ -f "../../../i586/$MEDIAMAIN/$i" ];then
		echo $i
		echo "erase package $i"
		rm -vf $i
		echo "link with the i586 one"
		ln -sf ../../../i586/$MEDIAMAIN/$i .
	else
		echo "no ../../../i586/$MEDIAMAIN/$i package"
	fi
done

# build idx file
for i in i586 x86_64
do
	cat $OLDBUILDPATH-$i/$i/pkg-$VERSION-$TAG.idx >> $BUILDPATH/$DISTRIB-$VERSION-$SUPPORT.idx
done

# build iso
genisoimage -f -r -J -hide-rr-moved -nobak -cache-inodes -no-emul-boot -boot-load-size 4  \
	-A "$AGENISO" \
	-publisher "$PUBLISHER" \
	-sysid "$SYSID" \
	-p "$TOOL" \
	-volset "$VOLSET" \
	-V "$VOLUME" \
	-o "$BUILDISOPATH/$DISTRIB-$VERSION-$SUPPORT.iso" \
	-b isolinux/isolinux.bin \
	-boot-info-table \
	-quiet \
	$BUILDPATH/

du -sh $BUILDISOPATH/$DISTRIB-$VERSION-$SUPPORT.iso
echo "$BUILDISOPATH/$DISTRIB-$VERSION-$SUPPORT.idx"
cd $BUILDISOPATH/
isohybrid -o 1 $BUILDISOPATH/$DISTRIB-$VERSION-$SUPPORT.iso
cp $BUILDPATH/$DISTRIB-$VERSION-$SUPPORT.idx .
md5sum $DISTRIB-$VERSION-$SUPPORT.iso > $DISTRIB-$VERSION-$SUPPORT.iso.md5
sha1sum $DISTRIB-$VERSION-$SUPPORT.iso > $DISTRIB-$VERSION-$SUPPORT.iso.sha1