LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 09-20-2006, 04:11 AM   #1
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,724

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
PkgBuild & src2pkg upgrade


A new release of PkgBuild is available. This fixes several typos and bugs and also adds new features.

Default settings for working directories have been changed to use /tmp. This should be safer for most folks.

pkgbuild now includes the installwatch libraries and places them in /usr/libexec/pkgbuild so pkgbuild can co-exist with installed versions of installwatch or checkinstall.

Please read the manpage or run 'src2pkg --help' to see what's new. The old documentation has been moved as it will need to be redone before getting to 1.0

New version 0.9.3 is available here.
 
Old 09-20-2006, 09:24 AM   #2
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,008

Rep: Reputation: 110Reputation: 110
Cool!

I like the new doc positioning from /usr/doc/$NAME to /usr/doc/$NAME-$VERSION. I also like that it defaults to cleaning everything up, although it would be helpful to generate a mock database file. I'm a bit mystified why the stuff in /usr/doc doesn't show up in the DB file, but I think that is my lack of understanding the packaging system.

If you would like, I can make the PkgBuilds available to you that I've done so that you can put them up on your site somewhere. One of them is a Level2 GNOME app (I'm not sure of the exact level because I installed all of GNOME-COMPAT, but 2 sounds about right to me). The other is a gtk-1.2 app. Both are for working with Japanese.

Last edited by tuxdev; 09-20-2006 at 09:29 AM.
 
Old 09-20-2006, 12:09 PM   #3
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,724

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Thanks for your feedback. I haven't checked the functioning of the DB generation lately. Thanks for your e-mail of a few days ago which prompted me to put in a little time on PkgBuild.

I'd be glad to have your PkgBuild scripts -you can just e-mail them to me as attachments with a link to the sources you used. Then I'll add them to the collection.

You had asked about an auto-patch routine. The earliest versions of PkgBuild included this feature. But as you said, it's easier to insert a line for patches so they get applied correctly.
 
Old 09-20-2006, 09:09 PM   #4
MannyNix
Member
 
Registered: Dec 2005
Location: ~
Distribution: Slackware -current, OpenBSD
Posts: 449

Rep: Reputation: 41
Nice, i'm enjoying pkgfiles on crux and abs on arch, great to have something like this on Slackware, i'm definitely gonna try it, thanks and good job
 
Old 09-22-2006, 09:04 AM   #5
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,008

Rep: Reputation: 110Reputation: 110
I want to make a script for a package that uses the scons build system, but PkgBuild doesn't support it yet builtin (and I don't understand the code well enough to put support in myself). Does PkgBuild support using special commands (not builtin) for ./configure, make, make install? That would be nice for binary release packages, and self-extracting-and-installing packages.
 
Old 09-23-2006, 03:31 AM   #6
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,724

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
CONFIG_COMMAND, INSTALL_COMMAND and INSTALL_RULE can all be set from within your script. Just put them before this line:
source /usr/libexec/pkgbuild/FUNCTIONS

Have a look in source /usr/libexec/pkgbuild/FUNCTIONS at lines 311 and 320 for 'configure', line 413 for 'make' and lines 468,468,494 for make install to see how they work inside.

These can all be set to anything you like. INSTALL_RULE is used mainly when you need to run several make rules -like 'make install' and 'make install_binProgs'. This can be written like this 'make install install_binProgs'. So you'd just set
INSTALL_RULE="install install_binProgs"

If the options available don't give you enough control, simply comment out the step in your PkgBuild script and write the code manually. Each PkgBuild step is designed to be pretty much independent and skipping one should not break the functionality of the others. Leaving out or changing the code for configure_source, compile_source or fake_install command is the most common customization of PkgBuild scripts.

Here's an example:

#!/bin/sh
BUILD="2"
NAME="iv"
VERSION="0.3.9"
SRC_SUFFIX=".tar.bz2"

DOCLIST="LICENSE README"

source /usr/share/Amigo/PkgBuild/FUNCTIONS ;

pre_process ;
find_source ;
make_dirs ;
unpack_source ;
fix_source_perms ;

# configure_source ;
# compile_source ;
# fake_install ;

cd $SRC_DIR && ./configure Linux
# cd $SRC_DIR && GCC295 make all
cd $SRC_DIR && GCC31 make all

mkdir -p $PKG_DIR/usr/bin
cp -a $SRC_DIR/iv/iv $PKG_DIR/usr/bin

mkdir -p $PKG_DIR/usr/share/$NAME-$VERSION
cp -a $SRC_DIR/iv/*.xpm $PKG_DIR/usr/share/$NAME-$VERSION

# mkdir -p $PKG_DIR/usr/man/man1
# cp -a $SRC_DIR/iv/iv.1.bz2 $PKG_DIR/usr/man/man1

fix_pkg_perms ;
strip_bins ;
create_docs ;
compress_man_pages ;
make_description ;
make_doinst ;
make_package ;
post_process ;
exit 0

This line could have been handled with CONFIG_COMMAND="./configure Linux":
cd $SRC_DIR && ./configure Linux

And this could have been done with MAKE_COMMAND="make all":
cd $SRC_DIR && GCC31 make all
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Announcing Amigo-PkgBuild-0.3 gnashley Amigo 2 02-15-2009 04:13 PM
'src2pkg' Converts sources to installable packages gnashley Slackware 34 12-23-2007 06:13 AM
PkgBuild-0.9 is released with new features. gnashley Slackware 6 06-26-2006 12:36 PM
mandrake10.1 after upgrade kde3.3&gnome2.8 simple loginwith no choice & no desktop msalimane Mandriva 3 11-22-2004 08:27 PM


All times are GMT -5. The time now is 11:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration