1 # Contributor: zhuqin <zhuqin83@gmail.com>
2 # Contributor: Mic92 <jthalheim@gmail.com>
7 pkgdesc="Gnu Emacs from Git"
8 url="http://www.gnu.org/software/emacs/emacs.html"
10 depends=('dbus-core' 'gpm' 'gtk2' 'giflib' 'libtiff' 'librsvg' 'libjpeg' 'libpng' 'libxml2' 'texinfo' 'hicolor-icon-theme')
12 optdepends=('gconf: for detecting the default system font in gnome (need rebuild)')
13 arch=('i686' 'x86_64')
15 conflicts=('emacs' 'emacs-otf' 'emacs-cvs' 'emacs-bzr')
18 _gitroot="git://repo.or.cz/emacs.git"
23 msg "Connecting to GIT server...."
25 if [ -d $_gitname ] ; then
26 cd $_gitname && git pull origin
27 msg "The local files are updated."
29 git clone $_gitroot $_gitname
32 msg "GIT checkout done or server timeout"
33 msg "Starting make..."
35 rm -rf $srcdir/$_gitname-build
36 git clone $srcdir/$_gitname $srcdir/$_gitname-build
38 cd $srcdir/$_gitname-build
44 --localstatedir=/var \
45 --libexecdir=/usr/lib \
52 cd $srcdir/$_gitname-build
53 make DESTDIR=$pkgdir install
55 # remove conflict with ctags packages
56 mv $pkgdir/usr/bin/{ctags,ctags.emacs}
57 mv $pkgdir/usr/bin/{etags,etags.emacs}
58 mv $pkgdir/usr/share/man/man1/{etags.1.gz,etags.emacs.1.gz}
59 mv $pkgdir/usr/share/man/man1/{ctags.1.gz,ctags.emacs.1.gz}
61 # fix user/root permissions on usr/share files
62 find $pkgdir/usr/share/emacs/24* -exec chown root.root {} \;
63 # fix perms on /var/games
64 chmod 775 $pkgdir/var/games
65 chmod 775 $pkgdir/var/games/emacs
66 chmod 664 $pkgdir/var/games/emacs/*
67 chown -R root:games $pkgdir/var/games