curl-users
cygwin related changes
Date: Fri, 12 Oct 2001 17:44:52 -0400
(look, I remembered to select plain text ;-)
I brought up (on the cygwin-maillist) the possibility of making
cygwin-specific cURL binaries available for installation with Cygwin's
setup.exe (roughly the same idea as the perl package manager). In the
process, I've learned they have some rather specific rules for packaging
up cygwin software. To comply, I have a couple of minor changes and a
request for some help in creating a script to package the binary cygwin
release.
First of all, the two minor changes. Cygwin prefers to see shared
libraries (libcurl) distributed as DLLs (instead of standard shared
libraries), in addition to static libraries (libcurl.a). The way they
suggested to build these was to make a couple libtool related changes to
the configure scripts, as opposed to maintaining scripts to create the
DLLs 'manually' via dllwrap.
Those changes are:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- curl-7.9-orig/configure.in Wed Sep 12 13:31:58 2001
+++ curl-7.9/configure.in Fri Oct 12 14:25:05 2001
@@ -37,7 +37,7 @@
dnl check for how to do large files
AC_SYS_LARGEFILE
-
+AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
and
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- curl-7.9-orig/lib/Makefile.am Tue Aug 28 10:58:27 2001
+++ curl-7.9/lib/Makefile.am Fri Oct 12 14:25:14 2001
@@ -16,7 +16,7 @@
INCLUDES = -I$(top_srcdir)/include
-libcurl_la_LDFLAGS = -version-info 2:2:0
+libcurl_la_LDFLAGS = -no-undefined -version-info 2:2:0
# This flag accepts an argument of the form current[:revision[:age]].
So,
# passing -version-info 3:12:1 sets current to 3, revision to 12, and
age to
# 1.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
These changes appear to be documented in the libtool manual:
http://www.gnu.org/software/libtool/manual.html#AM_PROG_LIBTOOL
Scroll down a couple entries to AC_LIBTOOL_WIN32_DLL
Once you do this, and re-bootstrap the configure script (./reconf), it
compiles cleanly, and creates (in addition to curl.exe of course) a
libcurl.a (static lib), a libcurl.dll.a (import lib), and cygcurl-2.dll
(shared library which is named according to cygwin standards, and
requires the cygwin1.dll to function).
I'm wondering if these changes can be put into the cURL sources without
messing up anyone else's build environments (particularly the mingw32
one). If not, I assume I'd have to go the route of creating custom
cygwin Makefiles?
Secondly, the cygwin folks have some requirements for creating binary
and source tarballs, so that their installation tools can be used to
install cURL binaries, and so additional development on the cygwin
platform is easier. You can read details (if you're curious) at the
following URL:
http://cygwin.com/ml/cygwin-apps/2000-11/msg00055.html
But in summary, cygwin packages should:
o start with the most recent stable cURL distribution tarball
o contain a readme file (named e.g. curl-7.9.README) which
describes any patches plus how it is to be built and used
(to be installed to /usr/doc/Cygwin/)
o ideally install other documentation (except for man pages)
into /usr/doc/curl-7.9/* (things like FAQs, README's,
tutorials, etc)
Then, you package two things:
1: a "source" tarball, of the entire patched directory
structure, at the point just before having run ./configure
2: a "binary" tarball, of the results of running
`./configure --prefix=/usr`
`make`
`make install prefix=/tmp/usr`, followed by
`cd /tmp; tar cvzf tex-4.0-1.tar.gz usr`
so that all installable files (including the docs mentioned
above) are in the tar file with relative paths like
"usr/bin/curl.exe"
I'm sure I could create a very simple shell script to do this, however
I'm wondering if any kind soul on this list would help me out by
describing any already automated ways to do similar things for other
cURL binary builds (such as the linux RPMs or the base distribution).
That way I have a starting point.
Also, can we change the main Makefile.am's "install" target to support
copying the necessary docs into the right places (/usr/doc/Cygwin, plus
/usr/doc/curl-7.9) if the platform in use is CYGWIN? That way, I don't
have to maintain a list of doc files in this shell script; a simple
`make install` will get them for me... If this is appropriate, I'd be
willing to try and figure out how, although I'm sure someone else who
actually is familiar with makefiles could probably do it much easier.
Thanks,
--Kevin
Received on 2001-10-12