LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
  Search this Thread
Old 06-13-2008, 09:39 AM   #1
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Rep: Reputation: 33
Question Description not appearing in packages


Hi all,
Lately i began making my own SlackBuild scripts and slack-desc files. I have followed the ruler and tweaked the slackbuild script so that they suit my environment. However, every time i install a package i created the package description is blank. I cannot figure out what i am doing wrong.

Here is an example SlackBuild
Code:
#!/bin/sh
# Aircrack-ng beta2 Slackbuild
# SlackBuild by RDW on May 23 2008

# Declare program variables
PRGM=aircrack-ng
VERSION=1.0-beta2
BUILD=${BUILD:-1}
ARCH=${ARCH:-i486}

# Declare location variables
CWD=$(pwd)
INSTALL=$CWD/$PRGM-$VERSION
PKG=$INSTALL/package-$PRGM
OUTPUT=/programs/packages

# Make sure everything can be compiled on different systems
if [ "$ARCH" = "i486" ]; then
   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
   SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fPIC"
fi 

# Out with the old, in with the new
rm -rf $PKG $INSTALL
mkdir -p $PKG $INSTALL
rm -rf $INSTALL/$PRGM-$VERSION

# Extraction
cd $INSTALL || exit 1
tar -zxf $CWD/$PRGM-$VERSION.tar.gz  || exit 1
cd $PRGM-$VERSION || exit 1

# Compilation
make --silent

make install-strip DESTDIR=$PKG

# Move all the documentation to one directory
mkdir -p $PKG/usr/doc/$PRGM-$VERSION
mkdir -p $PKG/install
cp -a AUTHORS INSTALLING LICENSE Changelog README VERSION $PKG/usr/doc/$PRGM-$VERSION
cat $CWD/$PRGM.SlackBuild > $PKG/usr/doc/$PRGM-$VERSION/$PRGM.SlackBuild
cat $CWD/slack-desc > $PKG/install/slack-desc

# Make the package
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGM-$VERSION-$ARCH-$BUILD.tgz

# Move everything to a nice folder

mv $CWD/$PRGM-$VERSION.tar.gz $INSTALL
mv $CWD/slack-desc $INSTALL
mv $CWD/$PRGM.SlackBuild $INSTALL
And the corresponding slack-desc
Code:
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in.  You must make
# exactly 11 lines for the formatting to be correct.  It's also customary to
# leave one space after the ':'.

           |-----handy-ruler------------------------------------------------------|
aircrack-ng: Aircrack-ng Wireless  utility
aircrack-ng:
aircrack-ng: Aircrack-ng is the next generation of wireless network packet  
aircrack-ng: sniffers that is able to use packets collected to decrypt the WEP, 
aircrack-ng: WPA and WPA2 keys for wireless networks.
aircrack-ng: 
aircrack-ng: 
aircrack-ng: 
aircrack-ng: Packaged by RDW 
aircrack-ng: www.aircrack-ng.org 
aircrack-ng:

any ideas?
 
Old 06-13-2008, 10:25 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
This is a shortcoming (or maybe quirk is more like it) in the Slackware package manager. Basically, pkgtools uses hyphens to parse the package file name for the various bits of information: package name, version, arch, and release; this can be a problem if the package file name has an unexpected hyphen.

Since you have a hyphen in the version number, pkgtools is taking the package name to be "aircrack-ng-1.0', while your slack-desc lists it as the correct "aircrack-ng". This conflict will prevent the description from displaying. I have no idea why it prevents the description from displaying, I just know that it does.

The easiest solution is to simply change the version string to "1.0beta2". Unfortunately, this is going to cause an error since the tarball for Aircrack is not going to match. To rectify this (assuming you have only one tarball and build directory for Aircrack) you can simply supplement the version string for a wildcard in the lines which will extract the tarball.

So in other words:

Code:
tar -zxf $CWD/$PRGM-*.tar.gz  || exit 1
cd $PRGM-* || exit 1
This will cause the Slackbuild to extract any aircrack-* tarball it finds, and then cd into any aircrack-* directory it finds. The rest of the script will work out of this directory, so it doesn't need to be aware that the root directory is not technically correct.
 
Old 06-13-2008, 10:39 AM   #3
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Original Poster
Rep: Reputation: 33
So long story short, the slack-desc file has to have the same name as the package in order for it to display properly? I have also noticed this in other programs i have done that did not have hyphens in the last bit of the version.

Last edited by C-Sniper; 06-13-2008 at 10:41 AM.
 
Old 06-13-2008, 11:15 AM   #4
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Yes, the package name and the name in the slack-desc must match exactly.
 
Old 06-13-2008, 11:46 AM   #5
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Original Poster
Rep: Reputation: 33
Ok, Thank you very much.
Cheers!
 
Old 06-13-2008, 12:00 PM   #6
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
For the times when you have a "-" in the VERSION string, do this:

Code:
makepkg -c n -l y /tmp/$PRGNAM-$(echo $VERSION | tr - _)-$ARCH-$BUILD.tgz
 
Old 06-13-2008, 02:04 PM   #7
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Original Poster
Rep: Reputation: 33
That will come in handy, Thanks Robby.
 
Old 06-14-2008, 01:58 AM   #8
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
You also need a '#' mark on the handy ruler line.
 
Old 06-14-2008, 12:13 PM   #9
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by gnashley
You also need a '#' mark on the handy ruler line.
...no, you don't...take a look at the official SlackBuilds and you'll see there is no # in front of the handy ruler line. For example, elvis' slack-desc file.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail description samd Linux - Software 4 07-09-2005 11:05 PM
Package Description hus Linux - Software 6 05-16-2005 12:59 PM
logrotate description pharmhand02 Linux - Software 5 08-02-2004 09:18 AM
checkinstall description. e1000 Slackware 1 10-22-2003 12:48 AM
TripWire, need brief description Robert0380 Linux - Security 2 01-13-2003 09:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:28 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration