summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7f2ad9f7d0bc09ec054476b175b94e68dc70b3fe (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
# Maintainer: Christian Hesse <mail@eworm.de>
# Maintainer: Dave Reisner <dreisner@archlinux.org> ([core] package)
# Maintainer: Thomas Bächler <thomas@archlinux.org> ([core] package)

pkgname=mkinitcpio-git
pkgver=23.r6.g32dbf89
pkgrel=1
pkgdesc='Modular initramfs image creation utility - git checkout'
arch=('any')
url='http://www.archlinux.org/'
license=('GPL')
depends=('awk' 'mkinitcpio-busybox' 'kmod' 'util-linux' 'libarchive' 'coreutils'
         'bash' 'findutils' 'grep' 'filesystem' 'gzip' 'systemd-tools')
optdepends=('xz: Use lzma or xz compression for the initramfs image'
            'bzip2: Use bzip2 compression for the initramfs image'
            'lzop: Use lzo compression for the initramfs image'
            'mkinitcpio-nfs-utils: Support for root filesystem on NFS')
makedepends=('git' 'asciidoc')
provides=("mkinitcpio=${pkgver}")
conflicts=('mkinitcpio')
backup=('etc/mkinitcpio.conf')
source=('git://projects.archlinux.org/mkinitcpio.git')
sha256sums=('SKIP')

pkgver() {
	cd mkinitcpio/

	if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then
		printf '%s.r%s.g%s' \
			"$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG})" \
			"$(git rev-list --count ${GITTAG}..)" \
			"$(git log -1 --format='%h')"
	else
		printf '0.r%s.g%s' \
			"$(git rev-list --count master)" \
			"$(git log -1 --format='%h')"
	fi
}

package() {
	cd mkinitcpio/

	make DESTDIR="${pkgdir}" install
}