updated on Sun Jan 22 16:00:49 UTC 2012
[aur-mirror.git] / emacs-gtk3-bzr / PKGBUILD
blob17d0ecceac8c311940dc6b9709a50d5c696018de
1 # Maintainer: Bernardo Barros <bernardobarros@gmail.com>
2 # Contributor: Neil Santos <nsantos16+aur@gmail.com>
4 pkgname=emacs-gtk3-bzr
5 pkgver=106359
6 pkgrel=1
7 pkgdesc='Emacs from official Bazaar repository, GTK3 toolkit'
8 arch=('i686' 'x86_64')
9 url='http://www.gnu.org/software/emacs/'
10 license=('GPL3')
11 depends=('dbus-core' 'libpng' 'libtiff' 'librsvg' 'giflib' 'gtk3' 'libxpm' 'libjpeg>=7' 'hicolor-icon-theme')
12 makedepends=('bzr' 'pkgconfig' 'texinfo' 'gpm')
13 provides=('emacs=$pkgver')
14 conflicts=('emacs' 'emacs-nox' 'emacs-otf' 'emacs-cvs' 'emacs-git')
15 install=emacs.install
17 _bzrtrunk='http://bzr.savannah.gnu.org/r/emacs/trunk'
18 _bzrmod='emacs'
20 build() {
21   cd $srcdir
22   msg "Connecting to Savannah..."
24   if [[ -d $_bzrmod/.bzr ]]; then
25     (cd $_bzrmod && bzr update -v && cd ..)
26     msg "Local checkout updated or server timeout"
27   else
28     bzr co --lightweight -v $_bzrtrunk $_bzrmod
29     msg "Checkout done or server timeout"
30   fi
32   cp -urT $_bzrmod/ ${_bzrmod}-build
33   cd ${_bzrmod}-build
35   mandir=/usr/share/man
37   msg "Starting make..."
39   ./autogen.sh 
41   ./configure --prefix=/usr \
42     --sysconfdir=/etc \
43     --localstatedir=/var \
44     --libexecdir=/usr/lib \
45     --mandir=${mandir} \
46     --without-sound \
47     --with-x-toolkit=gtk3
49   make bootstrap 
51   make 
55 package() {
56     cd $srcdir/$_bzrmod-build
57     make DESTDIR=$pkgdir install
59     # remove conflict with ctags packages
60     mv $pkgdir/usr/bin/{ctags,ctags.emacs}
61     mv $pkgdir/usr/bin/{etags,etags.emacs}
62     mv $pkgdir/usr/share/man/man1/{etags.1.gz,etags.emacs.1.gz}
63     mv $pkgdir/usr/share/man/man1/{ctags.1.gz,ctags.emacs.1.gz}
65     # fix user/root permissions on usr/share files
66     find $pkgdir/usr/share/emacs/24* -exec chown root.root {} \;
67     # fix perms on /var/games
68     chmod 775 $pkgdir/var/games
69     chmod 775 $pkgdir/var/games/emacs
70     chmod 664 $pkgdir/var/games/emacs/*
71     chown -R root:games $pkgdir/var/games