1

Ok, so the background, I've downloaded myself a copy of http://www.opensource.apple.com/source/curl/curl-68/ and I've configured, compiled and installed it on my own machine, now what I want to do is make a simple redistributable in the form of a package, so that I can use it as a requirement for my own package I'm creating as part of an app. Please note the reason I'm doing this is that this is a newer version of curl then of that found on mountain lion.

What's the best way to go about this?

do I simply just create a folder structure inside the distribution pack that places all the created files in the right place with the right permissions?

or

Do I need to make a script because ultimately it seems that the 'make install' target puts most files where they need to be through using '/usr/bin/install' and I'm not familiar with this concept from using linux?

please note that I'm also very new to the concept of the PackageMaker so you'll have to be clear on any features you mention. Another tiny question I assume there is no lazy way to force a make target to create the folder structure for me rather than having to recreate it myself?

Peter Fox
  • 1,809
  • 2
  • 20
  • 34

1 Answers1

0

You'd probably need to use the first approach because there might be no make utility on target machine (as far as I know it is a part of Xcode command line utilities)

Edited: and may be you shouldn't deliver the newest version of curl to the client, just add requirements to the documentation. And user can install it as it want (using brew for example). Or may be static linking is your solution (but I don't know how you use curl).

Edit 2: for the static linking just launch curl-config --static-libs and add the output to the linker flags. You can view dependencies using command otool -L <your_binary> and if there is no curl - than you linked with it statically

cody
  • 3,233
  • 1
  • 22
  • 25
  • No, that's true sorry, probably wasn't clear what I meant was like upon doing make install it does most of the installing of files via commands like: /usr/bin/install -c .libs/libcurl.4.dylib /usr/local/lib/libcurl.4.dylib Do I need to make the installer package do the same as to not corrupt some kind of index OS X has for files? – Peter Fox Mar 23 '13 at 10:00
  • No because I would rather use the official Apple setup source code over using say brew or ports as I want the process to be simple to install, also brew and ports use /opt so anything I compile with be linked to different libraries – Peter Fox Mar 23 '13 at 10:07
  • I don't think it is a good idea to replace system's libs with yours. Some other application may depend on that version of curl. May be just place it in some other folder and use it instead of system's? – cody Mar 23 '13 at 10:07
  • well, I see you are using libs, not binaries. So just link statically with version you want. – cody Mar 23 '13 at 10:10
  • potentially true, but I don't see a problem with just going with the idea of creating an installer package, it's Apple's own setup of curl so chances are it's been very well tested for use in mountain lion so I'm not worried on that front. Statically linked seems like extra effort that's probably not required. – Peter Fox Mar 23 '13 at 10:36
  • I mean users may have installed other applications using curl developed with with assumption that there will be standard curl library. And after your installation these applications can stop working. And besides I see extra effort in creating the additional installer package and notifying users that they need to install it. While static linking with curl will just increase the size of you binary for about half a megabyte. – cody Mar 23 '13 at 10:44