cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH] AIX Toolbox RPM spec file

From: Tor Arntsen <tor_at_spacetec.no>
Date: Thu, 16 Mar 2006 19:59:12 +0100

As the AIX Toolbox RPM for Curl is getting very long in the teeth
(it's at 7.9.3 still) I'm providing a tentative patch to add a new
spec file to generate AIX RPMs for AIX Toolbox. It generates RPMs
that are drop-in replacements for the curl RPMs found on the AIX 5x
Toolbox CD or at ftp.software.ibm.com.

Note that a) I'm no RPM/spec expert at all, so I've just clobbered together
a version based on the Linux versions as well as IBM's original spec file,
and b) Although I have included Makefile.am updates etc. I have not tested
how the configure part works out, I have merely built, installed and tested
RPMs by using the provided curl.spec.in file directly (with @VERSION@
expanded).

(I'm rushing this a bit in the hope of getting it included in 7.15.3..)

-Tor
-- patch follows below --

diff -xMakefile.in -xvms -xLinux -xWin32 -xSolaris -xNetWare -urN -xMakefile -xEPM -xCVS curl.old/packages/AIX/Makefile.am curl/packages/AIX/Makefile.am
--- curl.old/packages/AIX/Makefile.am Thu Jan 1 01:00:00 1970
+++ curl/packages/AIX/Makefile.am Thu Mar 16 19:25:15 2006
@@ -0,0 +1 @@
+SUBDIRS = RPM
diff -xMakefile.in -xvms -xLinux -xWin32 -xSolaris -xNetWare -urN -xMakefile -xEPM -xCVS curl.old/packages/AIX/RPM/Makefile.am curl/packages/AIX/RPM/Makefile.am
--- curl.old/packages/AIX/RPM/Makefile.am Thu Jan 1 01:00:00 1970
+++ curl/packages/AIX/RPM/Makefile.am Thu Mar 16 19:26:22 2006
@@ -0,0 +1,2 @@
+EXTRA_DIST = README curl.spec.in
+
diff -xMakefile.in -xvms -xLinux -xWin32 -xSolaris -xNetWare -urN -xMakefile -xEPM -xCVS curl.old/packages/AIX/RPM/README curl/packages/AIX/RPM/README
--- curl.old/packages/AIX/RPM/README Thu Jan 1 01:00:00 1970
+++ curl/packages/AIX/RPM/README Thu Mar 16 19:27:46 2006
@@ -0,0 +1,34 @@
+$Id$
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ ( (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+ for AIX Toolbox
+
+Author: Tor Arntsen
+
+The spec file in this directory is based on the Linux ssl and non-ssl
+curl spec files, plus additions to make it AIX Toolbox compatible.
+
+The AIX Toolbox setup (installs into /opt/freeware, with symlinks in
+/usr/bin,/usr/lib,/usr/include) are based on IBM's aixtoolbox spec
+file written by David Clissold <cliss a t austin.ibm.com>, see
+
+ftp://ftp.software.ibm.com/aixtoolbox/SPECS/curl-7.9.3-2.spec
+
+This spec file is designed to be a drop-in replacement for the
+old spec file found at the above link. Thus, like the old spec file
+this version is also a unified ssl/non-ssl version. To get non-ssl
+RPMs just pass --define 'nossl 1' to the command line when building
+the RPM, e.g.
+
+rpm -bb --define 'nossl 1' curl.spec
+
+Default is to build with ssl support.
+
+Lastly, the spec file expects the Curl source distribution file to be
+in .tar.bz2 format.
+
+The nifty cURL header of this README is a ripoff of the vms/readme file.
+
diff -xMakefile.in -xvms -xLinux -xWin32 -xSolaris -xNetWare -urN -xMakefile -xEPM -xCVS curl.old/packages/AIX/RPM/curl.spec.in curl/packages/AIX/RPM/curl.spec.in
--- curl.old/packages/AIX/RPM/curl.spec.in Thu Jan 1 01:00:00 1970
+++ curl/packages/AIX/RPM/curl.spec.in Thu Mar 16 19:23:56 2006
@@ -0,0 +1,132 @@
+# Use --define 'nossl 1' on the command line to disable SSL detection
+%{!?nossl:%define SSL 1}
+%{?nossl:%define SSL 0}
+
+%define name curl
+%define version @VERSION@
+%define release 1%{!?nossl:ssl}
+
+%define curlroot %{_builddir}/%{name}-%{version}
+
+Summary: get a file from a FTP or HTTP server.
+Name: %{name}
+Version: %{version}
+Release: %{release}
+License: MIT/X derivate
+Vendor: Daniel Stenberg <Daniel.Stenberg_at_haxx.se>
+Group: Applications/Internet
+Source: %{name}-%{version}.tar.bz2
+URL: http://curl.haxx.se/
+Provides: curl
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+Prefix: %{_prefix}
+
+%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 many useful tricks like proxy support, user authentication,
+ftp upload, HTTP post, file transfer resume and more.
+
+%if %{SSL} == 1
+Note: this version is compiled with SSL support.
+%else
+Note: this version is compiled without SSL support.
+%endif
+
+%package devel
+Summary: Development files for the curl libary
+Group: Development/Libraries
+%if %{SSL} == 1
+Requires: openssl >= 0.9.5
+%endif
+Requires: curl = %{version}
+Provides: curl-devel
+
+%description devel
+libcurl is the core engine of curl; this packages contains all the
+libs, headers, and manual pages to develop applications using libcurl.
+
+%define DEFCC xlc
+
+%prep
+rm -rf %{curlroot}
+%setup -q
+
+%build
+
+# Use the default compiler for this platform - gcc otherwise
+if [[ -z "$CC" ]]
+then
+ if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then
+ export CC=%{DEFCC}
+ else
+ export CC=gcc
+ fi
+fi
+
+cd %{curlroot} && (if [ -f configure.in ]; then mv -f configure.in configure.in.
+rpm; fi)
+
+./configure --prefix=%{prefix} \
+%if %{SSL} == 1
+ --with-ssl
+%else
+ --without-ssl
+%endif
+
+make
+
+%install
+[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
+make DESTDIR=%{buildroot} install-strip
+
+( cd $RPM_BUILD_ROOT # same as %{buildroot}
+
+ for dir in bin include
+ do
+ mkdir -p usr/$dir
+ cd usr/$dir
+ ln -sf ../..%{prefix}/$dir/* .
+ cd -
+ done
+
+ mkdir -p usr/lib
+ cd usr/lib
+ ln -sf ../..%{prefix}/lib/* .
+ cd -
+)
+
+%clean
+[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root)
+%attr(0755,root,root) %{_bindir}/curl
+%attr(0644,root,root) %{_mandir}/man1/curl.1*
+%{_libdir}/libcurl.a
+%if %{SSL} == 1
+%{_datadir}/curl/curl-ca-bundle.crt
+%endif
+%doc CHANGES COPYING README RELEASE-NOTES
+%doc docs/BUGS docs/CONTRIBUTE docs/FAQ docs/FEATURES docs/HISTORY
+%doc docs/INSTALL docs/KNOWN_BUGS
+%doc docs/MANUAL docs/RESOURCES docs/THANKS docs/VERSIONS docs/TODO
+%doc docs/TheArtOfHttpScripting
+%if %{SSL} == 1
+%doc docs/SSLCERTS
+%endif
+/usr/bin/curl
+/usr/lib/libcurl.a
+
+%files devel
+%defattr(-,root,root)
+%attr(0755,root,root) %{_bindir}/curl-config
+%attr(0644,root,root) %{_mandir}/man1/curl-config.1*
+%attr(0644,root,root) %{_mandir}/man3/*
+%attr(0644,root,root) %{_includedir}/curl/*
+%{_libdir}/libcurl.la
+%doc docs/BINDINGS docs/INTERNALS docs/LICENSE-MIXING
+/usr/bin/curl-config
+/usr/include/curl
diff -xMakefile.in -xvms -xLinux -xWin32 -xSolaris -xNetWare -urN -xMakefile -xEPM -xCVS curl.old/packages/Makefile.am curl/packages/Makefile.am
--- curl.old/packages/Makefile.am Thu Mar 18 06:02:05 2004
+++ curl/packages/Makefile.am Thu Mar 16 19:24:45 2006
@@ -1,3 +1,3 @@
-SUBDIRS = Win32 Linux Solaris EPM DOS vms
+SUBDIRS = Win32 Linux Solaris EPM DOS vms AIX
 
 EXTRA_DIST = README NetWare/get_ver.awk
Received on 2006-03-16