racket

General talk about packaging procedures and packages.
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: [WIP]racket

Post by gapan »

mimosa wrote:What criterion should I use to decide what to include? Most of those are introductions to the files in a particular directory, and won't even make sense in /usr/doc/$pkgname-$pkgver. On the other hand, racket is very well documented internally
You decide. If it doesn't make sense to include it, don't. You could even include all of them by renaming, or by putting them in subdirectories inside /usr/doc/$pkgname-$pkgver
Image
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: racket

Post by mimosa »

Sourceforge is pretty sluggish today, so I'm posting here to say that just rebuilding racket didn't work. As I posted earlier at sourceforge, the 64-bit package looks to be OK though.

I'm at a loss as to how to solve this. drracket is just a wrapper script, and it's generated late in the build - by racket itself. This makes it hard to follow the chain back. On the other hand, I can't see anything wrong with the SLKBUILD, not even by comparing it with the Arch PKGBUILD.
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: racket

Post by laprjns »

mimosa wrote: As I posted earlier at sourceforge, the 64-bit package looks to be OK though.
I can confirm that the 64-bit packager does starts correctly, however it does have the same problem with the link in the Help menu. When you click on the first item (Racket Documentation), or the second item (Help Desk) in the Help menu it starts up your browser and looks for this link:

Code: Select all

file:///usr/share/racket/doc/index.html
And gets a file not found error

If you look in your slkbuild you moved all the files that are in /use/share/racket/doc to /usr/doc/racket-5.3

Code: Select all

 mv $startdir/pkg/usr/share/$pkgname/doc $startdir/pkg/usr/doc/$pkgname-$pkgver
Both packages have this problem.
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: racket

Post by mimosa »

Yes I have just reached the same conclusion (having booted into current-64).

That move is in accordance with Salix (Slackware?) policy about where docs go, as I understand it. However the actual application is still looking for those docs where it expects them to be.

What would you suggest is the best approach here? Leave them in /usr/share? I actually fixed this just now with a symlink - is that kosher?

Code: Select all

root[pistachio]# ln -s /usr/doc/racket-5.3 /usr/share/racket/doc
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: racket

Post by laprjns »

mimosa wrote:That move is in accordance with Salix (Slackware?) policy about where docs go, as I understand it. However the actual application is still looking for those docs where it expects them to be.
Application documentation does not have to be moved to /usr/doc. Only the docs that are generally found in the top directory of the source tarball like README, INSTALL, changelog licenses, etc need to be in /usr/doc. In the large majority of cases, slkbuiild will move these for you if you uncomment the following line in the SLKBUILD file:

Code: Select all

#docs=('authors' 'copying' 'changelog' 'install' 'news' 'readme') 
Using this option,I don't recall ever having the need to mv documents in any of my builds.
What would you suggest is the best approach here?
I suggest uncommenting the doc line in your SLKBUILD and remove all the mv and cp statements having to do with the documents. I just built the i486 package with these changes in your SLKBUILD and everything is working

Code: Select all

#Packager: Tim Beech <tim ~dot~beech~at~gmail~dot~com>
#Former Packager(s): Name <email@address.com>
#Anything commented out is optional and can be deleted.

pkgname=racket
pkgver=5.3
pkgrel=1tjb
#arch=noarch
source=("http://download.racket-lang.org/installers/5.3/racket/$pkgname-$pkgver-src-unix.tgz" "drracket.desktop")
sourcetemplate=http://people.salixos.org/mimosa/packages/$pkgname/$pkgver/
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo" "COPYING.txt")
url="http://racket-lang.org/"
#dotnew=()
#CFLAGS=
#CXXFLAGS=
#options=('noextract')

#doinst() {
#
#}

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"Racket - a scheme dialect and IDE"
""
"Racket is a dialect of Scheme that comes with an IDE - DrRacket - and"
"a series of teaching languages. In conjunction with the second edition"
"of the book How to Design Programs (available online) it may be used"
"as an introduction to Scheme and to programming in general. Racket"
"comes with a full set of libraries, and is aimed at software"
"development not just teaching. Extensive documentation is included."
)

build() {
	cd $startdir/src/$pkgname-$pkgver/src
	# sed copied from Arch PKGBUILD for good measure
	# something to do with interrupts during garbage collection
	sed -i 's/struct siginfo/siginfo_t/' racket/gc2/sighand.c
	./configure \
		--prefix=/usr \
		--libdir=/usr/lib${LIBDIRSUFFIX} \
		--localstatedir=/var \
		--sysconfdir=/etc \
		--build=$arch-slackware-linux
	make || return 1
	make install DESTDIR=$startdir/pkg

		
	# deal with the icons
	for size in 16 32 48
	do
	mkdir -p $startdir/pkg/usr/share/icons/hicolor/${size}x${size}/apps/
	cp $startdir/src/$pkgname-$pkgver/collects/icons/plt-${size}x${size}.png \
		$startdir/pkg/usr/share/icons/hicolor/${size}x${size}/apps/racket.png
	done
	
	# .desktop file
	mkdir -p $startdir/pkg/usr/share/applications
	cp $startdir/src/drracket.desktop $startdir/pkg/usr/share/applications
} 
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: racket

Post by mimosa »

Hmm ... I did it like that after discussion with gapan ... see above in this thread. In particular, what would be the licence doesn't get copied the normal way. Those other files I added for good measure, and one could debate each case. My impression is that they are not otherwise preserved in the build.

On my 13.37 system, /usr/share/doc is a symlink to /usr/doc

My inclination at this point is to favour the symlink - that is, the specific one for racket - and leave everything else as it is. Alternatively, I could have a special directory /usr/doc/racket just for those few files ...

The more serious question is bindir=home/foo/bar. Why didn't that happen in the 64 bit build?

Experience suggests user error is the most likely explanation. But what? The SLKBUILD is identical (I checked with diff). The source tarball, ditto. The environment should be pretty clean, because I only use it for packaging.

EDIT When you say your i486 build is working - do you mean also the bindir in /usr/bin/drracket? That would suggest the problem doesn't lie in the SLKBUILD.
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: [WIP]racket

Post by laprjns »

gapan wrote:You decide. If it doesn't make sense to include it, don't.
Does it make sense to jump through all the hoops that your doing in your SLKBUILD? Take another look at the arch PKGBUILD; there's no moving or sym linking documents going on there, And they follow basically the same packaging rules.
mimosa wrote:When you say your i486 build is working - do you mean also the bindir in /usr/bin/drracket?
Yes, bindir was set to /usr/bin/drracket.
mimosa wrote:That would suggest the problem doesn't lie in the SLKBUILD.
My guess, and it's only a guess, is that you where not in the build directory when you ran slkbuild. But this means that you had to give slkbuild a path to SLKBUILD.
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: racket

Post by mimosa »

My guess, and it's only a guess, is that you where not in the build directory when you ran slkbuild. But this means that you had to give slkbuild a path to SLKBUILD.
No. I would soon have been cured of that habit, if I'd had it at first! ;)

I suppose I could reinstall current, and try again. But since there's no reason apart from the failure to build racket correctly to suppose that would help, I'd rather try a subtler approach.

Does anyone have any ideas?

I've also been wondering how I could have tested better so as to pick this up. The help files, absolutely, I didn't test the help. You can't test everything, and I did spend several hours using the application. But the incorrect path that only works on my machine, I was never going to notice. I'd say that was an error, not in testing - but whatever I did in the first place to cause it to happen.

And by the way, once I do get it to work, should the pkgrel be 2tjb?
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: racket

Post by mimosa »

I'm now ready to go again inside an unsullied beta install. I've decided to use the symlink. My question is, should I use an absolute path for the target? Or does slkbuild take care of links? That is, should it be:

Code: Select all

ln -s /usr/doc/racket-5.3 $startdir/pkg/usr/share/racket/doc
or would the following result in a correct link in the installed package:

Code: Select all

ln -s $startdir/pkg/usr/doc/racket-5.3 $startdir/pkg/usr/share/racket/doc
:?:
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: racket

Post by gapan »

Just leave them where they are. No links or anything.
Image
Image
Post Reply