You are not logged in.

#1 2013-04-16 22:47:53

tapia
Member
Registered: 2013-03-13
Posts: 56

Making a PKGBUILD file for EQC (A LaTeX Equation Compiler)

Hi everyone,

Just yesterday I was searching in the web for some alternative to Mathcad (a useful program to make calculations the "engineering-way"), when I found this great software developed by Jan Rheinländer, which in essence, lets you do the same as Mathcad, but using Latex (very beautiful).
So I decided to make a PKGBUILD, so other people could install it easily. The problem is, that this is my first PKGBUILD file and I have been having problems making it to work.
Here is the code I have:

# PKGBUILD for EQC: Latex Equation Compiler
# Contributor: Cristóbal Tapia <crtapia@gmail.com>

pkgname=eqc
pkgver=20130112
pkgrel=1
pkgdesc="A preprocessor for LaTeX files that enables numeric and symbolic calculations"
arch=('x86_64' 'i686')
url="http://eqc.sourceforge.net/wiki/index.php/Main_Page"
license="(L)GPL"
depends=('ginac' 'cln' 'gmp' 'flex' 'bison' 'texlive-science' 'texlive-pstricks')
source=()

_svntrunk="https://eqc.svn.sourceforge.net/svnroot/eqc"
_eqcsrc="eqc_src"

build() {
  cd $srcdir

  msg2 "Connecting to Sourceforge server...."

  svn co $_svntrunk $_eqcsrc --config-dir ./ -r '{'$_pkgver'}'

  cd $_eqcsrc

  ./configure

  make

  make install

}

package() {

}

Can anyone help me a little please?
Thanks!

Edit: here is the link to the wiki of the project: http://eqc.sourceforge.net/wiki/index.php/Main_Page

Last edited by tapia (2013-04-17 03:12:08)

Offline

#2 2013-04-17 04:27:16

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: Making a PKGBUILD file for EQC (A LaTeX Equation Compiler)

First thing, don't use _svntrunk or do the checkout yourself, that's all pacman pre-4.1 stuff. Just put "svn+https://eqc.svn.sourceforge.net/svnroot/eqc" in the source array and 'SKIP' in the md5sums array. Then just cd to "$srcdir/eqc" at the beginning of each function.

Do not install in the build function! make install goes in the package function, and should be more like "make DESTDIR="$pkgdir" install". Take a look at the examples in /usr/share/pacman.

You'll also want a pkgver function to update the package version info. Take a look at this page: https://wiki.archlinux.org/index.php/VC … Guidelines

Last edited by Scimmia (2013-04-17 04:28:45)

Online

#3 2013-04-17 18:07:20

tapia
Member
Registered: 2013-03-13
Posts: 56

Re: Making a PKGBUILD file for EQC (A LaTeX Equation Compiler)

Thanks a lot for your hints Scimmia! I have changed the things you suggested, but I am having problems with the pkgver() function. I think, that I'm not really sure if I am changing to the correct directory to obtain the information from svn.

pkgname=eqc
pkgrel=1
pkgdesc="A preprocessor for LaTeX files that enables numeric and symbolic calculations"
arch=('x86_64' 'i686')
url="http://eqc.sourceforge.net/wiki/index.php/Main_Page"
license="(L)GPL"
depends=('subversion' 'ginac' 'cln' 'gmp' 'flex' 'bison' 'texlive-science' 'texlive-pstricks')
source=(svn+https://eqc.svn.sourceforge.net/svnroot/eqc)
md5sums=('SKIP')

pkgver() {
  cd "$SRCDEST/$pkgname"
  svnversion | tr -d [A-z]
}

build() {
  cd $srcdir/$pkgname

  ./configure

  make
}

package() {
  cd "$srcdir/$pkgname"

  make DESTDIR="$pkgdir" install
}

Last edited by tapia (2013-04-17 18:13:15)

Offline

#4 2013-04-17 18:49:02

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: Making a PKGBUILD file for EQC (A LaTeX Equation Compiler)

You're in the correct dir, but the pkgver() function is called to update the pkgver= variable. You removed that variable.

I just tested it, and there's a severe problem, though. It runs into the problem described and fixed here: https://mailman.archlinux.org/pipermail … 17000.html

It looks like you're going to have to do the checkout manually after all, at least until Pacman 4.1.1 comes out. This complicates things because you then can't use the pkgver function.

Online

#5 2013-07-07 19:39:43

tapia
Member
Registered: 2013-03-13
Posts: 56

Re: Making a PKGBUILD file for EQC (A LaTeX Equation Compiler)

Hello again!

I have finally done this. It works for me, so I would like to know if it works for somebody else or if there is any dependency problem.

PKGBUILD:

# PKGBUILD for EQC: Latex Equation Compiler
# Maintainer: Cristóbal Tapia <crtapia a gmail com>

pkgname=eqc
pkgrel=1
pkgver=48
pkgdesc="A preprocessor for LaTeX files that enables numeric and symbolic calculations"
arch=('x86_64' 'i686')
url="http://eqc.sourceforge.net/wiki/index.php/Main_Page"
license="(L)GPL"
depends=('subversion' 'ginac' 'cln' 'gmp' 'flex' 'bison' 'texlive-science' 'texlive-pstricks' 'linuxdoc-tools')
source=(svn+svn://svn.code.sf.net/p/eqc/code)
md5sums=('SKIP')
install='eqc-svn.install'

pkgver() {

  cd $srcdir/code
  svnversion | tr -d [A-z]
}

build() {

  cd $srcdir/code

  ./configure

  make
}

package() {
  cd $srcdir/code

  make DESTDIR="$pkgdir" install
}

eqc-svn.intall:

post_install() {
	texhash	
}
 
post_upgrade() {
	texhash
}

post_remove() {
  texhash
}

Offline

Board footer

Powered by FluxBB