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 12-22-2005, 08:33 AM   #1
kaon
Member
 
Registered: Dec 2003
Location: Hong Kong SAR
Distribution: Slackware 9.1, 10.x, slackware-current
Posts: 186

Rep: Reputation: 30
SlackBuild guildline


Hi all,

Have been searching for a while on this topic. Did look at some scripts in slackware source folder, and still cannot come up with a full image. Therefore anyone could provide us a guideline for making a slackbuild script that complies with Pat's rule?

So far I have discovered:
1) Create tmp folder named 'package-{software name}' under /tmp
2) extract the source to that folder
3) configure with options (what options other than --prefix=/usr?)
4) make
5) make install (?!)
6) change permission to 755/644/600 (another uncertainy)
7) makepkg


Thanks.
 
Old 12-22-2005, 09:15 AM   #2
MMYoung
Member
 
Registered: Apr 2004
Location: Arkansas
Distribution: Ubuntu 8.10
Posts: 365

Rep: Reputation: 30
Quote:
Originally Posted by kaon
3) configure with options (what options other than --prefix=/usr?)
I use my own build scripts for individual packages just cause it's easier for me to keep my "stuff" seperated. Having said that I always add --sysconfdir=/etc --localstatedir=/var/lib along with --prefix=/usr.
Quote:
Originally Posted by kaon
5) make install (?!)
Be sure and use the make install DESTDIR=/directory directive so that the souce isn't actually "installed" on your system, but rather "installed" to a directory of your choice for package building. For example I use /work/builds.
Quote:
Originally Posted by kaon
6) change permission to 755/644/600 (another uncertainy)
After I run make in my script I added the following to make sure my permissions are set correctly:
chown -R root.root .
find . -perm 777 -exec chmod 755 {} \;
find . -perm 555 -exec chmod 755 {} \;
find . -perm 444 -exec chmod 644 {} \;
find . -perm 666 -exec chmod 644 {} \;
find . -perm 664 -exec chmod 644 {} \;
This is run from the just compiled source directory, VERY IMPORTANT!

Then after make install DESTDIR=/directoryname, I cd over to the install directory and exectue the following to make sure any bin files have the proper ownership:
chown root.bin ${BUILD}usr/bin/*
chown root.bin ${BUILD}usr/sbin/*
chown root.bin ${BUILD}bin/*
chown root.bin ${BUILD}sbin/*
chown root.bin ${BUILD}usr/X11R6/bin/*

I also strip the binaries and zip the manpages:
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
find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip --strip-debug 2> /dev/null
bzip2 -9q ${BUILD}usr/man/*/*
bzip2 -9q ${BUILD}usr/info/*
Quote:
Originally Posted by kaon
7) makepkg
makepkg -l y -p -c n ${FILE}-${VER}-${ARCH}-${REV}.tgz
md5sum ${FILE}-${VER}-${ARCH}-${REV}.tgz > ${FILE}-${VER}-${ARCH}-${REV}.tgz.md5

All variables, ${BUILD}, ${FILE}, etc, are assigned by the script.

HTH, MMYoung

Last edited by MMYoung; 12-22-2005 at 09:30 AM.
 
Old 12-22-2005, 09:18 AM   #3
Vampirite
Member
 
Registered: Apr 2005
Location: England
Distribution: Arch Linux
Posts: 223

Rep: Reputation: 30
I've read somewhere that you need to use "make install DESTDIR=whereeveryouwant" which puts the files in a directory where you can run "makepkg" in to create the package. I basically use this.

--Kourosh
 
Old 12-22-2005, 10:52 AM   #4
dunric
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 411

Rep: Reputation: 39
Quote:
Therefore anyone could provide us a guideline for making a slackbuild script that complies with Pat's rule?
What prevents you to look into Pat's slackbuild scipts in Slackware's source repository ?
Some introduction to the issue can be found in FOSDEM presentation document in PDF or plaintext format.

It's very easy to create some template of generic SlackBuild scipt and tweak it to the concrete software whenever required.
Good security practice is to build all packages in fakerooted environment.
Tracking newer versions and/or security patches is the only annoyance.

Last edited by dunric; 12-22-2005 at 10:55 AM.
 
  


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
a generic SlackBuild shilo Slackware 46 06-19-2008 11:45 PM
GNOME.SlackBuild jmdlcar Slackware 1 06-03-2005 04:52 PM
KDE.SlackBuild spaceballs Slackware 8 04-01-2005 08:42 AM
SlackBuild system thegeekster Slackware 7 06-01-2004 06:59 PM
.SlackBuild optimize compile, need help chemtraX Slackware 4 05-27-2004 04:09 PM


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