LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-16-2007, 09:58 AM   #76
jowa45
Member
 
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&12
Posts: 94

Rep: Reputation: 15

Hi,
But i have a working avr-gcc on the computer that I am trying to make packages with.

John
 
Old 05-16-2007, 10:07 AM   #77
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,014

Rep: Reputation: 115Reputation: 115
Hmmm, try setting the CC enviroment variable to gcc-avr. Let me snatch the tarballs to see if I can do more...

I still recommend reading the LFS documentation, more specifically, the Cross LFS docs.

Last edited by tuxdev; 05-16-2007 at 10:11 AM.
 
Old 05-16-2007, 10:19 AM   #78
jowa45
Member
 
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&12
Posts: 94

Rep: Reputation: 15
Tarballs are here :-

http://www.nongnu.org/avr-libc/

Where are Cross LFS docs?

No computing tomorrow its a holiday here in Sweden.
 
Old 05-16-2007, 10:35 AM   #79
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,014

Rep: Reputation: 115Reputation: 115
http://trac.cross-lfs.org/
 
Old 05-16-2007, 12:11 PM   #80
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Original Poster
Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
You could put this in the script just before configure_source:

PATH=/opt/gcc-avr/bin:$PATH
or
CC=/opt/gcc-avr/bin/gcc-avr:$PATH
(adjust for your system.

When cross-building, usually you'll build your new library first and then compile and link binutils to the new libs. Then you compile the new comiler with the new binutils also linking against the new libs.
You'll need to modify the scripts some and perhaps use a 'group-build' to script the whole thing -that just usually just means a simple loop which builds each package and installs it as you go by setting the -I option.
I build a group of 20-30 GNOME packages using one or more scripts like this:
Code:
#!/bin/bash
CWD=`pwd`

# for dir in `ls $CWD` ; do

TRANSIENT_OPTIONS="-V -I -W"

BUILD_LIST="libidl atk"

for dir in $BUILD_LIST ; do
	cd $CWD
	if [[ -d $dir ]] ; then
	 cd $dir
	 TARBALL=`ls`
	 # echo hello from $dir
	 echo "Running src2pkg $TRANSIENT_OPTIONS for $TARBALL"
	 export PKG_DEST_DIR="$CWD/$dir"
	 # REALLY_INSTALL="YES"
	 src2pkg $TRANSIENT_OPTIONS $TARBALL 
	 if [[ `ls $PKG_DEST_DIR/*.tgz |grep "i486"` != "" ]] ; then
	  echo "Installing package..."
	  installpkg $CWD/$dir/*.tgz
	 else
	  echo "Where's the beef?"
	 fi
	 unset PKG_DEST_DIR
	fi

done
 
Old 05-22-2007, 11:52 AM   #81
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Original Poster
Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
News!! The new version of src2pkg-1.1 is out and includes some new features.
Get the latest package here:

http://distro.ibiblio.org/pub/linux/...nload/src2pkg/

This new version includes:
- a routine for automatically downloading an archive if not already on your system. Example:
'src2pkg http://distro.ibiblio.org/pub/linux/distributions/amigolinux/examples/di-3.11/di-3.11.tar.bz2'
- a routine for auto-applying patch and diff files
- support for s390 and x86_64 architecures
- added support for x86_64 to src2pkg build script
- better document search and allows packages with no docs
- updated code for compatibility with BASH-3.2
- support for updating and/or executing existing src2pkg or PkgBuild scripts -allows you to control src2pkg user options from command line while still using a script:
src2pkg -U -X oldstyle.PkgBuild
'src2pkg -X' will search the current directory and run the first
.src2pkg, .src2pkg.auto, .PkgBuild or .PkgBuild.auto script found.
 
Old 05-22-2007, 12:08 PM   #82
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
How does it auto-apply patches and difs? Does it search in slackware mirror according to the Slack and package version or you need to show what to apply?
 
Old 05-22-2007, 12:28 PM   #83
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Original Poster
Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
This code is still rudimentary -it searches for patches or diffs in the CWD (current working directory) or in a subdirectory called patches and applies them in sort order.
They can be be either uncompressed .diff or .patch files or compressed patches with gzip or bzip2. Application order can be controlled by renaming files.
Patches are applied using the -p1 option which is the most common. Otherwise, you'll need to write code to apply patches.

You could pretty easily insert code into a .src2pkg script which would also download any need patches -I've been thinking about some solutions for handling multiple-source builds.
 
Old 05-23-2007, 09:03 AM   #84
jowa45
Member
 
Registered: Apr 2007
Location: Stockholm, Sweden
Distribution: Slackware11&12
Posts: 94

Rep: Reputation: 15
Hi,
Will try new version next time.

As far as my little project goes I can now install the toolchain on a minimal installation (only a, e & make from d)by installing the packages that I made for binutils and avr-gcc and then a source code installation of the avrlibc. Works as above because it calls avr-gcc not gcc. Then I can install the programmer package. Total installed size around 200K.

Will be pushing on with the script and packaging though but my current endeavor is to get Slackware 11 into some ancient laptops and then install the toolchain.

I was vaguely wondering how src2pkg compared with the alternatives which come in the Slackware distribution like makepkg and slacktrack.

John
 
Old 05-23-2007, 10:04 AM   #85
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Original Poster
Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
makepkg is used to create packages from content you already created, usually by running a .SlackBuild script. slacktrack uses a spec file to replace the SlackBuild and also run makepkg to create the final package.

src2pkg can also use a spec file (.src2pkg or .PkgBuild) to create simple or complicated packages from a wide variety of content types, or it can do so from the command line.

What really sets src2pkg apart from other package creators is the way it automatically figures out (usually) what to do without much help. It also does some pretty thorough correction of common problems, both in the sources and package. And it will write its' own script for you, in case you need to make any changes not available as options.

You really can't get much easier than this: Say you know of a program you want and you have the URL to the source tarball. Just give that to src2pkg (while connected to internet) and it will do the whole bit, downloading the tarball, compiling and creating the package.
src2pkg URL_ADDRESS

src2pkg works with all these build systems automatically:
- simple Makefile
- autoconf (.configure, make, make install) runs autogen.sh or repairs
faulty config files when necessary
- GNUmakefile
- makefile
- Imakefile
- scons build system
- jam build system
- noarch or customized content creation are easy
- handles installations of sources or binaries which use a .run file or install.sh (like flash_player or Opera, etc) or other install script.
- converts binary .rpm or .deb packages to sane Slackware standards.
- converts other installable binary content to sane Slackware content.
It handles the following source archive suffixes:
.tgz, .tar.gz, .tbz, .tar.bz2, .rpm, .deb;
 
Old 05-30-2007, 12:47 AM   #86
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
OK, admittedly I haven't re-read the latest posts in this thread, and I'm going to bed after I type this.
I just had to stop in and say THANK YOU to Gnashley for 'src2pkg' which I finally got around to trying out earlier today, and was impressed such that I spent much of the day building ALL of the non-Slackware packages I have here in my system. It works great
I did have to/want to tweak a few Makefiles here and there (for reason indicated below) but all in all, happiness reigned (rained? which is it supposed to be?) ahem-- 'RAINED' across the land!

So, two points/questions:
1 - can multiple 'make' statements be applied? Sometimes ONE -m='make' and ONE -i='install' were not enough.
2 - Sometime after downloading src2pkg the first time, I couldn't find it on my system, so I went looking for the website. The site, or the tool (I can't now remember which) were nowhere to be found. Incase there's a new release, I am interested, so just wanted to be sure the program is still available, and that I know where to go looking.
Thanks again

~Sasha

EDIT - Upon post/refresh I see website and new-release info above, in this very page! I'll check into it tomorrow.
PS - Know what's funny?? When I first started with it today, I rebuilt my first package over and over about a dozen times before I realized that the hell was wrong -- that the SLACK-DESC file did not belong INSIDE the archive, as I had been putting it! Silly me...

Last edited by GrapefruiTgirl; 05-30-2007 at 12:51 AM.
 
Old 05-30-2007, 03:53 AM   #87
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Original Poster
Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
Thanks -happiness reigns(rules).
Yes, you can use multiple Makefile rules in one statement:
-m='make depend all'
-i='make install install_data'

Once you see how it works and have some confidence with it, it's pretty easy to produce packages quickly, when there aren't too many special steps required. I've produced as many as 30 in one day -still taking my time to check them well.

I'm going to be uploading a new release in the next few days with improvements in the control of the auto-patching feature. Also, you will now be able to have a script which will download multiple source files and build them. The main thing I'm working on is getting some new documentation in the package. The new version will also be using the latest version of the installwatch libs.
 
Old 06-11-2007, 07:47 AM   #88
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Original Poster
Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
Please note that src2pkg has moved to:
http://distro.ibiblio.org/pub/linux/...nload/src2pkg/

I've started a new thread to provide more up-to-date support for new versions of src2pkg. Please make any further posts to this thread:
http://www.linuxquestions.org/questi...76#post2783176
 
  


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
smart package manager bad magic cpio error matticus Suse/Novell 5 04-10-2012 11:41 AM
Using Partition Magic and Boot Magic to install Linux zathrus MEPIS 4 01-14-2006 09:24 PM
Partition Magic/Boot magic and Slackware. adam1835 Linux - Newbie 5 01-11-2006 12:46 PM
Can't get Age of Empires II: Age of Kings started (I've could it before !!!) vegetassj2 Linux - Games 44 08-28-2005 05:59 PM
Java does "age" or "Age" matter when declaring an Int?? Laptop2250 Programming 3 10-13-2003 01:34 PM


All times are GMT -5. The time now is 02:53 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration