SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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.
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.
...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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.