# $Id: PKGBUILD 82 2009-07-17 19:56:55Z aaron $ # Maintainer: Jaroslav Lichtblau # Contributor: Jaroslav Lichtblau # Contributor: Chris Brannon pkgname=emacs-nox pkgver=22.3 pkgrel=2 pkgdesc="The Emacs Editor, without X11 support." arch=('i686' 'x86_64') url="http://www.gnu.org/software/emacs/emacs.html" license=('GPL') depends=('ncurses' 'alsa-lib') provides=('emacs') conflicts=('emacs' 'emacs-cvs') options=('docs') install=$pkgname.install source=(ftp://ftp.gnu.org/gnu/emacs/emacs-${pkgver}.tar.gz) md5sums=('aa8ba34f548cd78b35914ae5a7bb87eb') build() { cd "${srcdir}/emacs-$pkgver" ./configure --prefix=/usr --without-x #we don't want to use /usr/libexec sed -i "s|\"/usr/libexec/emacs.*$|\"/usr/lib/emacs/$pkgver\"|g" src/epaths.h || return 1 # mv newepaths.h src/epaths.h make libexecdir=/usr/lib archlibdir="/usr/lib/emacs/${pkgver}" || return 1 make prefix="${pkgdir}/usr" libexecdir="${pkgdir}/usr/lib" \ archlibdir="${pkgdir}/usr/lib/emacs/${pkgver}" install #fix all the 777 perms on directories find "${pkgdir}/usr/share/emacs/$pkgver" -type d -exec chmod 755 {} \; || return 1 #fix user/root permissions on usr/share files find "${pkgdir}/usr/share/emacs/$pkgver" -exec chown root.root {} \; || return 1 #remove conflict with ctags package mv "${pkgdir}"/usr/bin/{ctags,ctags.emacs} || return 1 mv "${pkgdir}"/usr/bin/{etags,etags.emacs} || return 1 mv "${pkgdir}"/usr/share/man/man1/{ctags.1,ctags.emacs.1} || return 1 mv "${pkgdir}"/usr/share/man/man1/{etags.1,etags.emacs.1} || return 1 #remove empty files rm -rf "${pkgdir}/usr/var" || return 1 #get rid of the package's info directory, install-info adds entries for us at install-time rm "${pkgdir}/usr/share/info/dir" || return 1 gzip -9nf "${pkgdir}"/usr/share/info/* || return 1 }