summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c09ffb11de50a50457cc387b1bf5592eff06f0aa (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
# Maintainer: LinRs <LinRs AT users.noreply.github.com>

pkgname=emacs-pelican-mode-git
_pkgname=emacs-pelican-mode
pkgver=v20170808.r12.g65d7caf
pkgrel=1
pkgdesc="minor mode for editing articles and pages in Pelican sites"
arch=('any')
url="https://git.korewanetadesu.com/pelican-mode.git"
license=('GPL3')
depends=('emacs')
makedepends=('git')
install="${_pkgname}.install"
source=("${pkgname}"::git+"${url}")
sha512sums=('SKIP')

pkgver() {
    cd "${srcdir}/${pkgname}"
    ( 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)"
    )
}
build() {
    cd "${srcdir}/${pkgname}"
    make
}
package() {
    cd "${srcdir}/${pkgname}"
    install -d "${pkgdir}/usr/share/emacs/site-lisp"
    install -D -m644 pelican-mode.el pelican-mode.elc "${pkgdir}/usr/share/emacs/site-lisp"
}