You are not logged in.

#1 2010-01-18 22:27:06

theapodan
Member
From: Virginia, USA
Registered: 2008-10-21
Posts: 116

elvis with X11 support - PKGBUILD

Building the other 2 elvis PKGBUILDs in the AUR is broken, and they are without X11 support.

I'm wondering if I should submit this PKGBUILD, which compiles and works fine, and includes X11 and x86_64 support and the help documentation, to the AUR.

# Maintainer: Robert Kieffer <rek2w @ A L U M N I DOT V I R G I N I A DOT E D U>
# Based on pkgbuild by Rudy Matela <rudy.matela@gmail.com>
# Date: 2010-1-18 

#compile options

_ELVISVERSION=2.2_0        # valid options are 2.2_0 and 2.2_1 which are stable and beta, respectively
_COMPILEWX11=true         # X11 support built by default
_SLACKWARECOLORS=false     # elvis colorscheme from slackware not installed by default - it's boring
_GENERALCOMPILEOPTS=""     # place for you you to define your own configure options

if [ $_ELVISVERSION = "2.2_0" ]; then
_ELVISSRC="ftp://ftp.cs.pdx.edu/pub/elvis/elvis-2.2_0.tar.gz"
_ELVISMD5="6831b8df3e4a530395e66c2889783752"
pkgver="2.2_0"
fi
if [ $_ELVISVERSION = "2.2_1" ]; then
_ELVISSRC="ftp://ftp.cs.pdx.edu/pub/elvis/unreleased/almost-2.2_1.tar.gz"
_ELVISMD5="6959f2f156920db47e4c6324f187e632"
pkgver="2.2_1"
fi

pkgname=elvis_patched-withx
pkgver=$pkgver
pkgrel=1
url="http://elvis.the-little-red-haired-girl.org/"
alt_url="http://elvis.vi-editor.org/"
pkgdesc="A vi clone - with X support (if you wish) - stable or beta version"
depends=('glibc' 'libx11' 'ncurses' 'fontconfig' 'expat' 'freetype2' 'zlib')
source=("$_ELVISSRC"
    "http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/editors/elvis/patches/patch-ref.c"
    "http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/editors/elvis/patches/patch-ae"
    "ftp://ftp.slackware.com/pub/slackware/slackware-13.0/source/a/elvis/elvis.clr")
md5sums=("$_ELVISMD5"
         '8d9df9aa5edcf8e0b8a2f5d59d1c30c7'
         '2bec41d9f09542e2ef41de1e6b41727e'
         'c47a70cb176ebf2eb99b055c4048a560')
arch=('i686' 'x86_64')
license=('PerlArtistic')
conflicts=('elvis' 'elvis_slack')
replaces=('elvis' 'elvis_slack')

_DESKTOPFILE="[Desktop Entry]\\nType=Application\\nVersion=1.0\\nName=Elvis\\nComment=A simple text editor\\nExec=elvis\\nIcon=$pkgname\\nTerminal=true\\nCategories=Editors;Programming;Accessories"

build() { 
    cd $srcdir/elvis-$pkgver
    if [ $_COMPILEWX11 = "true" ]    
    then
        _GENERALCOMPILEOPTS="$_GENERALCOMPILEOPTS --with-x"
        _COMPILEWX11=1
    else 
        _GENERALCOMPILEOPTS="$_GENERALCOMPILEOPTS --with-x=no"
        _COMPILEWX11=0
    fi
    if [ $_SLACKWARECOLORS = "true" ]
        then cp $srcdir/elvis.clr ./data
    fi
  cat $srcdir/patch-* > patches
  patch -p0 <patches
  echo -e $_DESKTOPFILE > $pkgname.desktop
  ./configure --prefix=/usr --verbose $_GENERALCOMPILEOPTS
  sed 's/\<CTAGS\>/ELVTAGS/g; s/ctags\>/elvtags/g; s/ant" elvtags/ant" ctags/' doc/ctags.man >doc/elvtags.man
  /usr/bin/make || return 1
  
    install -d $pkgdir/usr/bin $pkgdir/usr/share/elvis/ $pkgdir/usr/share/man/man1/
  for i in elvis ref elvtags elvfmt; do
      install -D -s -m755 $i $pkgdir/usr/bin/
  done

  cd $srcdir/elvis-$pkgver/data/
  cp -r *  $pkgdir/usr/share/elvis/
  
  cd $srcdir/elvis-$pkgver/doc/
  install -D -m644 *.html bugs.txt $pkgdir/usr/share/elvis/
  for i in elvis ref elvtags elvfmt; do
      mv $i.man $i.1
      gzip $i.1
      install -D -m644 $i.1.gz $pkgdir/usr/share/man/man1/
  done
  
  if (( $_COMPILEWX11 ))    
    then
    install -D -m644 $srcdir/elvis-$pkgver/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
    install -D -m644 $srcdir/elvis-$pkgver/data/icons/elvis3.xpm $pkgdir/usr/share/pixmaps/$pkgname.xpm
  fi
}

Last edited by theapodan (2010-01-20 01:15:08)

Offline

#2 2010-01-19 02:24:43

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: elvis with X11 support - PKGBUILD

While I didn't actually read your PKGBUILD here, in general, there's no reason not to submit such things to AUR.

Offline

Board footer

Powered by FluxBB