1#!/bin/bash 2 3# options: 4# "TRANSLATIONS=translations/baka-mplayer_$lang.ts" - put language(s) you want, override 5# "BAKA_LANG=" - overide language selection with language code (default: use locale) 6# "CONFIG+=embed_translations" - .qm files will be compiled into the binary 7# "CONFIG+=install_translations" - make install will install .qm files on your system 8# "CONFIG+=begin_translations" - .ts files will be updated based on project changes 9# "CONFIG+=update_translations" - .ts files will be trimmed to bare minimum for commits 10# "CONFIG+=release_translations" - .qm files will be compiled from .ts files 11# "INSTROOT=" - installation root directory 12# "BINDIR=/usr/bin" - installation binary directory 13# "MEDIADIR=/usr/share/pixmaps" - installation media directory 14# "APPDIR=/usr/share/applications" - installation application directory 15# "DOCDIR=/usr/share/doc/baka-mplayer" - installation documentation directory 16# "MANDIR=/usr/share/man" - installation manual directory 17# "LICENSEDIR=/usr/share/licenses/baka-mplayer" - installation license directory 18# "BAKADIR=/usr/share/baka-mplayer" - installation directory 19# "SETTINGS_FILE=bakamplayer" - settings file name 20 21 22# find qmake 23 24have() { 25 if hash $1 2>/dev/null; then 26 return 0 27 else 28 return 1 29 fi 30} 31 32check_version() { 33 qmake_ver=`$1 --version | awk '/^Using Qt version/{print $4}'` 34 if [[ $qmake_ver =~ (5.*) ]]; then 35 echo "Using qmake version $qmake_ver..." 36 return 0 37 fi 38 return 1 39} 40 41good() { 42 if have $1; then 43 if check_version $1; then 44 return 0 45 fi 46 fi 47 return 1 48} 49 50if [ "$QMAKE" == "" ]; then 51 if good qmake; then 52 QMAKE=qmake; 53 elif good qmake-qt5; then 54 QMAKE=qmake-qt5; 55 else 56 echo "Could not find valid qt version, please specify QMAKE." 57 exit 0 58 fi 59fi 60 61$QMAKE src/Baka-MPlayer.pro CONFIG+=release $@ 62