#!/bin/sh # Slackware build script for emacs-22 # Written by Dušan Stefanović (stefanovic.dusan@gmail.com) # Modified by Robby Workman # Modified by Patrick Volkerding PRGNAM=emacs PKGNAM=$PRGNAM VERSION=22.2 BUILD=${BUILD:-1} TAG=${TAG:-} . /etc/pkghelpers pkghelpers_env rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION pkghelpers_permissions # Emacs 22.x permissions fix for building in a chroot export LOGNAME="root" CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --program-prefix="" \ --program-suffix="" \ --mandir=/usr/man \ --infodir=/usr/info \ --enable-static=no \ --enable-shared=yes \ --with-x \ --with-x-toolkit=gtk \ --build=${ARCH}-$DISTRO-linux make -j5 || exit 1 make install DESTDIR=$PKG ( cd $PKG/usr/bin rm emacs mv emacs-${VERSION} emacs-${VERSION}-with-x11 ln -sf emacs-${VERSION}-with-x11 emacs ) # Also add a version of the binary that is not linked to X11: cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --program-prefix="" \ --program-suffix="" \ --mandir=/usr/man \ --infodir=/usr/info \ --enable-static=no \ --enable-shared=yes \ --with-x=no \ --build=${ARCH}-$DISTRO-linux make -j3 || exit 1 # Install the non-x version: cat src/emacs > $PKG/usr/bin/emacs-${VERSION}-no-x11 chown root:root $PKG/usr/bin/emacs-${VERSION}-no-x11 chmod 1755 $PKG/usr/bin/emacs-${VERSION}-no-x11 # I don't care for broken permissions. chmod 755 $PKG/var/games/emacs chown -R games:root $PKG/var/games/emacs # This avoids a collision with Exuberant Ctags... mv $PKG/usr/bin/ctags $PKG/usr/bin/ctags-emacs mv $PKG/usr/man/man1/ctags.1 $PKG/usr/man/man1/ctags-emacs.1 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a AUTHORS COPYING* ChangeLog INSTALL README \ $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh # Make the .desktop file mkdir -p $PKG/usr/share/applications cat << "EOF" > $PKG/usr/share/applications/$PRGNAM.desktop [Desktop Entry] Encoding=UTF-8 Type=Application Exec=emacs Icon=emacs.png Terminal=0 Name=Emacs Comment=Text Editor Categories=Application;Development; EOF # Make the package freedesktop compliant mkdir -p $PKG/usr/share/icons/hicolor/48x48/apps cat $CWD/emacs.png > $PKG/usr/share/icons/hicolor/48x48/apps/emacs.png cd $PKG pkghelpers_fixup pkghelpers_makepkg