LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 12-29-2009, 12:52 PM   #1
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,845

Rep: Reputation: 452Reputation: 452Reputation: 452Reputation: 452Reputation: 452
Torcs and make pkg


I have Torcs (a racing game) installed. Its an older version, but the grandkids like it pretty well. What I want to do is make a package for future use in case I bork this install.

What I don't know is that the install runs twice. Once for make install and another for make datainstall. Are these separate, or can it be included in one package?
 
Old 12-29-2009, 01:00 PM   #2
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
There is a slackbuild for torcs on slackbuilds.org, this will be able to build you a package.

samac
 
Old 12-29-2009, 01:02 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
In case you didn't notice already, there is a slackbuild for Torcs available on http://slackbuilds.org.

[EDIT] Two minutes too late, sorry.

Last edited by Didier Spaier; 12-29-2009 at 01:04 PM.
 
Old 12-29-2009, 03:08 PM   #4
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
'make' accepts multiple rules, so you can do this:
make install datainstall
to do it all at once.
 
Old 12-30-2009, 01:04 AM   #5
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,845

Original Poster
Rep: Reputation: 452Reputation: 452Reputation: 452Reputation: 452Reputation: 452
Quote:
Originally Posted by gnashley View Post
'make' accepts multiple rules, so you can do this:
make install datainstall
to do it all at once.
But does makepkg accept multiple rules?

The reason I'm asking this is because I had to patch this thing twelve ways to Sunday to get it to compile on Slackware64. I also had to edit a bunch of the .cpp files using a newer version's files. I can't remember how I did this, so if I can make a package, I'll have it forever.

I know about the slackbuild, but its for a newer version than the one I have. The slackbuild could be modified, but I need all those patches and edits, which are not present in the original tarball.

Last edited by mlangdn; 12-30-2009 at 01:17 AM. Reason: More info.
 
Old 12-30-2009, 04:56 AM   #6
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Makepkg doesn't need multiple rules -it simply makes a package of whatever content you have in that directory. When you run make install(plus whatever) or mnanually place files in that package tree, then everythig there gets packaged.

"I can't remember how I did this" is the very best reason for using *some* kind of build script, so you can always go back and repeat the build, or do a slight edit to change the version or correct some mistake in the package. Ahving the package forever doesn't mean it will work forever. If you keep no record of how/what you did, then later you will surely have to discover all the steps from scratch.
 
Old 12-30-2009, 12:03 PM   #7
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,845

Original Poster
Rep: Reputation: 452Reputation: 452Reputation: 452Reputation: 452Reputation: 452
That didn't work - all it packaged was the src and data directories. Its not important anyway.
I reckon I need to learn some scripting.
 
Old 12-30-2009, 02:00 PM   #8
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Sounds like you are trying to make a package from the sources themselves. Sources must be compiled first. Use the SlackBuild to compile and package them, or some tool like src2pkg.
 
Old 12-31-2009, 01:21 AM   #9
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,845

Original Poster
Rep: Reputation: 452Reputation: 452Reputation: 452Reputation: 452Reputation: 452
No - this folder is the one I originally compiled and installed torcs from.
 
Old 12-31-2009, 01:59 AM   #10
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,845

Original Poster
Rep: Reputation: 452Reputation: 452Reputation: 452Reputation: 452Reputation: 452
It finally dawned on my feeble brain what was going on. There is no way to make a package from that folder. So I took the easy way out. I copied from my system all the torcs directories and files and placed them into a proper directory tree laid out in my home directory. Then I ran makepkg and I believe I now have what I want. But it will have to wait until morning. I just got home from work and sleep beckons.
 
Old 12-31-2009, 10:47 AM   #11
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,845

Original Poster
Rep: Reputation: 452Reputation: 452Reputation: 452Reputation: 452Reputation: 452
Well, I can claim a bit of success, sort of. The package was made just fine. However, something was wrong with my directory tree. I created a folder called torcs first. Inside torcs I created /usr. Inside /usr I created /bin, /lib64, and /share. Inside /share, I created /games. After that, I copied into the respective folders all the system files and folders for torcs. From inside the /torcs folder, I then ran:

Code:
makepkg -l y -c n /tmp/torcs-1.3.0_mfl.txz
The package build was successful. However, it dropped the /usr folder from the package. I didn't know that until I installed it on another SW64 testing partition. Using mc, I opened up the package to see where it all went. I then moved the stuff into the right places and the game started just fine. So my roundabout way worked somewhat. I just have to learn to get it right.
 
Old 12-31-2009, 01:09 PM   #12
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Usually, you'd do something like this (from the sources):
make DESTDIR=/tmp/mypkg install
then cd into /tmp/mypkg and run makepkg from there -you'll want to create that directory before running the install command.
 
  


Reply



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
[SOLVED] error creating RPM [make binrpm-pkg] scmbg Linux - Kernel 2 11-02-2008 08:32 PM
pkg-config - how do I make a .pc file? needlern32724 Linux - Software 2 07-19-2006 10:33 AM
Can't play Torcs Hungry ghost Linux - Games 8 02-21-2006 10:21 AM
kernel: make deb-pkg coax1984 Linux - Software 0 10-27-2004 08:08 AM
help installing torcs?? genghis Linux - Software 0 01-19-2004 05:58 PM

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

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