summaryrefslogtreecommitdiff
path: root/libre/pngcrush/PKGBUILD
blob: f44ace016f7ca71e29b7618b7ce47b797b88dc7a (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
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>

pkgname=pngcrush
pkgver=1.7.65
pkgrel=1
pkgdesc="A tool for optimizing the compression of PNG files"
arch=('i686' 'x86_64' 'mips64el')
url="http://pmt.sourceforge.net/pngcrush/"
license=('custom')
depends=('libpng' 'zlib')
source=(http://downloads.sourceforge.net/pmt/$pkgname-$pkgver-nolib.tar.xz)

build() {
  cd "$srcdir"/$pkgname-$pkgver-nolib
  sed -n '10,17s/^\s*//p' cexcept.h > LICENSE.cexcept.txt
  sed -rn '97,142s/ \* ?//p' pngcrush.c > LICENSE.pngcrush.txt
  make
}

package() {
  cd "$srcdir"/$pkgname-$pkgver-nolib
  install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
  install -Dm644 LICENSE.cexcept.txt "$pkgdir"/usr/share/licenses/$pkgname/cexcept.txt
  install -Dm644 LICENSE.pngcrush.txt "$pkgdir"/usr/share/licenses/$pkgname/pngcrush.txt
}

md5sums=('b4130246c14c1cffc6c2014ff86f1008')