summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0894cb8643e248715f37493a29cbb9d24f190426 (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
# Author: futpib <futpib@gmail.com>
# Inspired by `cask' AUR package by Sebastien Duthil <duthils@duthils.net>

pkgname=cask-git
pkgver=r882.d731e96
pkgrel=2
pkgdesc="Project management tool for Emacs"
arch=('any')
url='https://github.com/cask/cask'
license=('GPL')
depends=('emacs' 'python')
makedepends=('git')
provides=('cask')
conflicts=('cask')
source=("git://github.com/cask/cask.git")
sha256sums=('SKIP')

pkgver() {
    cd "$srcdir/cask"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
    cd "$srcdir/cask"

    # cask executable needs to be one directory deeper than cask-cli.el
    __prefix="${pkgdir}/usr/share/cask"
    install -d "${__prefix}"
    install -Dm644 *.el "${__prefix}/"
    install -d "${__prefix}/bin"
    install -Dm755 "bin/cask" "${__prefix}/bin"
    install -d "${__prefix}/templates"
    install -Dm644 templates/* "${__prefix}/templates/"
    touch "${__prefix}/.no-upgrade"  # Stop cask performing self-upgrades.

    install -d "${pkgdir}/usr/bin"
    ln -s "/usr/share/cask/bin/cask" "${pkgdir}/usr/bin/"

    __site_lisp="${pkgdir}/usr/share/emacs/site-lisp/cask"
    install -d "${__site_lisp}"
    ln -s "/usr/share/cask/"cask{,-bootstrap}.el "${__site_lisp}/"
}