Samstag, 19. November 2011

Automated slackware package creation from given sourcefile

Slackware packages are a great (the only good way) to keep track of the installed software on (and to cleanly remove installed software from) your slackware machine.

Most packages that you can find in the www (,, ...) are outdated. You know that: Looking at for a tool, then looking at the version number and see that there's a source on the builders homepage that's x major and y minor releases further.

I, personally, hate to install 'old' software. I want the newest. So I have to built from source - make, ./configure --flags, make install to a DESTDIR, cp docs, change rights and makepkg at the end.

This sucks. To learn a bit about writing shellscripts I started to write a shellscript that does the job (yes, I know about pkgbuild). Currently it's able to:
  • remove old sources
  • remove old package
  • extract the source package (tar.gz / tar.bz2)
  • copy a given layout file (supported by apache httpd for instance)
  • make install to DESTDIR
  • create documentation directory
  • copy documentation files (like README, INSTALL, AUTHORS...)
  • chown root.root DESTDIR
  • build package with makepkg
  • echo build time
 And here is what I plan to add:
  • remove sources after successful build
  • remove installation from DESTDIR after successful build
  • automatically search SRCDIR for documentation and copy it
  • really important: create slack_desc for created package
  • really important: output last 5 rows if build fails
  • really important: check for $DESTDIR support
  • make it much cleaner
  • less params
Yesterday I built the whole xfce4 from source in approx 15 minutes. Added to installpkg the packages in the right order and et voilà - installed xfce4 in 30 seconds. :-)

NOTE: I don't make any warranties that my script will work for you or won't fuck up your machine.
    So if you want to give it a try, look here:

    NOTE: I don't make any warranties that my script will work for you or won't fuck up your machine.

    Keine Kommentare:

    Kommentar veröffentlichen