VectorLinux
July 23, 2014, 01:31:00 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: 1 [2]
  Print  
Author Topic: First (no-)go at packaging (solved).  (Read 7505 times)
Triarius Fidelis
Vecteloper
Vectorian
****
Posts: 2399


Domine, exaudi vocem meam


WWW
« Reply #15 on: September 05, 2007, 05:47:28 am »

The Makefile appears to create directories in /var. Did my 'find' method yield anything?
Logged

"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months
nightflier
Administrator
Vectorian
*****
Posts: 4018



« Reply #16 on: September 05, 2007, 09:18:29 am »

No, nothing found.
Logged
easuter
Global Moderator
Vectorian
*****
Posts: 2160



« Reply #17 on: September 05, 2007, 10:49:37 am »

nightflier, I've made a simple patch for the gnump3d makefile that will allow you to use the DESTDIR variable correctly.

http://vectorlinux.osuosl.org/easuter/gnump3d_destdir_patch.diff

Download that and then in a terminal, cd into the gnump3d source directory.
Then patch the Makefile with this command:

Code:
patch -Np0 -i /path/to/where/you/saved/gnump3d_destdir_patch.diff

Instead of doing "make install", do "make DESTDIR=/tmp/package-gnump3d install"
After that all the files that would have been installed into "/" will be in /tmp/package-gnump3d. It also appears to create the log directories correctly.
Logged

uelsk8s
Administrator
Vectorian
*****
Posts: 2504



« Reply #18 on: September 05, 2007, 11:00:44 am »

what does "make dist" create with that source?
Logged
exeterdad
Packager
Vectorian
****
Posts: 2046



« Reply #19 on: September 05, 2007, 11:01:02 am »

Quote
-ln -sf $(DESTDIR)${BINDIR}/gnump3d2 $(DESTDIR)${BINDIR}/gnump3d

easuter: When this link is created, won't it point to
Quote
tmp/package-gnump3d/gnump3d2
Permanately?

Would replacing that line with
Quote
HERE=`pwd`
 cd ${DESTDIR}${BINDIR}
 -ln -sf gnump3d2 gnump3d
 cd $HERE
Work correctly?  I could be wrong, I haven't actually run the makefile.
Logged
easuter
Global Moderator
Vectorian
*****
Posts: 2160



« Reply #20 on: September 05, 2007, 02:03:40 pm »

Quote
-ln -sf $(DESTDIR)${BINDIR}/gnump3d2 $(DESTDIR)${BINDIR}/gnump3d

easuter: When this link is created, won't it point to
Quote
tmp/package-gnump3d/gnump3d2
Permanately?

Would replacing that line with
Quote
HERE=`pwd`
 cd ${DESTDIR}${BINDIR}
 -ln -sf gnump3d2 gnump3d
 cd $HERE
Work correctly?  I could be wrong, I haven't actually run the makefile.

Yeah, thats correct  Embarrassed
Thanks for catching it!

Logged

nightflier
Administrator
Vectorian
*****
Posts: 4018



« Reply #21 on: September 05, 2007, 05:46:13 pm »

Wow, amazing participation and support    Grin

Anyways, got some errors trying to apply the patch. Since there were some more adjustments needed, I looked in the diff file and manually copied/pasted the changes. Had to change $HERE to $(HERE) before it would make. This time it did create the /var directories.

However, now the /install directory is missing. I would have been really surprised if I didn't manage to mess up something along the way. Roll Eyes
Logged
exeterdad
Packager
Vectorian
****
Posts: 2046



« Reply #22 on: September 05, 2007, 07:05:01 pm »

Quote
Had to change $HERE to $(HERE)
*smacks head*  I should of known that!  Nice job working that out.
Quote
However, now the /install directory is missing.
I would say it's unlikely the patch had anything to do with that.  Not sure how your packaging this (scripting, or vpackager, etc) but when I script I create the directory
Quote
mkdir -p $PKG/install
before requiredbuilder and makepkg are run.

It cracks me up you used $HERE, in fact if I knew you were actually going to use it I would of named it something a bit more traditional.  Cheesy  Oh well, whatever works.
Logged
nightflier
Administrator
Vectorian
*****
Posts: 4018



« Reply #23 on: September 06, 2007, 04:10:18 am »

Got it. checkinstall creates the /install dir and contents.

This simple little experiment turned out to be a great learning experience. I gained some understanding of the packaging structure. I learned workarounds and how to modify an existing package. I found that there are a lot of tools available and solutions to most problems. And most importantly: a wonderful forum with helpful people is one of the greatest assets of Vector Linux.

The re-writing of makeinstall appears to be an interesting challenge to the more advanced programmers, but it is beyond my current coding capabilities. I will be happy to test out further suggestions, but I'm marking my original question as solved.

Happy Hacking!  Cheesy
Logged
exeterdad
Packager
Vectorian
****
Posts: 2046



« Reply #24 on: September 06, 2007, 04:27:28 am »

Define solved?  Is the package created?  If not, I'd be happy to attempt to create a script and submit it to you to build. We all have our own ways of attacking the packages.  I for one enjoy looking at other peoples methods.  There is always something to learn.
Logged
nightflier
Administrator
Vectorian
*****
Posts: 4018



« Reply #25 on: September 06, 2007, 05:31:36 am »

Solved as in I got the package created using the steps outlined in my fourth post of this thread, thanks to easuter's reference to an intermediate directory and makepkg. I just used more steps than with the DESTDIR method.

I forgot to put (solved) in the title, but my fifth post was intended to express my satisfaction.

When the thread continued with "let's figure out why DESTDIR didn't work and how to fix that", I was happy to let the creative exchange continue and contribute what I could by being the tester. I know from personal experience, once a question enters my mind, it is hard to rest until I figure it out. As you said, there is always something to learn.
Logged
exeterdad
Packager
Vectorian
****
Posts: 2046



« Reply #26 on: September 06, 2007, 06:03:59 am »

Okee Dokee!  As long as we had fun  Smiley
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!