summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 67f808d913ac03d0a0d69f86600d41a98558563e (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
# Maintainer: Pavol Hluchy (Lopo) <lopo at losys dot eu>

_pkgname=ripole
pkgname=${_pkgname}-git
pkgver=r2.9a5d124
pkgrel=1
pkgdesc="OLE2 Attachment extraction tool"
license=('BSD')
arch=('i686' 'x86_64')
url="https://github.com/inflex/ripOLE"
conflicts=('ripole')
source=("git+https://github.com/inflex/ripOLE.git")
sha512sums=('SKIP')


pkgver() {
	cd "${srcdir}/ripOLE"
#	git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
	}

build() {
	cd "${srcdir}/ripOLE"

	make clean || return 1
	sed -i "s|-Werror||g" Makefile
	make || return 1
	}

package() {
	cd "${srcdir}/ripOLE"

	install -D -m 755 ripole ${pkgdir}/usr/bin/ripole
	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	for _f in CHANGELOG CONTRIBUTORS README; do
		install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}" "${_f}"
	done
	}