You are not logged in.

#1 2008-01-08 13:34:40

dw
Member
From: Vienna, Austria
Registered: 2006-11-25
Posts: 160

[solved] help with PKGBUILD for emacs-ess

hi there. i want to create a pkgbuild (my first actually) for emacs-ess (emacs speaks statistics)

I have no problem to install the this emacs-addon manually using the following steps.

1) download the package (http://ess.r-project.org/downloads/ess/ess-$pkgver.tgz)
2) extract it and move to /usr/share/emacs
3) change to /usr/share/emacs/ess-$pkgver
4) make
5) make install
6) add the following line

(load "/usr/share/emacs/ess-$pkgver/lisp/ess-site")

to /usr/share/emacs/site-lisp/site-start.el or create this file with this line.

the (general) problem i have is the following: if i use this steps in the pkgbuild makepkg obviously complains that $startdir/pkg is empty....

any template PKGBUILD that could help me?

thx in advance!

Last edited by dw (2008-03-22 11:31:50)

Offline

#2 2008-01-11 06:48:23

beissemj
Member
Registered: 2007-05-11
Posts: 43

Re: [solved] help with PKGBUILD for emacs-ess

So you just want to make a new file with a line in it? Am I understanding you correctly?


Professor: This isn't right...It isn't even wrong...

Offline

#3 2008-01-11 08:18:03

dw
Member
From: Vienna, Austria
Registered: 2006-11-25
Posts: 160

Re: [solved] help with PKGBUILD for emacs-ess

beissemj wrote:

So you just want to make a new file with a line in it? Am I understanding you correctly?

hi beissemj. first of, thx for taking your time and replying to my question.

however, it is not my problem to add a line into a new file. i know i can do this using "echo >>".

my problem is, that in order to install ess, i have to move the folder "ess-$pkgver" (which is created by unpacking the archive) to /usr/share/emacs. then i have to cd to this folder and run

make
make install

in this folder (/usr/share/emacs/ess-$pkgver).

and this is my problem. i have no clue how to do this _AND_ keeping the structure pkg/..... for building the package. i hope i managed to describe my problem more clearly now (but it's a bit difficult since english isn't my mother language - obviously smile )

thx,
bernhard

Offline

#4 2008-01-11 19:34:03

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: [solved] help with PKGBUILD for emacs-ess

try replacing:
make install
by:
make DESTDIR="$startdir/pkg" install

Offline

#5 2008-03-20 21:09:41

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [solved] help with PKGBUILD for emacs-ess

Please test:

# Contributor: Stefan Husmann <Stefan-Husmann@t-online.de>
pkgname=ess
pkgver=5.3.6
pkgrel=1
pkgdesc="Emacs Speaks Statistics: A Universal Interface for Statistical Analysis"
url="http://ess.r-project.org/"
arch=('i686')
license=('GPL')
depends=('emacs')
install=ess.install
source=('http://ess.r-project.org/downloads/ess/ess-5.3.6.zip')
md5sums=('74e6b9bdeaefee1c5bae0a0395ae9b47')

build() {
  cd $startdir/src/$pkgname-$pkgver
  find . -type d -exec chmod 755 {} \;
  make prefix=/usr || return 1
  make DESTDIR=$pkgdir/usr INFODIR=$pkgdir/usr/share/info/ install || return 1
  rm $pkgdir/usr/share/info/dir
}

The tarball (and also the zipfile) is broken, because therein are some subdirectories without having the x-bit set. Therefore the stupid find-command.

You will also neede this install-file (ess.install)

# arg 1:  the new package version
post_install() {
  install-info /usr/share/info/ess.info /usr/share/info/dir
  /bin/true
}
# arg 1:  the old package version
pre_remove() {
  install-info --delete /usr/share/info/ess.info /usr/share/info/dir
  /bin/true
} 

op=$1
shift
[ "$(type -t "$op")" = "function" ] && $op "$@"

Last edited by Stefan Husmann (2008-03-20 21:20:45)

Offline

#6 2008-03-21 05:26:38

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [solved] help with PKGBUILD for emacs-ess

I changed the install file a bit, please use the version in AUR.

Offline

#7 2008-03-21 18:37:52

dw
Member
From: Vienna, Austria
Registered: 2006-11-25
Posts: 160

Re: [solved] help with PKGBUILD for emacs-ess

Stefan Husmann wrote:

I changed the install file a bit, please use the version in AUR.

Hi Stefan.

First of, thank you very much for taking the time and providing a pkgbuild for emacs-ess. I have tried to install the version of the pkgbuild you have posted in aur. I've realized two things. One thing is minor, the md5-sum in the PKGBUILD is wrong and needs to be changed so that the package can be built (76319a884ef40ae642aa4842fc70d092 is the correct md5-hash).

The other problem seems to be more troublesome. After building and installing the package (and putting (require 'ess) to ~/.emacs), I can't create a R session from emacs (M-x R). Other than that I get no error messages or anything. Strange.

But thank you very much again for your time and help!

Offline

#8 2008-03-21 19:19:00

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [solved] help with PKGBUILD for emacs-ess

Hm, my zipfile has the md5sum 74e6b9bdeaefee1c5bae0a0395ae9b47 and builds fine with the PKGBUILD. Did you try to rename it and to download it again?
I also can start R (release 2.6.1) using M-x R.

Offline

#9 2008-03-21 20:34:00

dw
Member
From: Vienna, Austria
Registered: 2006-11-25
Posts: 160

Re: [solved] help with PKGBUILD for emacs-ess

Hi Stefan.

No, I didn't do anything with the zip file. I just ran "makepkg" and got an error about a failed integrity check. Then i did a md5sum on the downloaded zip file and checked with the md5-sum in the PKGBUILD. However, after changing this, the package compiles and builds fine and pacman -U .... works too. I just can't start R (which would be really good) smile

The other thing. I have r-2.6.2-1 from testing installed. Maybe this is the reason why it doesn't work here?

If I could provide any further (useful) information, I happily will do so. Thank you again Stefan!

Offline

#10 2008-03-21 21:22:05

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [solved] help with PKGBUILD for emacs-ess

I think I found the cause for the md5sum-problem: They fixed the problem I mentioned here:

The tarball (and also the zipfile) is broken, because therein are some subdirectories without having the x-bit set. Therefore the stupid find-command.

The "stupid find-command" is not necessary anymore. Thus the zipfile is new, it naturally changed its md5sum.

Your other problem: I now have it also. So fixing the one bug, they managed to put in another one sad

Offline

#11 2008-03-21 22:23:34

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [solved] help with PKGBUILD for emacs-ess

I think I found a workaround: Please try again with another new PKGBUILD or simply put the line

(load "/usr/share/emacs/site-lisp/ess-site")

to your .emacs.

Offline

#12 2008-03-22 06:25:12

dw
Member
From: Vienna, Austria
Registered: 2006-11-25
Posts: 160

Re: [solved] help with PKGBUILD for emacs-ess

Hi Stefan.

This works just pefect. One little suggestion. In the ess.install file, you should probably replace

echo "(load "/usr/share/emacs/site-lisp/ess-site")"

with

echo "(load \"/usr/share/emacs/site-lisp/ess-site\")"

in ess.install.

Adding this to ~/.emacs without the quotes before the path to ess-site, R won't start up. With the quotes, everything is fine. (It's just cosmetic, but the output message is at least misleading smile )

Thank you very much Stefan!

Offline

#13 2008-03-22 08:17:30

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [solved] help with PKGBUILD for emacs-ess

Hello,
I changed the place for the el- and elc-files, they now stay in /usr/share/emacs/site-lisp/ess

Does the help.start() function work for you? What version of emacs do you have? For me it does not.

Offline

#14 2008-03-22 08:39:12

dw
Member
From: Vienna, Austria
Registered: 2006-11-25
Posts: 160

Re: [solved] help with PKGBUILD for emacs-ess

Hi Stefan.

I have enabled testing and have a fully updated system.

pacman -Q | grep emacs
emacs 22.1-4

If the help.start() function in R is not working for you, you might try the browser= option. I just tried for example

help.start(browser="/usr/bin/links -g")

and it really works well.

Offline

#15 2008-03-22 11:12:21

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [solved] help with PKGBUILD for emacs-ess

Thank you, that works. :.)

Offline

#16 2008-03-23 22:06:13

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [solved] help with PKGBUILD for emacs-ess

If you like to be just a little more recent, you can try the svn version of ess (ess-svn in AUR).

Offline

#17 2008-03-24 07:14:51

dw
Member
From: Vienna, Austria
Registered: 2006-11-25
Posts: 160

Re: [solved] help with PKGBUILD for emacs-ess

Stefan Husmann wrote:

If you like to be just a little more recent, you can try the svn version of ess (ess-svn in AUR).

Hi Stefan.

I just tried the svn-version and it works very well too. Thank you very much!

Offline

Board footer

Powered by FluxBB