public
Created

Micro-emacs version customized by Linus Torvalds PKGBUILD. Rewritten according official Arch Linux VCS Guides.

  • Download Gist
PKGBUILD
Shell
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 46 47 48 49 50
# Maintainer: Marcin Karpezo <sirmacik at gmail dot com>
# Contributor: Shizeeg Unadequatov <shizeeque at gmail.com>
 
pkgname=uemacs-git
pkgver=20130222
pkgrel=1
pkgdesc="Micro-emacs version customized by Linus Torvalds"
arch=('i686' 'x86_64')
url="http://git.kernel.org/?p=editors/uemacs/uemacs.git;a=summary"
license=('custom')
depends=('ncurses')
makedepends=('git')
_gitname="uemacs"
 
source=('uemacs::git://git.kernel.org/pub/scm/editors/uemacs/uemacs.git'
'helplocation.patch')
md5sums=('SKIP'
'9e4e92614c846a541b034cd115f4140f')
 
pkgver() {
cd "${_gitname}"
echo $(git log -1 --date=short | grep Date | sed 's|[^0-9]||g')
}
 
prepare() {
cd "${_gitname}"
 
sed -i "s@BINDIR=/usr/bin@BINDIR=${pkgdir}/usr/bin@;s@LIBDIR=/usr/lib@LIBDIR=${pkgdir}/usr/share/doc/${pkgname}@" Makefile >> Makefile
 
# patch to make uemacs look for a helpfile in the correct location
patch -p1 < ../helplocation.patch || return 1
}
 
build() {
cd "${_gitname}"
make
}
 
package() {
cd "${_gitname}"
mkdir -p "${pkgdir}/usr/bin"
mkdir -p "${pkgdir}/usr/share/doc/${pkgname}"
head -24 README > LICENSE
 
make install
install -D -m0644 "README" "${pkgdir}/usr/share/doc/${pkgname}/README"
install -D -m0644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
find "${pkgdir}" -type d -name .git -exec rm -r '{}' +
}
# vim: ts=2 sw=2 et

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.