Commit ec8b9db5bbe664f35f7ab15e1668db6e6bdb1ef8

Authored by Perry Werneck
1 parent 4897924b
Exists in develop

Fixing win32 bundler.

Showing 2 changed files with 27 additions and 8 deletions   Show diff stats
win/bundle.msys
@@ -60,10 +60,9 @@ if [ "$?" == "0" ]; then @@ -60,10 +60,9 @@ if [ "$?" == "0" ]; then
60 exit -1 60 exit -1
61 fi 61 fi
62 62
63 - build_package  
64 -  
65 fi 63 fi
66 64
  65 +build_package
67 install_bin 66 install_bin
68 install_license 67 install_license
69 make_zip 68 make_zip
win/msvc-build.sh
@@ -16,7 +16,28 @@ die ( ) { @@ -16,7 +16,28 @@ die ( ) {
16 exit -1 16 exit -1
17 } 17 }
18 18
19 -cd $(dirname $(dirname $(readlink -f ${0}))) 19 +srcdir="$(dirname $(dirname $(readlink -f "${0}")))"
  20 +cd ${srcdir}
  21 +if [ "$?" != "0" ]; then
  22 + echo "Cant cd to ${srcdir}"
  23 + exit -1
  24 +fi
  25 +
  26 +if [ -z ${PKG_CONFIG} ]; then
  27 + PKG_CONFIG=${MINGW_PREFX}/bin/pkg-config
  28 +fi
  29 +
  30 +PACKAGE_NAME=$(grep AC_INIT configure.ac | cut -d[ -f2 | cut -d] -f1)
  31 +if [ -z ${PACKAGE_NAME} ]; then
  32 + echo "Cant determine package name"
  33 + exit -1
  34 +fi
  35 +
  36 +PACKAGE_VERSION=$(grep AC_INIT configure.ac | cut -d[ -f3 | cut -d] -f1)
  37 +if [ -z ${PACKAGE_VERSION} ]; then
  38 + echo "Cant determine package name"
  39 + exit -1
  40 +fi
20 41
21 # 42 #
22 # Build LIB3270 43 # Build LIB3270
@@ -26,15 +47,14 @@ echo "Building lib3270" @@ -26,15 +47,14 @@ echo "Building lib3270"
26 ./configure > $LOGFILE 2>&1 || die "Configure failure" 47 ./configure > $LOGFILE 2>&1 || die "Configure failure"
27 make clean > $LOGFILE 2>&1 || die "Make clean failure" 48 make clean > $LOGFILE 2>&1 || die "Make clean failure"
28 make all > $LOGFILE 2>&1 || die "Make failure" 49 make all > $LOGFILE 2>&1 || die "Make failure"
29 -make DESTDIR=.bin/package install > $LOGFILE 2>&1 || die "Install failure" 50 +make DESTDIR=.bin/package.msvc install > $LOGFILE 2>&1 || die "Install failure"
30 51
31 -cd .bin/package${MINGW_PREFIX} 52 +cd .bin/package.msvc
32 zip \ 53 zip \
33 -9 -r \ 54 -9 -r \
34 -x'*.a' \ 55 -x'*.a' \
35 -x'*.pc' \ 56 -x'*.pc' \
36 - ../../../${MINGW_PACKAGE_PREFIX}-lib3270-${MSYSTEM_CARCH}.zip * \ 57 + ${srcdir}/${MINGW_PACKAGE_PREFIX}-${PACKAGE_NAME}-${PACKAGE_VERSION}.devel.zip * \
37 > $LOGFILE 2>&1 || die "Zip failure" 58 > $LOGFILE 2>&1 || die "Zip failure"
38 -  
39 -  
40 59
  60 +
41 \ No newline at end of file 61 \ No newline at end of file