diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/Linux/RPM/README | 5 | ||||
-rw-r--r-- | packages/Linux/RPM/curl-ssl.spec | 98 | ||||
-rw-r--r-- | packages/Linux/RPM/curl.spec | 96 | ||||
-rw-r--r-- | packages/Linux/RPM/make_curl_rpm | 62 | ||||
-rw-r--r-- | packages/README | 27 | ||||
-rw-r--r-- | packages/Win32/README | 50 |
6 files changed, 338 insertions, 0 deletions
diff --git a/packages/Linux/RPM/README b/packages/Linux/RPM/README new file mode 100644 index 000000000..a48ece043 --- /dev/null +++ b/packages/Linux/RPM/README @@ -0,0 +1,5 @@ +Author: Daniel (I'm not trustworthy, replace this!) + +Paul Marquis's 'make_curl_rpm' script is a fine example on how to automate the +jobs. You need to fill in your own name and email at least. + diff --git a/packages/Linux/RPM/curl-ssl.spec b/packages/Linux/RPM/curl-ssl.spec new file mode 100644 index 000000000..5e4c85475 --- /dev/null +++ b/packages/Linux/RPM/curl-ssl.spec @@ -0,0 +1,98 @@ +%define ver 7.4.2 +%define rel 1 +%define prefix /usr + +Summary: get a file from a FTP, GOPHER or HTTP server. +Name: curl-ssl +Version: %ver +Release: %rel +Copyright: MPL +Group: Utilities/Console +Source: curl-%{version}.tar.gz +URL: http://curl.haxx.se +BuildPrereq: openssl +BuildRoot: /tmp/%{name}-%{version}-%{rel}-root +Packager: Fill In As You Wish +Docdir: %{prefix}/doc + +%description +curl-ssl is a client to get documents/files from servers, using +any of the supported protocols. The command is designed to +work without user interaction or any kind of interactivity. + +curl-ssl offers a busload of useful tricks like proxy support, +user authentication, ftp upload, HTTP post, file transfer +resume and more. + +Note: this version is compiled with SSL (https:) support. + +Authors: + Daniel Stenberg <daniel@haxx.se> + + +%prep +%setup -n curl-7.4.2 + + +%build +# Needed for snapshot releases. +if [ ! -f configure ]; then + CONF="./autogen.sh" +else + CONF="./configure" +fi + +# +# Configuring the package +# +CFLAGS="${RPM_OPT_FLAGS}" ${CONF} \ + --prefix=%{prefix} \ + --with-ssl + + +[ "$SMP" != "" ] && JSMP = '"MAKE=make -k -j $SMP"' + +make ${JSMP} CFLAGS="-DUSE_SSLEAY -I/usr/include/openssl"; + + +%install +[ -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT} + +make prefix=${RPM_BUILD_ROOT}%{prefix} install-strip + +# +# Generating file lists and store them in file-lists +# Starting with the directory listings +# +find ${RPM_BUILD_ROOT}%{prefix}/{bin,lib,man} -type d | sed "s#^${RPM_BUILD_ROOT}#\%attr (-\,root\,root) \%dir #" > file-lists + +# +# Then, the file listings +# +echo "%defattr (-, root, root)" >> file-lists +find ${RPM_BUILD_ROOT}%{prefix} -type f | sed -e "s#^${RPM_BUILD_ROOT}##g" >> file-lists + + +%clean +(cd ..; rm -rf curl-7.4.2 ${RPM_BUILD_ROOT}) + + +%files -f file-lists +%defattr (-, root, root) +%doc BUGS +%doc CHANGES +%doc CONTRIBUTE +%doc FAQ +%doc FEATURES +%doc FILES +%doc INSTALL +%doc LEGAL +%doc MPL-1.0.txt +%doc README +%doc README.curl +%doc README.libcurl +%doc RESOURCES +%doc TODO +%doc %{name}-ssl.spec.in +%doc %{name}.spec.in + diff --git a/packages/Linux/RPM/curl.spec b/packages/Linux/RPM/curl.spec new file mode 100644 index 000000000..133a45c91 --- /dev/null +++ b/packages/Linux/RPM/curl.spec @@ -0,0 +1,96 @@ +%define ver 7.4.2 +%define rel 1 +%define prefix /usr + +Summary: get a file from a FTP, GOPHER or HTTP server. +Name: curl +Version: %ver +Release: %rel +Copyright: MPL +Group: Utilities/Console +Source: %{name}-%{version}.tar.gz +URL: http://curl.haxx.se +BuildRoot: /tmp/%{name}-%{version}-%{rel}-root +Packager: Fill In As You Wish +Docdir: %{prefix}/doc + +%description +curl is a client to get documents/files from servers, using +any of the supported protocols. The command is designed to +work without user interaction or any kind of interactivity. + +curl offers a busload of useful tricks like proxy support, +user authentication, ftp upload, HTTP post, file transfer +resume and more. + +Note: this version is compiled without SSL (https:) support. + +Authors: + Daniel Stenberg <daniel@haxx.se> + + +%prep +%setup -n %{name}-%{version} + + +%build +# Needed for snapshot releases. +if [ ! -f configure ]; then + CONF="./autogen.sh" +else + CONF="./configure" +fi + +# +# Configuring the package +# +CFLAGS="${RPM_OPT_FLAGS}" ${CONF} \ + --prefix=%{prefix} + + +[ "$SMP" != "" ] && JSMP = '"MAKE=make -k -j $SMP"' + +make ${JSMP}; + + +%install +[ -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT} + +make prefix=${RPM_BUILD_ROOT}%{prefix} install-strip + +# +# Generating file lists and store them in file-lists +# Starting with the directory listings +# +find ${RPM_BUILD_ROOT}%{prefix}/{bin,lib,man} -type d | sed "s#^${RPM_BUILD_ROOT}#\%attr (-\,root\,root) \%dir #" > file-lists + +# +# Then, the file listings +# +echo "%defattr (-, root, root)" >> file-lists +find ${RPM_BUILD_ROOT}%{prefix} -type f | sed -e "s#^${RPM_BUILD_ROOT}##g" >> file-lists + + +%clean +(cd ..; rm -rf %{name}-%{version} ${RPM_BUILD_ROOT}) + + +%files -f file-lists +%defattr (-, root, root) +%doc BUGS +%doc CHANGES +%doc CONTRIBUTE +%doc FAQ +%doc FEATURES +%doc FILES +%doc INSTALL +%doc LEGAL +%doc MPL-1.0.txt +%doc README +%doc README.curl +%doc README.libcurl +%doc RESOURCES +%doc TODO +%doc %{name}-ssl.spec.in +%doc %{name}.spec.in + diff --git a/packages/Linux/RPM/make_curl_rpm b/packages/Linux/RPM/make_curl_rpm new file mode 100644 index 000000000..544a23b67 --- /dev/null +++ b/packages/Linux/RPM/make_curl_rpm @@ -0,0 +1,62 @@ +#! /bin/sh +# script to build curl RPM from src RPM (SSL and non-SSL versions) + +# initialize +top_dir=/usr/src/redhat +sources_dir=$top_dir/SOURCES +specs_dir=$top_dir/SPECS +rpms_dir=$top_dir/RPMS +arch=`rpm --showrc | awk 'NF == 3 && $2 == "_arch" { print $3 }'` + +# fill in your own name and email here +packager_name="Mr Joe Packager Person" +packager_email='<Joe@packager.person>' + +# make sure we're running as root +if test `id -u` -ne `id -u root` +then + echo "you must build the RPM as root" + exit 1 +fi + +# get version and release number +if test $# -lt 1 +then + echo "version number?" + read version +else + version=$1 +fi + +if test $# -lt 2 +then + echo "release number?" + read release +else + release=$2 +fi + +# build all the files +targets="curl curl-ssl" +for target in $targets +do + # make sure src RPM exist + src_rpm="$target-$version-$release.src.rpm" + if test -f $src_rpm + then + rpm -ivh $src_rpm + + # replace packager in spec file + sed -e 's/^Packager: .*/Packager: $packager_name $packager_email/' $specs_dir/$target.spec > $specs_dir/$target-$version-$arch.spec + + # build it + if ! rpm -ba $specs_dir/$target-$version-$arch.spec + then + echo "error building $target for $arch -- check output above" + fi + + echo "$target rpm is now in $rpms_dir/$arch" + else + echo $src_rpm does not exist + fi +done diff --git a/packages/README b/packages/README new file mode 100644 index 000000000..cb50b4018 --- /dev/null +++ b/packages/README @@ -0,0 +1,27 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +PACKAGES + + This directory and all its subdirectories are for special package +information, template, scripts and docs. The files herein should be of use for +those of you who want to package curl in a binary or source format using one +of those custom formats. + + The hierarchy for these directories is something like this: + + packages/[OS]/[FORMAT]/ + + Currently, we have Win32 and Linux for [OS]. There might be different formats +for the same OS so for Linux we have RPM as format. + + We might need to add some differentiation for CPU as well, as there is +Linux-RPMs for several CPUs. However, it might not be necessary since the +packaging should be pretty much the same no matter what CPU that is used. + + For each unique OS-FORMAT pair, there's a directory to "fill"! I'd like to +see a single README with as much details as possible, and then I'd like some +template files for the package process. diff --git a/packages/Win32/README b/packages/Win32/README new file mode 100644 index 000000000..26936af8a --- /dev/null +++ b/packages/Win32/README @@ -0,0 +1,50 @@ +Author: Jörn Hartroth + +DESCRIPTION + +Packaging of the curl binaries for Win32 should at this point in time be based +on the InfoZip (zip/unzip) archiver family as the de-facto standard for +Windows archives. A package should contain the main binary curl.exe along with +the appropriate documentation and license information files. For development +releases, you should also include the header directory and probably the +compiled binaries of libcurl and the appropriate Makefiles/project definition +files for the compiler used. + +A simple packaging mechanism can be based on a set of batch files which call +zip.exe with the appropriate files from the curl distribution - see the +samples included below (Long lines have been split with "\" as the split +marker, you'll want to rejoin the pieces to be all on one line in the batch +file). Call any of these batch files - after compiling the curl binaries - +with a single parameter specifying the name of the archive file to be created. + +It is implicitely assumed that all of the binary files (curl.exe, libcurl.a, +etc) have previously been copied to the main directory of the curl source +package (the directory where the main README resides), because that is where +they should end up in the zip archive. The archive should *not* be built with +absolute path information because the user will want to locally extract the +archive contents and shift the binaries to his executable directory. + +SCRIPT_TEMPLATES + +curlpkg.bat: + zip -9 %1 curl.exe CHANGES LEGAL MPL-1.0.txt README \ + docs/FAQ docs/FEATURES docs/README.curl docs/README.win32 docs/TODO + +curldevpkg.bat: + zip -9 %1 curl.exe include\README include\curl\*.h CHANGES docs\* \ + curl.spec curl-ssl.spec LEGAL lib/Makefile.m32 src/Makefile.m32 \ + libcurl.a libcurl.def libcurl.dll libcurldll.a MPL-1.0.txt README + +PROCEDURE_EXAMPLE + +A standard packaging routine (for MingW32) using the above batch files could +go like this: +(No SSL) (With SSL) +cd <curl-sourcedir>\lib cd <curl-sourcedir>\lib +make -f Makefile.m32 make -f Makefile.m32 SSL=1 +cd ..\src cd ..\src +make -f Makefile.m32 make -f Makefile.m32 SSL=1 +cd .. cd .. +copy lib\libcurl.a . copy lib\libcurl.a . +copy src\curl.exe . copy src\curl.exe . +curlpkg curl-win32-nossl.zip curlpkg curl-win32-ssl.zip |