summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8e43a792e10bef3550f635467d1b343059586676 (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
# Maintainer: littzhch <2371050115@qq.com>
_pkgname=pacman-install-comments
pkgname=${_pkgname}-hook-git
pkgrel=1
pkgver=r8.2b1be4b
pkgdesc="Pacman hook for adding comments to explicitly installed packages"
arch=('any')
url="https://github.com/Bekaboo/pacman-install-comments"
license=('custom')
depends=(bash sed coreutils diffutils grep pacman)
source=("git+${url}")
md5sums=('SKIP')

pkgver() {
  	cd "$_pkgname"
  	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

prepare() {
	cd "$_pkgname"
	sed -i 's/etc\/pacman.d\/scripts/usr\/share\/libalpm\/scripts/g' 99-install-comments.hook
}

package() {
	cd "$_pkgname"
	install -Dm644 '99-install-comments.hook' "$pkgdir/usr/share/libalpm/hooks/99-install-comments.hook"
	install -Dm755 'install-comments-hook' "$pkgdir/usr/share/libalpm/scripts/install-comments-hook"
}