summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a458456fe7de4c65bdfb1684f2c0724be9776023 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Maintainer: Karl-Felix Glatzer <karl.glatzer@gmx.de>

pkgname=mingw-w64-libmodplug
pkgver=0.8.9.0
pkgrel=1
pkgdesc="A MOD playing library (mingw-w64)"
arch=('any')
url="http://modplug-xmms.sourceforge.net/"
license=('custom')
depends=('mingw-w64-crt')
options=('!strip' '!buildflags' 'staticlibs')
makedepends=('mingw-w64-gcc' 'mingw-w64-configure')
source=("https://downloads.sourceforge.net/modplug-xmms/libmodplug-${pkgver}.tar.gz")
sha1sums=('9d18572f85fdd95091befa972ee5d94139dcefde')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"

build() {
  for _arch in ${_architectures}; do
    mkdir -p ${srcdir}/libmodplug-${pkgver}/build-${_arch} && cd ${srcdir}/libmodplug-${pkgver}/build-${_arch}

    export LDFLAGS="-lssp"

    ${_arch}-configure
    make
  done
}

package() {
  for _arch in ${_architectures}; do
    cd ${srcdir}/libmodplug-${pkgver}/build-${_arch}
    make DESTDIR="${pkgdir}" install
    install -D -m644 ${srcdir}/libmodplug-${pkgver}/COPYING ${pkgdir}/usr/${_arch}/share/licenses/libmodplug/LICENSE

    ${_arch}-strip -x -g ${pkgdir}/usr/${_arch}/bin/*.dll
    ${_arch}-strip -g ${pkgdir}/usr/${_arch}/lib/*.a
  done
}
# vim:set ts=2 sw=2 et: