BSD DevCenter

oreilly.comSafari Books Online.Conferences.

We've expanded our LAMP news coverage and improved our search! Search for all things LAMP across O'Reilly!

Search
Search Tips

advertisement

Listen Print Discuss Subscribe to BSD Subscribe to Newsletters

Building Binary PC-BSD Packages
Pages: 1, 2, 3, 4, 5

When finished, make the script executable:



# chmod +x ~dru/pbi/lib.sh

As this script takes an executable as an argument, find out the names of your package's executables:

# pwd
/home/dru/pbi/digikam/bin
# file * | grep LSB
dcraw:  ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for 
    FreeBSD 5.3-CURRENT (rev 5), dynamically linked (uses shared libs), 
    stripped
digikam: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for 
     FreeBSD 5.3-CURRENT (rev 5), dynamically linked (uses shared libs), 
    stripped
<snip 36 other executables)>

This particular package has 38 executables, so you need to run lib.sh that many times. Note that lib.sh makes a script that copies the libraries needed by that executable. As you create each script, run it and then remove it:

# ~dru/pbi/lib.sh dcraw
Run the script dcraw_lib.sh to copy the required libraries
# ./dcraw_lib.sh && rm dcraw_lib.sh

# ~dru/pbi/lib.sh digikam
Run the script dcraw_lib.sh to copy the required libraries
# ./digikam_lib.sh && rm digikam_lib.sh

<snip other 36 iterations>

When you finish, you'll have a populated lib/ directory:

# ls lib | wc
    79   79   1055

Looks like there are 79 libraries.

Next, double-check whether your package has any lib/ subdirectories:

# ls -F ~dru/pbi/digikam/lib | grep "/"
gphoto2/
gphoto2_port/
imlib2/
kde3/

If there are any, create those subdirectories in your bin/lib/ and copy the appropriate library files over:

# pwd
/home/dru/pbi/digikam/bin/lib
# mkdir gphoto2 gphoto2_port imlib2 kde3
# cp -R ~dru/pbi/digikam/lib/gphoto2/* gphoto2
# cp -R ~dru/pbi/digikam/lib/gphoto2_port/* gphoto2_port
# cp -R ~dru/pbi/digikam/lib/imlib2/* imlib2
# cp -R ~dru/pbi/digikam/lib/kde3/* kde3

Step 5: Look for an Icon and Cleanup bin/

Adding an icon to your PBI is nice. Check whether one came with your package:

# grep -w icons ../+CONTENTS
share/apps/digikam/icons/hicolor/32x32/actions/addimagefolder.png
<snip large output>

This package definitely came with many icons, and this is the one I'm looking for:

# cp ../share/icons/crystalsvg/128x128/apps/digikam.png .

If your package doesn't have any icons, choose your favorite from a subdirectory of /usr/local/share/icons/crystalsvg/128x128/ and copy it to bin/.

When you finish, uninstall the package and its dependencies so they won't interfere when you test the PBI:

# pkg_delete -rx digikam

Finally, double-check bin/ to ensure that it contains only the tarball, the install and uninstall scripts, the binaries, and the lib/ directory.

Pages: 1, 2, 3, 4, 5

Next Pagearrow




Sponsored Resources

  • Inside Lightroom
Advertisement

Sponsored by:

O'Reilly Media

©2009, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Academic Solutions
Authors
Contacts
Customer Service
Jobs
Newsletters
O'Reilly Labs
Press Room
Privacy Policy
RSS Feeds
Terms of Service
User Groups
Writing for O'Reilly
Content Archive
Business Technology
Computer Technology
Google
Microsoft
Mobile
Network
Operating System
Digital Photography
Programming
Software
Web
Web Design
More O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
O'Reilly FYI
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com

Partner Sites
InsideRIA
java.net
O'Reilly Insights on Forbes.com