48 lines
1.5 KiB
Bash
48 lines
1.5 KiB
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
|
|
pkgname=grfcodec
|
|
pkgver=6.0.6
|
|
_debver=$pkgver
|
|
_debrel=6
|
|
pkgrel=1
|
|
pkgdesc="A tool to convert a GRF file into graphics files and meta data, and vice versa"
|
|
arch=('i686' 'x86_64')
|
|
url='https://github.com/OpenTTD/grfcodec'
|
|
license=('GPL-2')
|
|
depends=('libpng')
|
|
makedepends=('boost' 'quilt')
|
|
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/OpenTTD/grfcodec/archive/refs/tags/${pkgver}.tar.gz"
|
|
"https://deb.debian.org/debian/pool/main/g/grfcodec/grfcodec_${_debver}-${_debrel}.debian.tar.xz")
|
|
sha512sums=('330634508b37a34a27b87efb92d017a7eb40f61bfd5ea35193abc545ec7ced244726e9f0ed0e653997ce866365026c967bccb071d17c36a21f3b28aecfa140b4'
|
|
'03fc6d84a22ca80fb9a3ee19308be965e758df26014c4151482e6126f2c2dd83d98419526b496bfdb503504a33f415865efc9d8d7b927f077ee349aefbb43b4b')
|
|
|
|
prepare() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
|
# Debian patches
|
|
export QUILT_PATCHES=debian/patches
|
|
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
|
export QUILT_DIFF_ARGS='--no-timestamps'
|
|
|
|
mv "$srcdir"/debian .
|
|
|
|
quilt push -av
|
|
fi
|
|
sed -i 's@/usr/local@/usr@' Makefile.bundle
|
|
}
|
|
|
|
_make () {
|
|
make CXXFLAGS="${CXXFLAGS} -Wno-narrowing -std=c++11" LDFLAGS="${LDFLAGS}" "$@"
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
_make -j$(nproc)
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
_make DESTDIR="${pkgdir}" install
|
|
install -Dm644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname"
|
|
}
|