blurymind
Packager
Vectorian
   
Posts: 1082
|
 |
« on: December 25, 2007, 06:34:26 am » |
|
I decided that it will be mighty nice if there's such a thread.So even people who dont have ftp/ssh key,would be able to submit their port scripts and others test them. A cruxports4slack script is like a SLACKBUILD script that automates the compiling and packaging process (adding slack-desc and slackrequired) , but with the advantage of downloading its source code automatically too. So if you would like to compile a newer version of something,you would only have to run vpackager-->cruxports4slack (gui frontend+modified cruxports4slack) and you would get a list of avaiable scripts from crux repositories and VL's official ports repo. To make it download and compile a newer version,you would only have to make a simple modification to the avaiable script (like change the $VERSION variable). These scripts are made in a manner thats really easy to modify- you would only have to put the right variables for the software you need in most cases. If you have written a script,or would like to try,why not post it here (put quote or code tags please) Helpful links: Moe-|nx has written a very useful howto on the subject of writing ports scripts here: http://vectorlinux.com/wiki/doku.php?id=howtos:portinghowto use cruxports4slack example (COMPIZ): http://vectorlinux.com/wiki/doku.php?id=howtos:compiz-fusionto submit a script,just paste it here with code tags. Make sure you've tested it before submiting. Or if you have a problem with a script, this would be a good place to report it for feedback. Hope this thread is useful, if not- i would like to ask the forum mod to delete it...or move it,if its not at the right place.
|
|
|
|
|
Logged
|
|
|
|
|
uelsk8s
|
 |
« Reply #1 on: December 25, 2007, 10:33:07 am » |
|
Good thread Blurymind. Ill start with GIMP. first the Pkgfile from Crux. root:# cat /usr/ports/opt/gimp/Pkgfile # Description: The GIMP # URL: http://www.gimp.org/ # Maintainer: Matt Housh, jaeger at morpheus dot net # Depends on: gtk, libart_lgpl, libexif, xorg-libxmu, xorg-libxpm, gimp-print
name=gimp version=2.2.17 release=1 source=(ftp://ftp.gimp.org/pub/gimp/v2.2/gimp-$version.tar.bz2)
build() { cd gimp-$version sed -i -e '/$(helpbrowser)/d' plug-ins/Makefile.in ./configure --prefix=/usr \ --mandir=/usr/man \ --disable-static make make DESTDIR=$PKG install rm -rf $PKG/usr/share/{gtk-doc,locale} }
to get the newest 2.4.3 we first change the version # and make sure the source dir is changed from 2.2 to 2.4 version=2.2.17 #original line version=2.4.3 #fixed line source=( http://ftp://ftp.gimp.org/pub/gimp/v2.2/gimp-$version.tar.bz2) #original line source=( http://ftp://ftp.gimp.org/pub/gimp/v2.4/gimp-$version.tar.bz2) #fixed line then we will remove the sed line that removes access to the help files. and finally we remove the "rm -rf $PKG/usr/share/{gtk-doc,locale}" line that removes the docs from the package. Below you have a fixed gimp Pkgfile that make the latest gimp package. # Description: The GIMP # URL: http://www.gimp.org/ # Maintainer: Matt Housh, jaeger at morpheus dot net # Depends on: gtk, libart_lgpl, libexif, xorg-libxmu, xorg-libxpm, gimp-print
name=gimp version=2.4.3 release=1 source=(ftp://ftp.gimp.org/pub/gimp/v2.4/gimp-$version.tar.bz2)
build() { cd gimp-$version ./configure --prefix=/usr \ --mandir=/usr/man \ --disable-static make make DESTDIR=$PKG install }
|
|
|
|
|
Logged
|
|
|
|
blurymind
Packager
Vectorian
   
Posts: 1082
|
 |
« Reply #2 on: December 25, 2007, 01:06:57 pm » |
|
i made a script for gtkglext # GtkGlext # URL: http://www.k-3d.org/gtkglext/Main_Page # Maintainer: blurymind # Depends on: gtk, mesa, # Description: GtkGLExt is an OpenGL extension to GTK+ 2.0 or later written by Naofumi Yasufuku. name=gtkglext version=1.2.0 release=1 source=(http://downloads.sourceforge.net/$name/$name-$version.tar.bz2) build() { cd $name-$version ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/man \ --with-included-gettext \
make make DESTDIR=$PKG install
}
and guatu (very light comic book reader) (depends on gtkglext): # GUatu # URL: http://guatu.sourceforge.net/ # Maintainer: blurymind # Depends on: gtkglext, mesa, Gtk,glitz # Description: GUatu is a GTK/OpenGL-based comic book viewer. name=GUatu version=0.872 release=1 source=(http://downloads.sourceforge.net/guatu/$name-$version.tgz) build() { cd $name ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/man \ --with-included-gettext \
make make DESTDIR=$PKG install
}
Edit:this is weird,but a segfault crash happens if you run guatu from the terminal and open an archive.Also guatu is stable and useable if you install glitz,before compiling it.At their website or configure script glitz wasnt included as a must,but i noticed that its terribly buggy if you dont have it installed! Glsapt glitz before trying to install guatu,or you get a faulty compile! I'd say: this thread+ file>new script or File>open pkgfile function in vpackager would make installing from source a pretty fun thing to do.  My question now is: can we somehow include the slack-desc inside the script, how exactly.I would like to see a script that does that. Can we copy the contense of an existing slack-desc into the ports script?  another question: Where does vpackager put the built from pkgfile package? I cant find it at tmp it seems. EDIT: ok i found it. Why are they stored at such unconvenient places? I would love to submit the packages as well,but i cant seem to find them (have to rebuild?) and i lost my ssh key.I'll have to generate a new one and mail john again 
|
|
|
|
« Last Edit: December 25, 2007, 02:53:08 pm by blurymind »
|
Logged
|
|
|
|
kidd
Packager
Vectorian
   
Posts: 682
|
 |
« Reply #3 on: December 25, 2007, 06:14:39 pm » |
|
Maybe this is a bit OT, but that's the first problem I've encountered when building ports, so here it goes: I've been writing some of ports, and I've found a couple of issues building them: If I put the documentation in a slack-desc file, It doesn't get merged when I pkgmk -d . The package is built ok, but when installed: root@darth [ /tmp/axel ] #installpkg axel-1.0b-i586-1vl59.tlz
.-----.-----------------------------------------------------------------------. | 1/1 | Installing axel-1.0b-i586-1vl59.tlz | '-----'-----------------------------------------------------------------------' WARNING: Package has no description. Executing install script for axel-1.0b-i586-1vl59...
root@darth [ /tmp/axel ] #ls Pkgfile axel-1.0b-i586-1vl59.tlz axel-1.0b.tar.gz slack-desc
If I look at gslapt for info about this package, I get a beautiful empty window 
|
|
|
|
|
Logged
|
|
|
|
exeterdad
Packager
Vectorian
   
Posts: 2046
|
 |
« Reply #4 on: December 25, 2007, 07:18:49 pm » |
|
Maybe this is a bit OT, but that's the first problem I've encountered when building ports, so here it goes: I've been writing some of ports, and I've found a couple of issues building them: If I put the documentation in a slack-desc file, It doesn't get merged when I pkgmk -d . The package is built ok, but when installed: root@darth [ /tmp/axel ] #installpkg axel-1.0b-i586-1vl59.tlz
.-----.-----------------------------------------------------------------------. | 1/1 | Installing axel-1.0b-i586-1vl59.tlz | '-----'-----------------------------------------------------------------------' WARNING: Package has no description. Executing install script for axel-1.0b-i586-1vl59...
root@darth [ /tmp/axel ] #ls Pkgfile axel-1.0b-i586-1vl59.tlz axel-1.0b.tar.gz slack-desc
If I look at gslapt for info about this package, I get a beautiful empty window  I just looked at the code for the pkgmk script we modded. You must be in the same dir as the slack-desc when launching pkgmk in order for the script to pick it up. HTH
|
|
|
|
|
Logged
|
|
|
|
rbistolfi
Packager
Vectorian
   
Posts: 2198
|
 |
« Reply #5 on: December 25, 2007, 07:27:29 pm » |
|
My question now is: can we somehow include the slack-desc inside the script, how exactly.I would like to see a script that does that. Can we copy the contense of an existing slack-desc into the ports script? Cool what about DESC = 'blabalablaba' echo $DESC > slack-desk Just a though, I know BASH as well as medicine :p
|
|
|
|
|
Logged
|
"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite." Jorge Luis Borges, Avatars of the Tortoise. -- Jumalauta!!
|
|
|
exeterdad
Packager
Vectorian
   
Posts: 2046
|
 |
« Reply #6 on: December 25, 2007, 07:43:59 pm » |
|
My question now is: can we somehow include the slack-desc inside the script, No. It can't work the way the script is currently written. If you manually copy the slack-desc to a created install dir. Or embed a slack-desc into your Pkgfile (using cat), it will be overwritten by the pkgfile script when attempting to use the description line to create a new slack-desc, or if existing slack-desc is detected in dir the script was launched from.
|
|
|
|
|
Logged
|
|
|
|
kidd
Packager
Vectorian
   
Posts: 682
|
 |
« Reply #7 on: December 25, 2007, 07:55:24 pm » |
|
I just looked at the code for the pkgmk script we modded. You must be in the same dir as the slack-desc when launching pkgmk in order for the script to pick it up. HTH
I've made sure I launch it from the same dir. slack-desc is detected, and filled with the BUILDDATE: `date` PACKAGER: $VL_PACKAGER .....
info and copied back to $CWD, but the package seems to build without that info... it's really strange. Thanks for your interest exeterdad btw
|
|
|
|
|
Logged
|
|
|
|
exeterdad
Packager
Vectorian
   
Posts: 2046
|
 |
« Reply #8 on: December 25, 2007, 08:10:42 pm » |
|
That really is interesting kidd. What is happening is the script IS finding your slack-desc, then copying to install/slack-desc. Then the build info is appended to the new copy in install/slack-desc. Then your original is overwritten by the appended copy in install. It's odd it's not being included into the package. Just for the heck of it can you try adding --requiredbuilder when launching the script? This will cause the script to use requiredbuilder and makepkg rather then use the default makeslapt. I gave it a bit of thought. It is possible to include the slack-desc within the pkgfile. Here's a example using a recent slack-desc of mine. cat > $CWD/slack-desc << EOF compiz: compiz (OpenGL window and compositing manager) compiz: compiz: Compiz is an OpenGL compositing manager that uses compiz: GLX_EXT_texture_from_pixmap for binding redirected top-level windows compiz: to texture objects. It has a flexible plug-in system and it is compiz: designed to run well on most graphics hardware. compiz: compiz: compiz: License: GPL LGPL MIT compiz: Author: David Reveman < davidr@novell.com> compiz: Website: http://www.compiz-fusion.org/EOF This will create a slack-desc in the directory the script was launched from. The the pkgmk script "should" find it there and then copy it over to /install/slack-desc. Kinda goofy, but it should work. Might just as well add another dozen lines and make it a full blown .SlackBuild while your at it  Edit: Another thought kidd.... the first word of each line of the slack-desc must be exactly the name of your package, and it is case sensitive. For example package: foo-1.2.3-i586-1vl59.tlz would have foo: and a space at the beginning of each line. Forgive me if I insulted, but sometimes it's easier to start with the basics when trying to figure these things out.
|
|
|
|
« Last Edit: December 25, 2007, 08:21:43 pm by exeterdad »
|
Logged
|
|
|
|
exeterdad
Packager
Vectorian
   
Posts: 2046
|
 |
« Reply #9 on: December 25, 2007, 08:33:53 pm » |
|
I've made sure I launch it from the same dir. slack-desc is detected, and filled with the BUILDDATE: `date` PACKAGER: $VL_PACKAGER .....
info and copied back to $CWD, but the package seems to build without that info... it's really strange. Another strange thing. If you pasted the above text from your appended slack-desc... something is wrong (nothing you've done). date and $VL_PACKAGER should not be seen. It should be today's date and your name. Something like this. BUILDDATE: Tue Dec 25 23:25:17 EST 2007 PACKAGER: Mr. Kidd .....
The date command is copied rather than executed, and variable name $VL_PACKAGER rather then it's contents are written. Great, it's crap like this that keep me from sleeping. Thanks buddy! 
|
|
|
|
|
Logged
|
|
|
|
kidd
Packager
Vectorian
   
Posts: 682
|
 |
« Reply #10 on: December 25, 2007, 08:35:27 pm » |
|
The pasted code was from pkgmk script... I was kind of debugging.... Things are getting more weird... I followed the creation of the package, and it seems to be ok. The tlz has the description ok, it's just my 'installpkg' not getting it. I've uploaded the tlz. you can try to edit it with vpackager, and see the description file. try installing it and see what happens. http://raimonster.googlepages.com/axel-1.0b-i586-1vl59.tlzThx.
|
|
|
|
« Last Edit: December 25, 2007, 08:41:40 pm by kidd »
|
Logged
|
|
|
|
exeterdad
Packager
Vectorian
   
Posts: 2046
|
 |
« Reply #11 on: December 25, 2007, 08:47:10 pm » |
|
Your slack-desc: Axel. A light download accelerator This program tries to accelerate the downloading process by using multiple connections for one file. Starting from version 0.97, the program can use multiple mirrors for one download as well. The program tries to be as light as possible (25-30k in binary form), so it might be useful as a wget clone on byte-critical systems. Website: http://wilmer.gaast.net/main.php/axel.htmlAuthor: Wilmer van der Gaast < lintux@debian.org> Should be: axel: Axel. A light download accelerator axel: axel: This program tries to accelerate the downloading process by using multiple axel: connections for one file. Starting from version 0.97, the program can use axel: multiple mirrors for one download as well. The program tries to be as light axel: as possible (25-30k in binary form), so it might be useful as a wget clone axel: on byte-critical systems. axel: axel: Website: http://wilmer.gaast.net/main.php/axel.htmlaxel: Author: Wilmer van der Gaast < lintux@debian.org> Try that 
|
|
|
|
|
Logged
|
|
|
|
kidd
Packager
Vectorian
   
Posts: 682
|
 |
« Reply #12 on: December 25, 2007, 08:57:11 pm » |
|
OMG! It works now.
The packages I made for previous VL versions had a plain file without the 'programname:' prefix . I suppose checkinstall addded the prefix for me.
It's not very difficult to make pkgmk add the prefix in case it isn't there. Just a suggestion for next version.
See ya!
|
|
|
|
|
Logged
|
|
|
|
exeterdad
Packager
Vectorian
   
Posts: 2046
|
 |
« Reply #13 on: December 25, 2007, 09:05:14 pm » |
|
I suppose checkinstall addded the prefix for me. That's it exactly. Checkinstall DOES add the prefix for you. Adding that code to the pkgmk script is possible I suppose, but the original author probably had no interest in his script out thinking every possible scenario. Glad to see you're in business. Looking forward to trying out that package as it will be useful to me.
|
|
|
|
|
Logged
|
|
|
|
kidd
Packager
Vectorian
   
Posts: 682
|
 |
« Reply #14 on: December 25, 2007, 09:24:55 pm » |
|
Ok! Everything seems to work fine now. As a tip, if anyone is using vim to make this slack-desc, you can add those damn prefixes with the next command: :%s/^/name: / If you happen to edit the file, and now, it's a little longer, so you have lines with the prefix and lines without, the next command will add the prefix to lines not having it. :v/^name: /s/^/name: / HTH
|
|
|
|
|
Logged
|
|
|
|
|