summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6d617ad25bd755b8287d262de7abb9063213e28b (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
# Maintainer: Eric Anderson <ejona86@gmail.com>
pkgname=airsane-git
pkgver=0.3.5.r0.gfef10a4
pkgrel=1
pkgdesc="Publish SANE scanners to MacOS and Android via Apple AirScan"
arch=('i686' 'x86_64')
url="https://github.com/SimulPiscator/AirSane"
license=('GPL3')
depends=('avahi' 'libjpeg' 'libpng' 'libusb' 'sane')
makedepends=('cmake' 'git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
backup=()
source=("${pkgname%-git}::git+https://github.com/SimulPiscator/AirSane.git"
        "airsane-systemd-dir.patch")
sha256sums=('SKIP'
            '0d92b2984b4c2362027aea195e6c2d2bda5961ce568e1b3472e3678525e3dcc2')

pkgver() {
	cd "$srcdir/${pkgname%-git}"
	git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	cd "$srcdir/${pkgname%-git}"
	patch -p1 -i "$srcdir/airsane-systemd-dir.patch"
}

build() {
	mkdir -p "$srcdir/build"
	cd "$srcdir/build"
	cmake -DCMAKE_INSTALL_PREFIX=/usr "../${pkgname%-git}"
	make
}

package() {
	cd "$srcdir/build"
	make DESTDIR="$pkgdir" install
}