5 WINE_ORIGIN
=git
://source.winehq.org
/git
/wine.git
6 WINE_BASE
=1d612e03e0d27b92abde718002175a66a994752e
7 WINE_COMMIT
=509f96cf1fb2798a24e4f56f5327a873bab1cf69
9 mkdir
"${BUILD_DIR}"/Wine.activity
11 cp -r app activity patches background setup.py wineactivity.py build.sh sugaredwine.reg
"${BUILD_DIR}"/Wine.activity
13 mkdir
"${BUILD_DIR}"/Wine.activity
/bin
15 cp bin
/sugar-start-uri bin
/sugar-run-from-journal
"${BUILD_DIR}"/Wine.activity
/bin
17 if test x
= x
"${WINE_TREE}"; then
18 WINE_TREE
="${BUILD_DIR}"/wine
21 if test -e "${WINE_TREE}"/.git
; then
24 if test x
!= x
"${WINE_NEWTREE}"; then
25 WINE_ORIGIN
=$
(git config remote.origin.url
)
26 WINE_BASE
=$
(git merge-base HEAD origin
/master
)
27 WINE_COMMIT
=$
(git show HEAD
--pretty='format:%H'|
head -n 1)
28 rm "${BUILD_DIR}"/Wine.activity
/patches
/*
29 git format-patch
-o "${BUILD_DIR}"/Wine.activity
/patches
"${WINE_BASE}" ||
exit 1
32 git clone
"${WINE_ORIGIN}" "${WINE_TREE}" ||
exit 1
36 git config user.email nobody@nowhere ||
exit 1
37 git config user.name nobody ||
exit 1
40 (git checkout
"${WINE_COMMIT}" && test -z "$(git diff "${WINE_COMMIT}")") || \
41 (git fetch
&& git checkout
"${WINE_BASE}" && git am
"${BUILD_DIR}"/Wine.activity
/patches
/*.
patch && test -z "$(git diff)") || \
44 sed 's,^WINE_ORIGIN=.*$,WINE_ORIGIN='"${WINE_ORIGIN}"',' --in-place "${BUILD_DIR}"/Wine.activity
/build.sh
45 sed 's,^WINE_BASE=.*$,WINE_BASE='"${WINE_BASE}"',' --in-place "${BUILD_DIR}"/Wine.activity
/build.sh
46 sed 's,^WINE_COMMIT=.*$,WINE_COMMIT='"${WINE_COMMIT}"',' --in-place "${BUILD_DIR}"/Wine.activity
/build.sh
48 .
/configure
--prefix "${BUILD_DIR}"/Wine.activity
${CONFIG_OPTS} ||
exit 1
49 make ${MAKE_OPTS} ||
exit 1
50 make install-lib ||
exit 1
52 cd "${BUILD_DIR}"/Wine.activity
54 if test x
= x
"${DEBUG}"; then
55 find bin lib|
xargs strip
-g
58 find .
-type f |
sed 's,^./,,g' > MANIFEST
60 .
/setup.py dist ||
exit 1
64 mv *.xo
"${ORIG_DIR}" ||
exit 1
70 echo Activity bundle created
at ${ORIG_DIR}/${PACKAGE_FILENAME}