updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / mamepgui-svn / PKGBUILD
blob3d4587541e27740afd45e8b936d7361ef116bc9b
1 # Maintainer: TryA <tryagainprod@gmail.com>
3 pkgname=mamepgui-svn
4 pkgver=4806
5 pkgrel=1
6 pkgdesc="Frontend for SDLMAME/SDLMESS based on MAME Plus!"
7 arch=('i686' 'x86_64')
8 url="http://sourceforge.net/projects/mameplus"
9 license=('custom:WTFPL')
10 depends=('qt' 'quazip')
11 makedepends=('subversion')
12 conflicts=('mamepgui')
13 provides=('mamepgui=1.5.1')
14 optdepends=('sdlmame: port of MAME using SDL'
15             'sdlmess: port of MESS using SDL')
16 source=('COPYING')
17 md5sums=('389a9e29629d1f05e115f8f05c283df5')
19 _svntrunk="https://mameplus.svn.sourceforge.net/svnroot/mameplus/trunk/mamepgui"
20 _svnmod="mamepgui"
22 build() {
23   cd "${srcdir}"
24   
25   # SVN checkout
26   if [ -d ${_svnmod}/.svn ]; then
27     (cd ${_svnmod} && svn up -r ${pkgver})
28   else
29     svn co ${_svntrunk} --config-dir ./ -r ${pkgver} ${_svnmod}
30   fi
32   msg "SVN checkout done or server timeout"
33   msg "Starting make..."
35   rm -rf "${srcdir}/${_svnmod}-build"
36   cp -r "${srcdir}/${_svnmod}" "${srcdir}/${_svnmod}-build"
37   cd "${srcdir}/${_svnmod}-build"
39   # disable static compilation and SDL 1.3 linking
40   sed -e 's|CONFIG += build_static|#CONFIG += build_static|' \
41       -e 's|CONFIG += build_sdl|#CONFIG += build_sdl|'       \
42       -i common_settings.pri
44   # use included libraries instead of installed ones
45   sed -e 's|LIBS += -L./lib/$${OSDIR}|QMAKE_LIBDIR += ./lib/$${OSDIR}|' \
46       -e 's|TARGETDEPS +=|#TARGETDEPS +=|'                              \
47       -e 's|./lib/$${OSDIR}/libquazip.a|#./lib/$${OSDIR}/libquazip.a|'  \
48       -e 's|./lib/$${OSDIR}/liblzma.a|#./lib/$${OSDIR}/liblzma.a|'      \
49       -i mamepgui.pro
51   # build included liblzma.a (system one is not compatible)
52   cd lzma
53   qmake
54   make
56   # build mamepgui
57   cd ..
58   lrelease mamepgui.pro
59   qmake
60   make
63 package() {
64   # install license
65   install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
67   # install executable
68   install -Dm755 ${srcdir}/mamepgui-build/bin/mamepgui ${pkgdir}/usr/bin/mamepgui