Author Topic: \'make install\' > create ipk  (Read 4265 times)

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
\'make install\' > create ipk
« on: March 18, 2004, 04:30:11 pm »
I\'m thinking that it would be nice to be able to run a command after I\'ve cross-compiled an application (for the pdaXrom for example, e.g. an application which uses configure & make) which would act like \'make install\' (and in fact read the Makefile and work out what is sipposed to happen) and create an ./ipk/ directory (or similar) with all of the files copied to the correct locations ready to be packaged.

At the moment I have to run \'make -n install\' then look at the output and do it by hand.

Now I\'ve never tried anything like this, what should I look at using? I was thinking that it could just be a shell script, but I need to read/parse the Makefile. Any suggestions as to how to do this?

Cheers,


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

jbruno

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
    • http://
\'make install\' > create ipk
« Reply #1 on: March 18, 2004, 05:48:35 pm »
Sounds like a job for perl to me.
-----
SL6000L
ATP 512MB SD

BlackCardinal

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • http://www.gelhaus.net
\'make install\' > create ipk
« Reply #2 on: March 18, 2004, 10:33:42 pm »
What I do is create an empty ./pkg/ subdirectory in my main project directory, create the ./pkg/CONTROL/control file, and specify ./pkg/usr as my PREFIX if it\'s a build that uses a configure script (console app) or specify ./pkg/opt/QtPalmtop as the target directory if I am using a .pro file.  Then after building with make install, I can just run ipkg-build from the main project directory.
BlackCardinal : http://www.gelhaus.net : Zaurus page

SL-C1000, Cacko ROM v1.23
Lexar SD 512MB, Kingston CF 512MB
Symbol Spectrum24 CF 802.11b

SL-5500 Sharp ROM v3.10
Lexar SD 256MB
Pocketop keyboard, Nutshell 207 leather case

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
\'make install\' > create ipk
« Reply #3 on: March 19, 2004, 01:47:02 am »
SLC-860 cacko / senao wifi

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
\'make install\' > create ipk
« Reply #4 on: March 19, 2004, 06:14:41 am »
@Blackcardinal: If I alter the PREFIX setting then the chances are my program won\'t be able to find its files, etc., especially if it\'s big and complicated (like R/Octave). Or am I wrong here?

@pgas: Thanks. Installwatch requires that the files are actually copied duing the \'make install\' process, which isn\'t a good thing, checkinstall might be better I\'ll have to have a look at it.

Thanks,


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

BlackCardinal

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • http://www.gelhaus.net
\'make install\' > create ipk
« Reply #5 on: March 19, 2004, 12:18:27 pm »
lardman,

No, you are correct, if the package depends on other libraries.  But many smaller packages only use PREFIX to define their installation paths (I recently made Zaurus builds of libpng and zlib for example.)

The larger source code packages that have dependencies on other libraries usually have separate PREFIX and INSTALL_PREFIX variables.  (INSTALL_PREFIX might be called something slightly different, I\'m going off of memory here.)  In that case, PREFIX should be left untouched but INSTALL_PREFIX can point to ./pkg/usr or wherever which makes assembling the IPK really easy.
BlackCardinal : http://www.gelhaus.net : Zaurus page

SL-C1000, Cacko ROM v1.23
Lexar SD 512MB, Kingston CF 512MB
Symbol Spectrum24 CF 802.11b

SL-5500 Sharp ROM v3.10
Lexar SD 256MB
Pocketop keyboard, Nutshell 207 leather case

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
\'make install\' > create ipk
« Reply #6 on: March 21, 2004, 11:26:17 am »
I\'ll take a look, cheers.

I was also thinking about altering install itself and specifying the altered one, I need to check if anything else is moved not using install though first.

Thanks for the suggestions,


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva