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.
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?
'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.
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.