summaryrefslogtreecommitdiff
path: root/dist/debian/PrepareFiles
blob: 389e9447b0643729f5462fca34373908a355c8de (plain) (blame)
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
#!/bin/sh
echo "---------------------------------------------------------------------------";
echo "* Warning : Script to be used by maintainers only...                      *";
echo "* There is no warranty that script will do something good on your system. *";
echo "---------------------------------------------------------------------------";
echo "";
echo "Cleaning possible previous cached version...";
rm -f ./manaworld_X.Y.Z-R_i386/usr/share/games/manaworld/tmw;
rm -rf ./manaworld-data_X.Y.Z-R_i386/usr/share/games/manaworld/*;

echo "Making stripped version of tmw.";
make clean;
make;

echo "Copying files to their good locations...";
echo "";
echo "Executable";
cp ../../tmw ./manaworld_X.Y.Z-R_i386/usr/share/games/manaworld;

echo "Datas";
cp -r ../../data ./manaworld-data_X.Y.Z-R_i386/usr/share/games/manaworld;
echo "Removing CVS folders and automaked makefiles if some exist.";
rm -r `find ./manaworld_X.Y.Z-R_i386 -name CVS -type d`;
rm -r `find ./manaworld-data_X.Y.Z-R_i386 -name CVS -type d`;
rm -r `find ./manaworld-data_X.Y.Z-R_i386/usr/share/games/manaworld/data -name Makefile.am -type f`;
rm -r `find ./manaworld-data_X.Y.Z-R_i386/usr/share/games/manaworld/data -name Makefile.in -type f`;
rm -r `find ./manaworld-data_X.Y.Z-R_i386/usr/share/games/manaworld/data -name .cvsignore -type f`;

echo "Copying README and changelog file to their location and format.";
cp ../../README ./manaworld_X.Y.Z-R_i386/usr/share/doc/manaworld;
gzip --best -c ../../ChangeLog > ./manaworld_X.Y.Z-R_i386/usr/share/doc/manaworld/changelog.gz

echo "Applying the good rights to all files :";
echo "Setting files user and group.";
chown -R root:root ./manaworld_X.Y.Z-R_i386/*;
chown -R root:root ./manaworld-data_X.Y.Z-R_i386/*;
chown -R root:games ./manaworld_X.Y.Z-R_i386/usr/share/games/manaworld;
chown -R root:games ./manaworld-data_X.Y.Z-R_i386/usr/share/games/manaworld;
echo "Setting mod to files";
chmod -R 755 ./manaworld_X.Y.Z-R_i386/usr;
chmod 2755 ./manaworld_X.Y.Z-R_i386/usr/share/games/manaworld/tmw;
chmod 644 ./manaworld_X.Y.Z-R_i386/usr/share/games/manaworld/manaworld-icon.png;
chmod 644 ./manaworld_X.Y.Z-R_i386/usr/share/pixmaps/manaworld-icon.xpm;
chmod 644 ./manaworld_X.Y.Z-R_i386/usr/share/man/man6/manaworld.6.gz;
chmod -R 755 ./manaworld-data_X.Y.Z-R_i386/usr;
chmod 644 `find ./manaworld-data_X.Y.Z-R_i386/usr/share/games/manaworld -type f`;
echo "To Menu permissions";
chmod 644 ./manaworld_X.Y.Z-R_i386/usr/share/applications/*;
chmod 644 ./manaworld_X.Y.Z-R_i386/usr/lib/menu/*;
echo "And the rights on the control files.";
chmod -R 755 ./manaworld_X.Y.Z-R_i386/DEBIAN;
chmod -R 755 ./manaworld-data_X.Y.Z-R_i386/DEBIAN;
chown -R root:root ./manaworld_X.Y.Z-R_i386/DEBIAN;
chown -R root:root ./manaworld-data_X.Y.Z-R_i386/DEBIAN;
#chmod 644 ./manaworld_X.Y.Z-R_i386/DEBIAN/md5sums;
#chmod 644 ./manaworld-data_X.Y.Z-R_i386/DEBIAN/md5sums;
echo "The rights of the documentation";
chmod 644 ./manaworld-data_X.Y.Z-R_i386/usr/share/doc/manaworld/data/*;
chmod -R 644 ./manaworld_X.Y.Z-R_i386/usr/share/doc/manaworld/*;

echo "Don't forget to check the control files version.";
echo "Also the changelog.Debian.gz file and Man documentation has to be changed manually.";
echo "When you're done, you can launch MakePackages.";