summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 50597535d5ea8c12caca9c9cf6bf175efed72b87 (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: Gavin Yancey <gyancey@hmc.edu>
# Contributor: Timofey Titovets <nefelim4ag@gmail.com>

pkgname=bees
pkgver=0.6.3
pkgrel=1
pkgdesc="Best-Effort Extent-Same, a btrfs deduplicator daemon"
arch=('x86_64')
url="https://github.com/Zygo/bees"
license=('GPL3')
depends=()
makedepends=('git' 'make' 'gcc' 'markdown' 'btrfs-progs')
source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/Zygo/bees/archive/v${pkgver}.tar.gz")
sha256sums=('874969b9198867652364c3149f214f39bdfe0efed67d279c6b77b37765661e54')

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make BEES_VERSION="${pkgver}-${pkgrel}"
	make scripts BEES_VERSION="${pkgver}-${pkgrel}"
}

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

	make install DESTDIR="${pkgdir}" BEES_VERSION="${pkgver}-${pkgrel}"

	mkdir -p "${pkgdir}/usr/bin/"

	if [ -f "${pkgdir}/usr/sbin/beesd" ]; then
		mv -v "${pkgdir}/usr/sbin/beesd" "${pkgdir}/usr/bin/beesd"
	fi

	if egrep "${srcdir}|${pkgdir}" "${pkgdir}/usr/bin/beesd"; then
		exit 1
	fi

	find ${pkgdir} -empty -delete -print
}