My favorites | Sign in
Project Home Downloads Source
Checkout   Browse   Changes    
 
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
#!/bin/sh
# postinst script for upp
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package

create_bm(){
echo "Configuring build method $2 for $1"
mkdir -p "/usr/share/upp"
cat > "/usr/share/upp/$2.bm" << EOF
BUILDER = "GCC";
COMPILER = "$1";
DEBUG_INFO = "2";
DEBUG_BLITZ = "1";
DEBUG_LINKMODE = "1";
DEBUG_OPTIONS = "-O0";
DEBUG_FLAGS = "";
RELEASE_BLITZ = "0";
RELEASE_LINKMODE = "1";
RELEASE_OPTIONS = "-O3 -ffunction-sections -fdata-sections";
RELEASE_SIZE_OPTIONS = "-Os -finline-limit=20 -ffunction-sections -fdata-sections";
RELEASE_FLAGS = "";
RELEASE_LINK = "-Wl,--gc-sections";
DEBUGGER = "gdb";
PATH = "";
INCLUDE = "/usr/include/freetype2;/usr/include/gtk-2.0;/usr/include/glib-2.0;/usr/lib/glib-2.0/include;/usr/lib/gtk-2.0/include;/usr/include/cairo;/usr/include/pango-1.0;/usr/include/atk-1.0;/usr/include/gdk-pixbuf-2.0;/usr/lib/i386-linux-gnu/glib-2.0/include;/usr/lib/x86_64-linux-gnu/glib-2.0/include;/usr/lib/i386-linux-gnu/gtk-2.0/include;/usr/lib/x86_64-linux-gnu/gtk-2.0/include;/usr/include/gtk-3.0/gdk"
LIB = "/usr/X11R6/lib";
REMOTE_HOST = "";
REMOTE_OS = "";
REMOTE_TRANSFER = "";
REMOTE_MAP = "";
LINKMODE_LOCK = "0";
EOF
chmod 644 /usr/share/upp/$2.bm
}

case "$1" in
configure)
[ "`which g++ 2>/dev/null`" ] && create_bm "g++" "GCC" || true
[ "`which clang++ 2>/dev/null`" ] && create_bm "clang++" "CLANG" || true
for v in `seq 9 -1 3` 1 0; do
[ "`which g++-4.$v 2>/dev/null`" ] && create_bm "g++-4.$v" "GCC4.$v" || true
done
[ "`ls /usr/share/upp/*.bm 2>/dev/null`" ] || create_bm "g++" "GCC"
;;

abort-upgrade|abort-remove|abort-deconfigure)
rm -f /usr/share/upp/*.bm
;;

*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

Change log

r4966 by dolik on May 18, 2012   Diff
.lpbuild2: fixed postinit scripts
Go to: 
Project members, sign in to write a code review

Older revisions

r4472 by dolik on Jan 26, 2012   Diff
.lpbuild: basics of new deb packaging
(RM #244)
All revisions of this file

File info

Size: 2466 bytes, 75 lines
Powered by Google Project Hosting