OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> What Do You Do If There's No Destdir Option?
Capn_Fish
post May 5 2007, 07:04 PM
Post #1





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



How do you package an app up if "grep DESTDIR Makefile" returns nothing?
Go to the top of the page
 
+Quote Post
danr
post May 5 2007, 11:25 PM
Post #2





Group: Members
Posts: 138
Joined: 12-February 04
Member No.: 1,830



QUOTE(Capn_Fish @ May 6 2007, 03:04 AM)
How do you package an app up if "grep DESTDIR Makefile" returns nothing?
*

You could search the Makefile for 'prefix' or '/usr', and change to $PWD/ipkg/usr or something similar.
Go to the top of the page
 
+Quote Post
Capn_Fish
post May 6 2007, 06:50 AM
Post #3





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



QUOTE(danr @ May 6 2007, 02:25 AM)
QUOTE(Capn_Fish @ May 6 2007, 03:04 AM)
How do you package an app up if "grep DESTDIR Makefile" returns nothing?
*

You could search the Makefile for 'prefix' or '/usr', and change to $PWD/ipkg/usr or something similar.
*


Doesn't that lead to issues apon installation on the ipk?
Go to the top of the page
 
+Quote Post
Meanie
post May 6 2007, 07:09 AM
Post #4





Group: Members
Posts: 2,808
Joined: 21-March 05
From: Sydney, Australia
Member No.: 6,686



QUOTE(Capn_Fish @ May 6 2007, 01:04 PM)
How do you package an app up if "grep DESTDIR Makefile" returns nothing?
*


some have INSTALL_ROOT instead of DESTDIR. maybe you're in luck...
Go to the top of the page
 
+Quote Post
Capn_Fish
post May 6 2007, 07:16 AM
Post #5





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



Nope. sad.gif
Go to the top of the page
 
+Quote Post
danr
post May 6 2007, 09:03 AM
Post #6





Group: Members
Posts: 138
Joined: 12-February 04
Member No.: 1,830



QUOTE(Capn_Fish @ May 6 2007, 02:50 PM)
QUOTE(danr @ May 6 2007, 02:25 AM)
QUOTE(Capn_Fish @ May 6 2007, 03:04 AM)
How do you package an app up if "grep DESTDIR Makefile" returns nothing?
*

You could search the Makefile for 'prefix' or '/usr', and change to $PWD/ipkg/usr or something similar.
*


Doesn't that lead to issues apon installation on the ipk?
*



It might do - you could give it a go. Otherwise, you might be able to do a make install -n > script.sh, and replace all instances of /usr with $PWD/ipkg/usr in script.sh, then execute the script.
Go to the top of the page
 
+Quote Post
Capn_Fish
post May 6 2007, 09:51 AM
Post #7





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



QUOTE(danr @ May 6 2007, 12:03 PM)
QUOTE(Capn_Fish @ May 6 2007, 02:50 PM)
QUOTE(danr @ May 6 2007, 02:25 AM)
QUOTE(Capn_Fish @ May 6 2007, 03:04 AM)
How do you package an app up if "grep DESTDIR Makefile" returns nothing?
*

You could search the Makefile for 'prefix' or '/usr', and change to $PWD/ipkg/usr or something similar.
*


Doesn't that lead to issues apon installation on the ipk?
*



It might do - you could give it a go. Otherwise, you might be able to do a make install -n > script.sh, and replace all instances of /usr with $PWD/ipkg/usr in script.sh, then execute the script.
*


The script method doesn't seem to work, so I'm going to give the Makefile method a try. Do I need to edit all of the makefiles, or just one? Is there a good way to group edit the makefiles?

Thanks.
Go to the top of the page
 
+Quote Post
desertrat
post May 6 2007, 03:08 PM
Post #8





Group: Members
Posts: 742
Joined: 15-October 05
From: Gulag, Siberia
Member No.: 8,322



QUOTE(Capn_Fish @ May 6 2007, 02:50 PM)
QUOTE(danr @ May 6 2007, 02:25 AM)

You could search the Makefile for 'prefix' or '/usr', and change to $PWD/ipkg/usr or something similar.
*

Doesn't that lead to issues apon installation on the ipk?

I think if you add the $PWD after have you done "make" and just before you do "make install" it should be OK? Otherwise find the "install" section of the Makefile and add DESTDIR manually. Eg here's one for zlib:

CODE
install: $(LIBS)
       -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
       -@if [ ! -d $(DESTDIR)$(includedir)  ]; then mkdir -p $(DESTDIR)$(includedir); fi
       -@if [ ! -d $(DESTDIR)$(libdir)      ]; then mkdir -p $(DESTDIR)$(libdir); fi
       -@if [ ! -d $(DESTDIR)$(man3dir)     ]; then mkdir -p $(DESTDIR)$(man3dir); fi
       cp zlib.h zconf.h $(DESTDIR)$(includedir)
       chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h
       cp $(LIBS) $(DESTDIR)$(libdir)
       cd $(DESTDIR)$(libdir); chmod 755 $(LIBS)
       -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
       cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \
         rm -f $(SHAREDLIB) $(SHAREDLIBM); \
         ln -s $(SHAREDLIBV) $(SHAREDLIB); \
         ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
         (ldconfig || true)  >/dev/null 2>&1; \
       fi
       cp zlib.3 $(DESTDIR)$(man3dir)
       chmod 644 $(DESTDIR)$(man3dir)/zlib.3

QUOTE
Do I need to edit all of the makefiles
Normally you should only need to edit main Makefile, the ones in subdirectories usually defer "install" to that main Makefile. In fact I don't recall any application that required editing makefiles in the subdirectories.
Go to the top of the page
 
+Quote Post
Capn_Fish
post May 6 2007, 03:23 PM
Post #9





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



Sorry if I'm being thick, but I don't see where to add stuff into this (apparently very abnormal) Makefile.

CODE
# "$Id: Makefile 1526 2005-02-03 15:11:44Z karijes $"
#
# Top-level makefile for the Fast Light Tool Kit (FLTK).
#
# Copyright 1998-1999 by Bill Spitzak and others.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
#
# Please report all bugs and problems to "fltk-bugs@easysw.com".
#

SHELL=/bin/sh
OS_NAME := $(shell uname -s | sed "s/\//-/" | sed "s/_/-/" | sed "s/-.*//g")

DIRS = src tools themes efltk locale test

GENERATED = makeinclude efltk-config

all: $(GENERATED)
    @for dir in $(DIRS); do\
 if test ! -f $$dir/makedepend; then\
     touch $$dir/makedepend;\
 fi;\
 (cd $$dir; $(MAKE) $(MFLAGS)) || exit;\
    done

static: $(GENERATED)
    @for dir in $(DIRS); do\
 if test ! -f $$dir/makedepend; then\
     touch $$dir/makedepend;\
 fi;\
 (cd $$dir; $(MAKE) $(MFLAGS) static) || exit;\
    done

shared: $(GENERATED)
    @for dir in $(DIRS); do\
 if test ! -f $$dir/makedepend; then\
     touch $$dir/makedepend;\
 fi;\
 (cd $$dir; $(MAKE) $(MFLAGS) shared) || exit;\
    done

install: $(GENERATED)
    @for dir in $(DIRS); do\
 if test ! -f $$dir/makedepend; then\
     touch $$dir/makedepend;\
 fi;\
 (cd $$dir; $(MAKE) $(MFLAGS) install) || exit;\
    done

install_static: $(GENERATED)
    @for dir in $(DIRS); do\
 if test ! -f $$dir/makedepend; then\
     touch $$dir/makedepend;\
 fi;\
 (cd $$dir; $(MAKE) $(MFLAGS) install_static) || exit;\
    done

install_shared: $(GENERATED)
    @for dir in $(DIRS); do\
 if test ! -f $$dir/makedepend; then\
     touch $$dir/makedepend;\
 fi;\
 (cd $$dir; $(MAKE) $(MFLAGS) install_shared) || exit;\
    done

install_programs: $(GENERATED)
    @for dir in $(DIRS); do\
 if test ! -f $$dir/makedepend; then\
     touch $$dir/makedepend;\
 fi;\
 (cd $$dir; $(MAKE) $(MFLAGS) install_programs) || exit;\
    done

depend: $(GENERATED)
    @for dir in $(DIRS); do\
 if test ! -f $$dir/makedepend; then\
     touch $$dir/makedepend;\
 fi;\
 (cd $$dir;$(MAKE) $(MFLAGS) depend) || exit;\
    done

uninstall: $(GENERATED)
    @for dir in $(DIRS); do\
 (cd $$dir;$(MAKE) $(MFLAGS) uninstall) || exit;\
    done

clean:
    -@ rm -f core *~ *.o *.bck
    @for dir in $(DIRS); do\
 (cd $$dir;$(MAKE) $(MFLAGS) clean) || exit;\
    done

distclean: clean
    rm -f *~ config.* makeinclude efltk-config

ifeq ($(OS_NAME), MINGW32)

configure:

$(GENERATED):

else

$(GENERATED): configure makeinclude.in configh.in efltk-config.in
    ./configure

configure: configure.in
    autoconf
    
endif

portable-dist:
    epm -v efltk

native-dist:
    epm -v -f native efltk

#
# End of "$Id: Makefile 1526 2005-02-03 15:11:44Z karijes $".
#
Go to the top of the page
 
+Quote Post
desertrat
post May 6 2007, 10:25 PM
Post #10





Group: Members
Posts: 742
Joined: 15-October 05
From: Gulag, Siberia
Member No.: 8,322



QUOTE(Capn_Fish @ May 6 2007, 11:23 PM)
Sorry if I'm being thick, but I don't see where to add stuff into this (apparently very abnormal) Makefile.

I downloaded efltk (which is where I presume you got this mess from smile.gif) and did
CODE
./configure --prefix=/usr/local/
Checking the Makefile(s) in the various directories, it seems that the bit which really does the installing is contained in ./src/makeinclude_tmpl, so I would suggest editing that file.
Disclaimer: I'm no expert so use your own judgement smile.gif
Go to the top of the page
 
+Quote Post
Capn_Fish
post May 7 2007, 03:42 AM
Post #11





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



I'm going to need to install it anyway, so no worries about having it installed.

And yes, that is from efltk.
Go to the top of the page
 
+Quote Post
ShiroiKuma
post May 7 2007, 04:55 AM
Post #12





Group: Members
Posts: 902
Joined: 22-May 04
Member No.: 3,385



What I do, when faced with a prog that doesn't use DESTDIR is: install it in emacs, you can then save the buffer as text file for future reference. Then page through the install buffer in emacs and just copy the files manually from their installed location into a dir preserving the dir structure. Then you can create the ipk. Tedious, yeah, but works...
Go to the top of the page
 
+Quote Post
Meanie
post May 7 2007, 05:04 AM
Post #13





Group: Members
Posts: 2,808
Joined: 21-March 05
From: Sydney, Australia
Member No.: 6,686



QUOTE(ShiroiKuma @ May 7 2007, 10:55 PM)
What I do, when faced with a prog that doesn't use DESTDIR is: install it in emacs, you can then save the buffer as text file for future reference. Then page through the install buffer in emacs and just copy the files manually from their installed location into a dir preserving the dir structure. Then you can create the ipk. Tedious, yeah, but works...
*


why emacs? just use script or redirect the output of the make install into a file...

oh and dont forget to send the author a note telling him/her that they should add DESTDIR
Go to the top of the page
 
+Quote Post
ShiroiKuma
post May 7 2007, 05:17 AM
Post #14





Group: Members
Posts: 902
Joined: 22-May 04
Member No.: 3,385



Well, I use emacs for most stuff, so I'm always in it... And then, you don't need no script.
Go to the top of the page
 
+Quote Post
Capn_Fish
post May 7 2007, 10:08 AM
Post #15





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



QUOTE(Meanie @ May 7 2007, 08:04 AM)
oh and dont forget to send the author a note telling him/her that they should add DESTDIR
*

I will do that.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th September 2014 - 11:56 AM