diff options
author | JonnyRobbie | 2020-02-25 20:22:36 +0100 |
---|---|---|
committer | JonnyRobbie | 2020-02-25 20:22:36 +0100 |
commit | 32c654b44473046ab224481fe99f0fbf8e5acec8 (patch) | |
tree | 2fb5b9623f436d6de57914612bb0f7d97c8f69fc | |
download | aur-xsane-git.tar.gz |
Initial commit for xsane-git
-rw-r--r-- | .SRCINFO | 33 | ||||
-rw-r--r-- | PKGBUILD | 65 |
2 files changed, 98 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..69b9767d669a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,33 @@ +pkgbase = xsane-git + pkgver = 0.999.r89.gfee5f42 + pkgrel = 1 + url = https://gitlab.com/sane-project/frontend/xsane + arch = x86_64 + license = GPLv2 + makedepends = gtk2 + makedepends = lcms2 + makedepends = sane + makedepends = zlib + makedepends = libjpeg + makedepends = gimp + source = git+https://gitlab.com/sane-project/frontend/xsane.git + sha512sums = SKIP + +pkgname = xsane-git + pkgdesc = A GTK-based X11 frontend for SANE and plugin for Gimp. Git version. + depends = gtk2 + depends = lcms2 + depends = sane + depends = zlib + depends = libjpeg + optdepends = xsane-gimp: for gimp plugin support + provides = xsane + conflicts = xsane + +pkgname = xsane-gimp-git + pkgdesc = XSane Gimp plugin. Git version. + depends = xsane + depends = gimp + provides = xsane-gimp + conflicts = xsane-gimp + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f0270e0f7ccb --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,65 @@ +# Maintainer: JonnyRobbie + +pkgbase=xsane-git +pkgname=('xsane-git' 'xsane-gimp-git') +_gitname=xsane +pkgver=0.999.r89.gfee5f42 +pkgrel=1 +arch=(x86_64) +url="https://gitlab.com/sane-project/frontend/xsane" +license=('GPLv2') +makedepends=('gtk2' 'lcms2' 'sane' 'zlib' 'libjpeg' 'gimp') +source=(git+https://gitlab.com/sane-project/frontend/$_gitname.git) +sha512sums=('SKIP') + +pkgver() { + cd "$srcdir/$_gitname" + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "$srcdir/$_gitname" + + # make with gimp support + ./configure \ + --prefix=/usr \ + --mandir=/usr/share/man \ + --enable-gimp + make + mv src/xsane src/xsane-gimp + + # make without gimp support + make clean + ./configure \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --mandir=/usr/share/man \ + --disable-gimp + make +} + +package_xsane-git() { + pkgdesc="A GTK-based X11 frontend for SANE and plugin for Gimp. Git version." + depends=('gtk2' 'lcms2' 'sane' 'zlib' 'libjpeg') + optdepends=('xsane-gimp: for gimp plugin support') + conflicts=('xsane') + provides=('xsane') + + cd "$srcdir/$_gitname" + make DESTDIR=$pkgdir install +} + +package_xsane-gimp-git() { + pkgdesc="XSane Gimp plugin. Git version." + depends=('xsane' 'gimp') + conflicts=('xsane-gimp') + provides=('xsane-gimp') + + cd "$srcdir/$_gitname" + install -D -m755 src/xsane-gimp "$pkgdir/usr/bin/xsane-gimp" + + ## Link the plugin binary to gimp plug-in directory + mkdir -p "$pkgdir/usr/lib/gimp/2.0/plug-ins" + ln -sf /usr/bin/xsane-gimp "$pkgdir"/usr/lib/gimp/2.0/plug-ins/xsane +} + |