File: packageLinux

package info (click to toggle)
albumshaper 2.1-5
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 8,752 kB
  • ctags: 2,047
  • sloc: cpp: 20,875; ansic: 714; sh: 180; makefile: 51; xml: 8
file content (58 lines) | stat: -rwxr-xr-x 1,593 bytes parent folder | download | duplicates (4)
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
#!/bin/sh

#check binary does not depend on xslt, xml2, or qt
if [ -n "`ldd bin/AlbumShaper.bin | egrep '(xslt|xml2|libqt)'`" ]; then

XSLT=`ldd bin/AlbumShaper.bin | grep xslt`
XML2=`ldd bin/AlbumShaper.bin | grep xml2`
QT=`ldd bin/AlbumShaper.bin | grep libqt`

echo "Binary is not completely static!"
echo $XSLT
echo $XML2
echo $QT
exit
fi

VERSION=`cat ./src/config.h | awk '/ALBUMSHAPER_VERSION/ {print $3}' | sed s/\"//g`

#make folder
FOLDER="albumshaper_${VERSION}_linux"
echo "Creating ${FOLDER}"
rm -rf $FOLDER
mkdir $FOLDER

#copy over files
echo "Copying over files"
cp readme_precompiled.txt ${FOLDER}/readme.txt
mkdir ${FOLDER}/bin
cp bin/AlbumShaper ${FOLDER}/bin/.
cp bin/AlbumShaper.bin ${FOLDER}/bin/.
cp -R bin/images ${FOLDER}/bin/.
cp -R bin/text ${FOLDER}/bin/.
cp -R bin/themes ${FOLDER}/bin/.
cp -R bin/translations ${FOLDER}/bin/.
cp -R bin/xmlConversion ${FOLDER}/bin/.

mkdir ${FOLDER}/docs
cp bin/text/about.html ${FOLDER}/docs/.
cp bin/text/history.html ${FOLDER}/docs/.
cp docs/copying.txt ${FOLDER}/docs/.

#make tarball
TGZ="albumshaper_${VERSION}_linux.tgz"
echo "Creating ${TGZ}"
tar --exclude 'CVS' --exclude '.xvpics' -czf ${TGZ} ${FOLDER}

#make bz2
BZ2="albumshaper_${VERSION}_linux.tar.bz2"
echo "Creating ${BZ2}"
tar --exclude 'CVS' --exclude '.xvpics' -cjf ${BZ2} ${FOLDER}

#remove temporary folder
echo "Removing ${FOLDER}"
rm -rf $FOLDER

#move tgz and bz2 files to their permant location
mv albumshaper_${VERSION}_linux.tgz ../tmp/albumshaper_${VERSION}_linux.tgz
mv albumshaper_${VERSION}_linux.tar.bz2 ../tmp/albumshaper_${VERSION}_linux.tar.bz2