summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 86aa0c4beaa0cd47ff8229da001ad2f85371b833 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Maintainer: Ainola
# Contributor: bzt

pkgname=gnome-xcf-thumbnailer
pkgver=1.0
pkgrel=8
pkgdesc="GNOME thumbnailer for GIMP XCF files."
arch=('i686' 'x86_64')
url="https://download.gnome.org/sources/gnome-xcf-thumbnailer/"
license=('GPL2')
# Without gimp, .xcf thumbnails are never displayed
depends=('glib2' 'libpng' 'gimp')
source=("https://download.gnome.org/sources/gnome-xcf-thumbnailer/${pkgver}/gnome-xcf-thumbnailer-${pkgver}.tar.bz2"
        "gnome-xcf-thumbnailer.thumbnailer"
        "no-popt.patch"
        "CVE-2009-0217.patch"
        "NULL-updates.patch")
sha256sums=('d0489a00a493242f65db22e2861d37f59c540055dd1aa573bb09886180ab4bd0'
            '401c9d7eb3a47a223110599c54af0b9feddc8026a1fc812df866ff19e7e33ac0'
            '9f3e31804362a7c6d3224e9fd61dd3c4cddc872eafa9b754ddab7aaa30bad8aa'
            '8a56cf5cd9fdb1aa677f93236c110572450c5f702cd3cb8fa5517ecbe6b0f1a8'
            '1637e7b2d2904729b20174fb55ef554d4b70a56b55897e7393088591d862cf8e')

prepare(){
  # Patches used by Debian to build
  patch -d gnome-xcf-thumbnailer-$pkgver -p1 < no-popt.patch
  patch -d gnome-xcf-thumbnailer-$pkgver -p1 < CVE-2009-0217.patch

  # libpng12 does not distribute headers any more. We must adjust to be
  # buildable with recent versions of libpng.
  patch -d gnome-xcf-thumbnailer-$pkgver -p1 < NULL-updates.patch
}

build() {
  cd "$srcdir/$pkgname-$pkgver"
  ./configure --prefix=/usr
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  mkdir -p "$pkgdir/usr/share/thumbnailers"
  cp ../gnome-xcf-thumbnailer.thumbnailer "$pkgdir/usr/share/thumbnailers"

  install -m755 -d "$pkgdir/usr/share/gconf/schemas"
  gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/${pkgname}.schemas" \
    --domain gnome-xcf-thumbnailer "$pkgdir/usr/share/$pkgname/${pkgname}.sc"
}

# vim: et sw=2 ts=2