Skip to content

Instantly share code, notes, and snippets.

@yaroot
Created March 2, 2012 08:52
Show Gist options
  • Save yaroot/1956921 to your computer and use it in GitHub Desktop.
Save yaroot/1956921 to your computer and use it in GitHub Desktop.
PKGBUILD for buiding emacs-24 using tarball download from repo.or.cz on archlinux
emacs-bzr/
pkg/
src/
*.tar.gz
*.tar.xz

aur for emacs-24

I've modified the PKGBUILD to download the tarball from repo.or.cz instead of doing a bzr clone. It's much faster for those who has crappy internet connections in developing contry.

ICON_PATH=/usr/share/icons/hicolor
INFO_DIR=/usr/share/info
INFO_FILES=(ada-mode auth autotype calc ccmode cl dbus dired-x ebrowse
ede ediff edt efaq eieio eintr elisp emacs emacs-mime epa erc ert eshell
eudc flymake forms gnus idlwave info mairix-el message mh-e newsticker
nxml-mode org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses
sieve smtpmail speedbar tramp url vip viper widget woman)
post_install() {
gtk-update-icon-cache -q -t -f ${ICON_PATH}
update-desktop-database -q
[[ -x usr/bin/install-info ]] || return 0
for f in ${INFO_FILES[@]}; do
install-info ${INFO_DIR}/$f.gz ${INFO_DIR}/dir 2> /dev/null
done
}
post_upgrade() {
post_install $1
}
pre_remove() {
gtk-update-icon-cache -q -t -f ${ICON_PATH}
update-desktop-database -q
[[ -x usr/bin/install-info ]] || return 0
for f in ${INFO_FILES[@]}; do
install-info --delete ${INFO_DIR}/$f.gz ${INFO_DIR}/dir 2> /dev/null
done
}
# Maintainer: Neil Santos <nsantos17+aur@gmail.com>
# Don't compile against Gtk+ 3.x by default; stick with Gtk+ 2.x
_opt_use_gtk3="n"
pkgname=emacs-bzr
pkgver=240094
pkgrel=1
pkgdesc='The extensible, customizable, self-documenting real-time display editor from its official Bzr repository'
arch=('i686' 'x86_64')
url='http://www.gnu.org/software/emacs/'
license=('GPL3')
if [[ $_opt_use_gtk3 = "y" ]]; then
depends=('dbus-core' 'libpng' 'libtiff' 'librsvg' 'giflib' 'gtk3' 'libxpm' 'libjpeg>=7' 'hicolor-icon-theme')
else
depends=('dbus-core' 'libpng' 'libtiff' 'librsvg' 'giflib' 'gtk2' 'libxpm' 'libjpeg>=7' 'hicolor-icon-theme')
fi
makedepends=('pkgconfig' 'texinfo')
provides=("emacs=$pkgver")
conflicts=('emacs' 'emacs-nox' 'emacs-otf' 'emacs-cvs' 'emacs-git')
install=$pkgname.install
source=(EMACS_PRETEST_24_0_94.tar.gz::http://repo.or.cz/w/emacs.git/snapshot/605a1f5e6c00fae9cd58e708039494cebfb75469.tar.gz)
md5sums=('da48961525c3b180c08da41de595d9a6')
build() {
cd $srcdir/emacs
# msg "Connecting to Savannah..."
# if [[ -d $_bzrmod/.bzr ]]; then
# (cd $_bzrmod && bzr update -v && cd ..)
# msg "Local checkout updated or server timeout"
# else
# bzr co --lightweight -v $_bzrtrunk $_bzrmod
# msg "Checkout done or server timeout"
# fi
# cp -urT $_bzrmod/ ${_bzrmod}-build
# cd ${_bzrmod}-build
# msg "Trying to ensure building from a clean(-ish) state..."
# make clean
mandir=/usr/share/man
msg "Starting make..."
if [[ $_opt_use_gtk3 = "y" ]]; then
./autogen.sh && ./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--libexecdir=/usr/lib \
--mandir=${mandir} \
--without-sound \
--with-xft \
--with-x-toolkit=gtk3
else
./autogen.sh && ./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--libexecdir=/usr/lib \
--mandir=${mandir} \
--without-sound \
--with-xft \
--with-x-toolkit=gtk
fi
make bootstrap
make
make DESTDIR=${pkgdir} install
msg "Cleaning up..."
mv $pkgdir/usr/bin/{ctags,ctags.emacs}
mv $pkgdir/usr/bin/{etags,etags.emacs}
mv $pkgdir${mandir}/man1/{etags.1,etags.emacs.1}.gz
mv $pkgdir${mandir}/man1/{ctags.1,ctags.emacs.1}.gz
find $pkgdir/usr/share/emacs -type d -exec chmod 755 {} \;
find $pkgdir/usr/share/emacs -exec chown root.root {} \;
chmod 775 $pkgdir/var/games
chmod 775 $pkgdir/var/games/emacs
chmod 664 $pkgdir/var/games/emacs/*
chown -R root:50 $pkgdir/var/games
rm $pkgdir/usr/share/info/dir
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment