LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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-26-2005, 03:00 PM   #1
mrchaos
Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware current, Fedora Core 5, SuSE 10.1 OSS
Posts: 298

Rep: Reputation: 30
building a slack package?


can someone teach me how to compile a slack package from a binary source file? I've found that programs are easier to maintain and remove if they are in the *tgz slack form. Don't be afraid to use coding language, I know a little programming. Thanks!
 
Old 06-26-2005, 03:16 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,962
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
http://www.slackware.com/book/index....rce=x4132.html

[eidt]
OK - that was a bit curt :)
Have a look at the diverse build-scripts in any
of slacks source-packages.

Or, if that's all too much hassle, use checkinstall.
[/edit]


Last edited by Tinkster; 06-26-2005 at 03:27 PM.
 
Old 06-26-2005, 07:28 PM   #3
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
http://www.linuxpackages.net/howto.p...=Package+Howto

http://www.linuxpackages.net/howto.p...erfect+Package

and like tinkster said, really the best way to learn this is to read the actual slackware build scripts... you can find the ones for 10.1 here:

ftp://ftp.slackware.com/pub/slackwar...e-10.1/source/

here's an example script, the one for XMMS:
Code:
#!/bin/sh
CWD=`pwd`

VERSION=1.2.10
ARTSPLUG=0.7.1
ARCH=${ARCH:-i486}
BUILD=${BUILD:-2}

PKG=/tmp/package-xmms
rm -rf $PKG
mkdir -p $PKG

cd /tmp
rm -rf xmms-$VERSION
tar xjvf $CWD/xmms-$VERSION.tar.bz2
cd xmms-$VERSION
chown -R root:root .
find . -perm 664 -exec chmod 644 {} \;
find . -perm 600 -exec chmod 644 {} \;
find . -perm 444 -exec chmod 644 {} \;
find . -perm 400 -exec chmod 644 {} \;
find . -perm 440 -exec chmod 644 {} \;
find . -perm 777 -exec chmod 755 {} \;
find . -perm 775 -exec chmod 755 {} \;
find . -perm 511 -exec chmod 755 {} \;
find . -perm 711 -exec chmod 755 {} \;
find . -perm 555 -exec chmod 755 {} \;
CFLAGS=-O2 \
CXXFLAGS=-O2 \
  ./configure \
  --prefix=/usr \
  --localstatedir=/var/lib \
  --disable-static \
  --enable-simd \
  --with-ipv6 \
  $ARCH-slackware-linux
make -j3
# This needs to go to the system so the arts plugin can build:
make install
# Next, install to $PKG:
make install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/xmms-$VERSION
cp -a ABOUT-NLS AUTHORS COPYING FAQ INSTALL NEWS README TODO \
  $PKG/usr/doc/xmms-$VERSION

# Install the arts plugin:
cd /tmp
rm -rf arts_output-$ARTSPLUG
tar xzf $CWD/arts_output-${ARTSPLUG}.tar.gz
cd arts_output-$ARTSPLUG
chown -R root:root .
find . -perm 664 -exec chmod 644 {} \;
find . -perm 600 -exec chmod 644 {} \;
find . -perm 444 -exec chmod 644 {} \;
find . -perm 400 -exec chmod 644 {} \;
find . -perm 440 -exec chmod 644 {} \;
find . -perm 777 -exec chmod 755 {} \;
find . -perm 775 -exec chmod 755 {} \;
find . -perm 511 -exec chmod 755 {} \;
find . -perm 711 -exec chmod 755 {} \;
find . -perm 555 -exec chmod 755 {} \;
CFLAGS=-O2 \
CXXFLAGS=-O2 \
./configure \
  --prefix=/usr \
  $ARCH-slackware-linux
  make -j3
  make install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/xmms-$VERSION/arts_output-$ARTSPLUG
cp -a \
  AUTHORS COPYING INSTALL NEWS README \
  $PKG/usr/doc/xmms-$VERSION/arts_output-$ARTSPLUG

# Finish up...
chown -R root.bin $PKG/usr/bin
gzip -9 $PKG/usr/man/*/*
( cd $PKG
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
makepkg -l y -c n /tmp/xmms-$VERSION-$ARCH-$BUILD.tgz
you can find the files needed in the source/xap/xmms directory (you need to have all the needed files in the same directory as the script when you execute it):

ftp://ftp.slackware.com/pub/slackwar...urce/xap/xmms/

have fun...


PS: slackware build scripts are meant to be run as root...
 
Old 06-26-2005, 08:57 PM   #4
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
checkinstall is the easiest way. I use it all the time.
 
Old 06-27-2005, 05:46 AM   #5
ingvildr
Member
 
Registered: Mar 2005
Location: England, South East
Distribution: Fedora
Posts: 358

Rep: Reputation: 30
checkinstall is a good tool, i've used it to install several xfce4 plugins, but if your really serious about slack and like learning i would suggest you try making your own scripts.
 
Old 06-27-2005, 08:56 AM   #6
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
i also use checkinstall, but only to register self compiled software in /var/log/packages
so they can be easily removed if needed.
if you use pkgtool to install a package made by checkinstall ,then things go wrong.
the buildscripit that creates the needed symlinks, makes them in the wrong place,
most of the time in the root dir.

if you want to build packages meant to be installed on other pc.'s it's best to write ( mostly edit existing ) buildscripts.
if you know a little about programming, that shouldn't be to hard.

egag
 
Old 06-27-2005, 01:47 PM   #7
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
Quote:
Originally posted by egag
if you use pkgtool to install a package made by checkinstall ,then things go wrong.
the buildscripit that creates the needed symlinks, makes them in the wrong place,
most of the time in the root dir.
Is this a systematic behaviour? If so, has anybody posted it to the checkinstall mailing list already?
It seems like an easy-to-fix bug to me, why not ask the author to correct it?
 
Old 06-27-2005, 03:31 PM   #8
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
honestly, from the posts i've seen here at LQ and other sites, i think it's fair to say that checkinstall has many issues that affect the final package's quality... i think that's just the nature of these kinda tools, they let you "easily" create a package - but there's a price to pay, and it seems the price is your package will never be as high quality as one that was made using a finely-tuned build script... anyone that is SERIOUS about making their own slackware packages should stay away from checkinstall IMHO...
 
Old 06-27-2005, 04:15 PM   #9
AxXium
Zenwalk Admin
 
Registered: May 2005
Location: Louisiana, U.S.A.
Distribution: Zenwalk Gnu/Linux
Posts: 258

Rep: Reputation: 31
Here is a very detailed guide.

33 pages !!!!

Amazing read

http://www.interlude.org.uk/unix/sla...on.pdf#search='how%20to%20build%20slackware%20packages'
 
1 members found this post helpful.
Old 06-27-2005, 04:39 PM   #10
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
mianve, i downloaded that PDF but the text i get is all a bunch of boxes and stuff... is it written in english?? do i need some special fonts or something to see that??
 
Old 06-27-2005, 04:43 PM   #11
AxXium
Zenwalk Admin
 
Registered: May 2005
Location: Louisiana, U.S.A.
Distribution: Zenwalk Gnu/Linux
Posts: 258

Rep: Reputation: 31
I'm at work on a windows box when I opened it. I have no idea why it doesn't work for you.

try this link

http://www.interlude.org.uk/unix/sla...esentation.pdf

if it still don't work, email me.

I will mail you back a text file

slackwarepkgs.txt
 
Old 06-27-2005, 04:48 PM   #12
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
seems like i have problems with it only if i open it with the gnome pdf viewer...

i just opened it using xpdf and it's displaying properly...

thanks man...
 
Old 06-27-2005, 04:50 PM   #13
AxXium
Zenwalk Admin
 
Registered: May 2005
Location: Louisiana, U.S.A.
Distribution: Zenwalk Gnu/Linux
Posts: 258

Rep: Reputation: 31
I opened it with firefox and it worked fine
 
Old 06-27-2005, 04:51 PM   #14
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
Originally posted by mianve
I opened it with firefox and it worked fine
with firefox?? i can use firefox to view PDFs??
 
Old 06-27-2005, 04:52 PM   #15
AxXium
Zenwalk Admin
 
Registered: May 2005
Location: Louisiana, U.S.A.
Distribution: Zenwalk Gnu/Linux
Posts: 258

Rep: Reputation: 31
I do everyday!!
 
  


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
Error in building glibc2.3.2---using lfs-package-5.0 oldmanpushcar Linux From Scratch 0 04-19-2005 08:55 AM
package building dockpunk Slackware 10 03-23-2005 09:46 AM
building rpm package question hct224 Linux - Newbie 2 09-02-2004 05:41 AM
Building a nagios package. Linux.tar.gz Slackware 3 07-02-2004 11:51 AM
Building own RPM package hems Linux - Newbie 1 11-28-2002 03:16 AM


All times are GMT -5. The time now is 10:39 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