summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d7dc91bb7a05536e32426c7eda6c35419ce4e94f (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
# Maintainer: Patryk Jaworski <regalis@regalis.com.pl>

pkgname=mkinitcpio-squashfs-git
pkgver=0.1
pkgrel=2
pkgdesc="SquashFS root support for mkinitcpio (local and remote image locations supported)"
arch=("any")
url="https://github.com/RegalisTechnologies/mkinitcpio-squashfs"
license=("GPL3")
depends=("pv" "wget" "mkinitcpio" "findutils")
makedepends=("git")
optdepends=("mkinitcpio-nfs-utils: downloading SquashFS images from remote locations")
conflicts=("mkinitcpio-squashfs")
source=("git+https://github.com/RegalisTechnologies/mkinitcpio-squashfs.git")
md5sums=('SKIP')
_gitname=mkinitcpio-squashfs

pkgver() {
	cd "${srcdir}/${pkgname%-git}"
	VERSION="$(git describe --long --tags 2>/dev/null| sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
	if [[ -n "$VERSION" ]]; then
		echo ${VERSION}
	else
		printf "%s" "0.0.1.`git log --format='%H' -n 1 | cut -c -10`"
	fi
}

package() {
	cd "${_gitname}"
	make install DESTDIR="${pkgdir}"
}