summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0a664206cd67b61256a445eb30214c82eb3af210 (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.4
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' 'markdown' 'btrfs-progs' 'systemd')
source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/Zygo/bees/archive/v${pkgver}.tar.gz")
sha256sums=('da6c50f433a2bd6b7e26e37733de44554d8e9ed554ee9dea0d2e66d1ff820e0d')

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
}