blob: db13fa648f1143ef5202e01378143ef9de15866a (
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
40
41
42
43
44
45
46
|
# Maintainer: Timofey Titovets <nefelim4ag@gmail.com>
pkgname=bees-git
pkgver=v0.5.r125.gc21518d
pkgrel=1
pkgdesc="Best-Effort Extent-Same, a btrfs deduplicator daemon"
arch=('any')
url="https://github.com/Zygo/bees"
license=('GPL3')
depends=()
makedepends=('git' 'make' 'gcc' 'markdown')
source=("$pkgname"::'git://github.com/zygo/bees.git#branch=master')
md5sums=('SKIP')
pkgver() {
cd "$pkgname"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "$pkgname"
make
make scripts
}
package() {
cd "$pkgname"
make install PREFIX="${pkgdir}"
make install_scripts PREFIX="${pkgdir}"
mkdir -p "${pkgdir}/usr/bin/"
if [ -f "${pkgdir}/usr/sbin/beesd" ]; then
mv -v "${pkgdir}/usr/sbin/beesd" "${pkgdir}/usr/bin/beesd"
sed -i -e 's#/usr/sbin/beesd#/usr/bin/beesd#g' "${pkgdir}/lib/systemd/system/beesd@.service"
fi
if grep "$pkgname" "${pkgdir}/usr/bin/beesd"; then
exit 1
fi
mkdir -p "${pkgdir}/usr/lib/systemd/system/"
mv -v "${pkgdir}/lib/systemd/system/beesd@.service" "${pkgdir}/usr/lib/systemd/system/"
find ${pkgdir} -empty -delete -print
}
|