Help - Search - Members - Calendar
Full Version: 'make install' > create ipk
OESF Portables Forum > Everything Else > Archived Forums > Distros, Development, and Model Specific Forums > Zaurus - Everything Development > User Request for Applications
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?


Sounds like a job for perl to me.
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.
Check these:

which uses installwatch
@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.



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.
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,

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.