summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 81a8f6ec5a24d11c769d13fbd702bf0ae7f82461 (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 = Carsten Feuls <archlinux@carstenfeuls.de>
# ex-Maintainer: Anty <anty_fab at hotmail dot fr>
# ex-Maintainer: Evan Anderson <evananderson@thelinuxman.us>

_gitname=grub-btrfs
pkgname=$_gitname-git
pkgver=1.7.2.r0.g52ab9db
pkgrel=2
pkgdesc="grub-btrfs, Include btrfs snapshots at boot options. (grub menu)"
arch=('any')
url="https://github.com/Antynea/grub-btrfs"
license=('GPL3')
depends=('btrfs-progs' 'grub')
makedepends=('git')
conflicts=('grub-btrfs')
backup=('etc/grub.d/41_snapshots-btrfs')
source=('git+https://github.com/Antynea/grub-btrfs.git')
#source=('git+https://github.com/Antynea/grub-btrfs.git#branch=v1.xx')
#source=('git+https://github.com/Antynea/grub-btrfs.git#branch=v0.xx')
md5sums=('SKIP')

pkgver() {
	cd $_gitname/
	# ( set -o pipefail
		# git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
		# printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    # )
	( set -o pipefail
		git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
		printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    )
}

package() {
	cd "$_gitname"
	install -Dm 755 "41_snapshots-btrfs" "${pkgdir}/etc/grub.d/41_snapshots-btrfs"
	install -Dm 644 "localisation/fr/grub-btrfs-git.mo" "${pkgdir}/usr/share/locale/fr/LC_MESSAGES/grub-btrfs-git.mo"
}