Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Side by Side Diff: ports/drod/build.sh

Issue 132343007: Add top level build script for building packages. (Closed) Base URL: https://naclports.googlecode.com/svn/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ports/dreadthread/build.sh ('k') | ports/expat/build.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2013 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 source pkg_info
7
8 PACKAGE_DIR=drod-213fa477000429fb9a5f4a77673394d47cadbfac 6 PACKAGE_DIR=drod-213fa477000429fb9a5f4a77673394d47cadbfac
9 source ../../build_tools/common.sh 7 EXECUTABLES=custom/bin/drod
10 8 BUILD_DIR=${NACL_PACKAGES_REPOSITORY}/${PACKAGE_DIR}/Caravel/Master/Linux
9 MAKE_TARGETS="drod-custom"
11 export DESTDIR=${PUBLISH_DIR}/.data 10 export DESTDIR=${PUBLISH_DIR}/.data
12 EXECUTABLES=custom/bin/drod
13 11
14 ConfigureStep() { 12 ConfigureStep() {
15 export CC=${NACLCC} 13 export CC=${NACLCC}
16 export CXX=${NACLCXX} 14 export CXX=${NACLCXX}
17 export AR="${NACLAR} cr" 15 export AR="${NACLAR} cr"
18 export RANLIB=${NACLRANLIB} 16 export RANLIB=${NACLRANLIB}
19 export CXXFLAGS="${NACLPORTS_CXXFLAGS} -Wno-write-strings" 17 export CXXFLAGS="${NACLPORTS_CXXFLAGS} -Wno-write-strings"
20 export SDL_CONFIG=${NACLPORTS_PREFIX}/bin/sdl-config 18 export SDL_CONFIG=${NACLPORTS_PREFIX}/bin/sdl-config
21 export LDFLAGS_common=${NACLPORTS_LDFLAGS} 19 export LDFLAGS_common=${NACLPORTS_LDFLAGS}
22 export EXTRA_LIBS="-lSDL_mixer -lSDL -lmikmod -lvorbisfile -lvorbisenc \ 20 export EXTRA_LIBS="-lSDL_mixer -lSDL -lmikmod -lvorbisfile -lvorbisenc \
23 -lvorbis -logg -lfreetype -lSDLmain -ltar -lnacl_io" 21 -lvorbis -logg -lfreetype -lSDLmain -ltar -lnacl_io"
24 } 22 }
25 23
26 BuildStep() {
27 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_DIR}/Caravel/Master/Linux
28 export MAKE_TARGETS="drod-custom"
29 DefaultBuildStep
30 }
31
32 InstallStep() { 24 InstallStep() {
33 DefaultInstallStep 25 DefaultInstallStep
34 26
35 ChangeDir ${DESTDIR} 27 ChangeDir ${DESTDIR}
36 mv usr/local/games/drod ${PUBLISH_DIR}/drod_${NACL_ARCH}${NACL_EXEEXT} 28 mv usr/local/games/drod ${PUBLISH_DIR}/drod_${NACL_ARCH}${NACL_EXEEXT}
37 tar cf ${PUBLISH_DIR}/drod_usr.tar usr 29 tar cf ${PUBLISH_DIR}/drod_usr.tar usr
38 tar cf ${PUBLISH_DIR}/drod_var.tar var 30 tar cf ${PUBLISH_DIR}/drod_var.tar var
39 rm -rf ${DESTDIR} 31 rm -rf ${DESTDIR}
40 cp ${START_DIR}/drod.html ${PUBLISH_DIR} 32 cp ${START_DIR}/drod.html ${PUBLISH_DIR}
41 ChangeDir ${PUBLISH_DIR} 33 ChangeDir ${PUBLISH_DIR}
42 python ${NACL_SDK_ROOT}/tools/create_nmf.py \ 34 python ${NACL_SDK_ROOT}/tools/create_nmf.py \
43 drod_*${NACL_EXEEXT} \ 35 drod_*${NACL_EXEEXT} \
44 -s . \ 36 -s . \
45 -o drod.nmf 37 -o drod.nmf
46 if [ ${NACL_ARCH} = pnacl ]; then 38 if [ ${NACL_ARCH} = pnacl ]; then
47 sed -i.bak 's/x-nacl/x-pnacl/g' ${PUBLISH_DIR}/drod.html 39 sed -i.bak 's/x-nacl/x-pnacl/g' ${PUBLISH_DIR}/drod.html
48 fi 40 fi
49 } 41 }
50
51 PackageInstall
52 exit 0
OLDNEW
« no previous file with comments | « ports/dreadthread/build.sh ('k') | ports/expat/build.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698