xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #678: PKGBUILD.2

File PKGBUILD.2, 1.3 KB (added by Antoine Martin, 4 years ago)

libpng 1.6.27 build file

Line 
1# Maintainer: Alexey Pavlov <alexpux@gmail.com>
2
3_realname=libpng
4pkgbase=mingw-w64-${_realname}
5pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
6pkgver=1.6.27
7pkgrel=1
8arch=('any')
9pkgdesc="A collection of routines used to create PNG format graphics (mingw-w64)"
10depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
11         "${MINGW_PACKAGE_PREFIX}-zlib")
12makedepends=("${MINGW_PACKAGE_PREFIX}-gcc")
13license=('custom')
14url="http://www.libpng.org/pub/png/libpng.html"
15options=('strip' '!libtool' 'staticlibs')
16source=("https://downloads.sourceforge.net/sourceforge/libpng/${_realname}-${pkgver}.tar.xz")
17
18sha256sums=('fca2ffd97336356cdab9bfa8936b9d6dfd580a70205e5dfead3ac42cb054b57b')
19
20prepare() {
21  cd "${srcdir}/${_realname}-${pkgver}"
22}
23
24build() {
25  [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST}
26  mkdir -p "${srcdir}/build-${MINGW_CHOST}"
27  cd "${srcdir}/build-${MINGW_CHOST}"
28  ../${_realname}-${pkgver}/configure \
29    --build=${MINGW_CHOST} \
30    --host=${MINGW_CHOST} \
31    --target=${MINGW_CHOST} \
32    --prefix=${MINGW_PREFIX} \
33    --enable-shared --enable-static \
34    as_ln_s="cp -pR"
35  make
36}
37
38package () {
39  cd "${srcdir}/build-${MINGW_CHOST}"
40  make install DESTDIR="${pkgdir}"
41
42  install -D -m644 "${srcdir}/libpng-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname/LICENSE"
43}