summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 975d7d9170322b042a7cd100a6901440252d4eec (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=emacs-lucid-git
pkgver=25.0.50.r123087
pkgrel=1
pkgdesc="GNU Emacs. Official git master."
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/emacs/"
license=('GPL')
depends=('alsa-lib' 'gpm' 'desktop-file-utils' 'hicolor-icon-theme' 'giflib'
	 'libxfixes' 'm17n-lib' 'libxrandr' 'libxinerama'  'libdbus'
	 'imagemagick'  'librsvg' 'gnutls')
makedepends=('git')
conflicts=('emacs')
provides=('emacs')
options=('docs' '!emptydirs' '!makeflags')
install=emacs.install
source=("git://git.savannah.gnu.org/emacs.git")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/emacs"
  printf "%s.r%s" \
    "$(grep AC_INIT configure.ac | sed -e 's/^.\+\ \([0-9]\+\.[0-9]\+\.[0-9]\+\).\+$/\1/')" \
    "$(git rev-list --count HEAD)"
}

build() {
  cd "$srcdir/emacs"
  ./autogen.sh                                                            
  ac_cv_lib_gif_EGifPutExtensionLast=yes \
    ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --libexecdir=/usr/lib \
    --localstatedir=/var \
    --with-x-toolkit=lucid \
    --mandir=/usr/share/man \
    --pdfdir=/usr/share/doc/emacs/pdf \
    --with-sound \
    --without-gconf \
    --with-xft 
  make bootstrap
}

package() {
  cd "$srcdir/emacs"
  make DESTDIR="$pkgdir/" install
  # remove conflict with ctags package
  mv "$pkgdir"/usr/bin/{ctags,ctags.emacs}
  mv "$pkgdir"/usr/share/man/man1/{ctags.1.gz,ctags.emacs.1.gz}
  # remove conflict with texinfo
  rm "$pkgdir"/usr/share/info/info.info.gz
  # fix user/root permissions on usr/share files
  find "$pkgdir"/usr/share/emacs/ -exec chown root:root {} \;
  # Delete compressed .el.gz files. Comment out if needed.
  find "$pkgdir"/usr/share/emacs/ -name "*.el.gz" -exec rm {} \;
  # fix perms on /var/games
  chmod 775 "$pkgdir"/var/games
  chmod 775 "$pkgdir"/var/games/emacs
  chmod 664 "$pkgdir"/var/games/emacs/*
  chown -R root:games "$pkgdir"/var/games
}