VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Pages: 1 [2]

Author Topic: First (no-)go at packaging (solved).  (Read 8689 times)

Triarius Fidelis

  • Vecteloper
  • Vectorian
  • ****
  • Posts: 2399
  • Domine, exaudi vocem meam
    • my website
Re: First (no-)go at packaging.
« Reply #15 on: September 05, 2007, 06: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: 4085
Re: First (no-)go at packaging.
« Reply #16 on: September 05, 2007, 10:18:29 am »

No, nothing found.
Logged

easuter

  • Global Moderator
  • Vectorian
  • *****
  • Posts: 2160
Re: First (no-)go at packaging.
« Reply #17 on: September 05, 2007, 11: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: [Select]
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
Re: First (no-)go at packaging.
« Reply #18 on: September 05, 2007, 12:00:44 pm »

what does "make dist" create with that source?
Logged

exeterdad

  • Packager
  • Vectorian
  • ****
  • Posts: 2046
Re: First (no-)go at packaging.
« Reply #19 on: September 05, 2007, 12:01:02 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.
Logged

easuter

  • Global Moderator
  • Vectorian
  • *****
  • Posts: 2160
Re: First (no-)go at packaging.
« Reply #20 on: September 05, 2007, 03: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  :-[
Thanks for catching it!

Logged

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4085
Re: First (no-)go at packaging.
« Reply #21 on: September 05, 2007, 06:46:13 pm »

Wow, amazing participation and support    ;D

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. ::)
Logged

exeterdad

  • Packager
  • Vectorian
  • ****
  • Posts: 2046
Re: First (no-)go at packaging.
« Reply #22 on: September 05, 2007, 08: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.  :D  Oh well, whatever works.
Logged

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4085
Re: First (no-)go at packaging.
« Reply #23 on: September 06, 2007, 05: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!  :D
Logged

exeterdad

  • Packager
  • Vectorian
  • ****
  • Posts: 2046
Re: First (no-)go at packaging (solved).
« Reply #24 on: September 06, 2007, 05: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: 4085
Re: First (no-)go at packaging (solved).
« Reply #25 on: September 06, 2007, 06: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
Re: First (no-)go at packaging (solved).
« Reply #26 on: September 06, 2007, 07:03:59 am »

Okee Dokee!  As long as we had fun  :)
Logged
Pages: 1 [2]