-
Notifications
You must be signed in to change notification settings - Fork 3
/
build-packages
executable file
·59 lines (50 loc) · 1.22 KB
/
build-packages
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
#!/bin/bash
. ./BUILDDEFS
shopt -s extglob
shopt -s nullglob
if [ $# -eq 0 ]; then
# Default: Build all native demo and release packages
FILTER=@(release|demo)
elif [ "$1" == all ]; then
FILTER="*"
else
FILTER="$1"
fi
./install-libs
./install-data "v${FULL_DATA_RELEASE}" "full-data"
./install-data "demo-${DEMO_DATA_RELEASE}" "demo-data"
./install-win32-redist
./configure "${FILTER}"
mkdir -p "${PKGDIR}"
rm -rf "${PKGDIR}/*"
for i in ${BUILDDIR}/${FILTER} ; do
echo
echo "[ Building $(basename $i) ]"
echo $i
cd $i
make -j20
make package
mv *.@(rpm|deb|tar.bz2|zip) "${PKGDIR}"
echo "[ Leaving $(basename $i) ]"
echo
done
cd ${SOURCEDIR}
# HAX: Can't get CPack to stop adding those bogus directories...
for a in ${PKGDIR}/KoboRedux-*-win32.zip ; do
echo $a
zip -d $a "*/home/*"
done
# HAX: No reliable way of selectively flattening archives with CPack. >:-/
for a in ${PKGDIR}/koboredux-*-Linux.tar.bz2 ; do
echo $a
"${SOURCEDIR}/fix-linux-bz2-package" $a
done
# HAX: CPack makes pretty bad DEBs and RPMs
for a in ${PKGDIR}/koboredux-*-Linux.deb ; do
echo $a
fakeroot "${SOURCEDIR}/fix-linux-deb-package" $a
done
for a in ${PKGDIR}/koboredux-*-Linux.rpm ; do
echo $a
"${SOURCEDIR}/fix-linux-rpm-package" $a
done