PKGBUILDs/libfilezilla/mingw-w64/PKGBUILD

64 lines
2.4 KiB
Bash

# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_name=libfilezilla
pkgname=mingw-w64-libfilezilla
pkgver=0.17.1
pkgrel=1
pkgdesc='Small and modern C++ library, offering some basic functionality to build high-performing, platform-independent programs (mingw-w64)'
arch=('any')
url='https://filezilla-project.org/'
license=('GPL')
depends=('mingw-w64-crt' 'mingw-w64-nettle' 'mingw-w64-gnutls')
makedepends=('mingw-w64-configure')
options=(staticlibs !strip !buildflags !makeflags)
install=
source=("https://download.filezilla-project.org/libfilezilla/libfilezilla-$pkgver.tar.bz2"
'remove-version.patch::https://svn.filezilla-project.org/filezilla/libfilezilla/trunk/lib/Makefile.am?view=patch&r1=9357&r2=9356&pathrev=9357'
'remove-version-2.patch::https://svn.filezilla-project.org/filezilla/libfilezilla/trunk/lib/Makefile.am?view=patch&r1=9358&r2=9357&pathrev=9358'
'fix-rc.patch::https://svn.filezilla-project.org/filezilla/libfilezilla/trunk/lib/Makefile.am?view=patch&r1=9359&r2=9358&pathrev=9359')
md5sums=('7cecda7c08f141223076487490374cb5'
'214c4efa3b967ec32abd207eef32e270'
'9a413b5b4f1cf341eca233614c626674'
'e89893486d31c6475743e12517f5b505')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
cd "${srcdir}/${_name}-${pkgver}"
msg2 'Patching sources'
patch -p2 -i "$srcdir/remove-version.patch"
patch -p2 -i "$srcdir/remove-version-2.patch"
patch -p2 -i "$srcdir/fix-rc.patch"
#rm lib/libfilezilla/version.hpp
msg2 'Running autoreconf -i'
autoreconf -i
}
build() {
#export CXXFLAGS='-O0'
for _arch in ${_architectures}; do
mkdir -p "${srcdir}/${_name}-${pkgver}/build-${_arch}" && cd "${srcdir}/${_name}-${pkgver}/build-${_arch}"
${_arch}-configure --disable-shared
# shared build doesn't work because 'fz::simple_event<fz::timer_event_type, unsigned long long>::type()'
# is not exported correctly
make
done
}
package() {
for _arch in ${_architectures}; do
cd "${srcdir}/${_name}-${pkgver}/build-${_arch}"
make DESTDIR="${pkgdir}" install
find "${pkgdir}/usr/${_arch}" -name '*.exe' -exec ${_arch}-strip --strip-all {} \;
find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
find "${pkgdir}/usr/${_arch}" -name '*.a' -exec ${_arch}-strip -g {} \;
done
}