# Copyright (C) 1999 by Juergen Pfeifer # Ada for Linux Team (ALT) # # The following license applies to this specification file: # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, distribute with modifications, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR # THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name(s) of the above copyright # holders shall not be used in advertising or otherwise to promote the # sale, use or other dealings in this Software without prior written # authorization. # # --------------------------------------------------------------------------- # Author: Jürgen Pfeifer # --------------------------------------------------------------------------- # # GNU Ada RPM Packaging for David Wheelers CGI package # %define GNAT_TARGET_ARCH i386 %define COMPAT_TARGET_ARCH i386 i486 i586 i686 %define GNAT_TARGET_OS Linux %define TARGET_OS linux # %define BASE_NAME gnat %define GNAT_PKG_NAME gnat-3.11p %define GNAT_VERSION 3.11p %define GNAT_PKG_VERSION 1 %define GNAT_PKG_RELEASE 11 %define GCC_VERSION 2.8.1 %define GDB_VERSION 4.17 # %define DEF_USER bin %define DEF_GROUP bin # %define BASE_VERSION gcc-%{GCC_VERSION} # %define CFG_PREFIX /usr %define ADA_ROOT /lib/gnat %define ADA_BASE %{CFG_PREFIX}%{ADA_ROOT} # %define GNAT_SO_MAJOR %{GNAT_PKG_VERSION} %define GNAT_SO_MINOR %{GNAT_PKG_RELEASE} # %define RPM_C_FLAGS -O3 -m486 -fomit-frame-pointer %define RPM_ADA_FLAGS -gnatpn # %define THREADLIBS -lpthread # %define GNAT_NAME gnat-%{GNAT_VERSION} %define GNAT_SO %{GNAT_NAME} %define GNAT_DIR %{ADA_BASE}/%{GNAT_NAME} # %define AINC_NAME adainclude %define AINC_DIR %{ADA_BASE}/%{AINC_NAME} # %define ALIB_NAME adalib %define ALIB_DIR %{ADA_BASE}/%{ALIB_NAME} # %define ETC_NAME etc %define ETC_DIR %{ADA_BASE}/%{ETC_NAME} # %define COMPAT_NAME act_compat-%{GNAT_VERSION} %define COMPAT_DIR %{ADA_BASE}/%{COMPAT_NAME} # %define ASIS_NAME asis-%{GNAT_VERSION} %define ASIS_SO %{ASIS_NAME} %define ASIS_DIR %{ADA_BASE}/%{ASIS_NAME} # %define GLADE_NAME glade-%{GNAT_VERSION} %define GLADE_DIR %{ADA_BASE}/%{GLADE_NAME} #dnl # %define PKG_NAME adacgi %define PKG_VERSION 1.4 %define PKG_RELEASE 1 # # --------------------------------------------------------------------------- # We restrict the use of this package scipt at the moment to Intel and Linux. # For sure there are details (compiler options, shared library building) # that must be fixed for other architectures and OSes. # ExclusiveArch: %{COMPAT_TARGET_ARCH} ExclusiveOS: %{GNAT_TARGET_OS} Packager: Jürgen Pfeifer Distribution: ALT (Ada for Linux Team) Version: %{PKG_VERSION} Release: %{PKG_RELEASE} Name: %{PKG_NAME} BuildRoot: /var/tmp/%{PKG_NAME}-%{version}-root Autoreq: No Autoreqprov: No # --------------------------------------------------------------------------- # This are the official sources Source0: http://www.dwheeler.com/adacgi/latest/adacgi.zip # Source0: http://wuarchive.wustl.edu/languages/ada/swcomps/cgi/cgi.zip # Patch0: cgi.diff # # --------------------------------------------------------------------------- Copyright: LGPL-like URL: http://wuarchive.wustl.edu/languages/ada/swcomps/cgi/ Summary: Ada95 CGI Programming Interface Summary(de): Ada95 Interface für CGI Programmierung Group: Libraries Requires: %{GNAT_PKG_NAME}-devel >= %{GNAT_PKG_VERSION} Provides: %{name} Obsoletes: %{name} Icon: adasmall.gif Prefix: %{CFG_PREFIX} # %description This is David A. Wheeler's package for implementing web programs in Ada95. This is an Ada95 binding to CGI (the Common Gateway Interface), a common interface between web servers and specialized web server applications. You only need to install this package if you're compiling Ada95 programs which use this binding. %description -l de Dies ist David A. Wheeler's Paket für die Implementierung von Web Programmen in Ada95. Es ist ein Ada95 Binding für CGI (das Common Gateway Interface), eine allgemeine Schnittstelle zwischen Web-Servern und Web-Server Anwendungen. Sie brauchen dieses Paket nur zu installieren wenn Sie Ada95 Programme schreiben wollen, die dieses Binding benutzen. # #----------------------------------------------------------------------------- %prep #============================================================================= # rm -rf $RPM_BUILD_DIR/adacgi mkdir $RPM_BUILD_DIR/adacgi cd $RPM_BUILD_DIR/adacgi unzip %{SOURCE0} # %patch0 -p1 # #----------------------------------------------------------------------------- %build #============================================================================= # Create the required directory structure for the binary package rm -rf $RPM_BUILD_ROOT cd $RPM_BUILD_DIR/adacgi mkdir -p $RPM_BUILD_ROOT%{AINC_DIR} mkdir -p $RPM_BUILD_ROOT%{ALIB_DIR} mkdir -p $RPM_BUILD_ROOT/doc/sample mkdir -p $RPM_BUILD_ROOT/usr/doc # gnatgcc -c %{RPM_C_FLAGS} %{RPM_ADA_FLAGS} cgi.adb # #----------------------------------------------------------------------------- %install #============================================================================= OS=%{TARGET_OS} # # cd $RPM_BUILD_DIR/adacgi cp -pf cgi.ad? $RPM_BUILD_ROOT%{AINC_DIR} cp -pf cgi.ali $RPM_BUILD_ROOT%{ALIB_DIR} cp -pf cgi.o $RPM_BUILD_ROOT%{ALIB_DIR} # cp -pf README $RPM_BUILD_ROOT/doc/README cp -pf cgi.html $RPM_BUILD_ROOT/doc/cgi.html cp -pf *.ad? $RPM_BUILD_ROOT/doc/sample cp -pf makefile $RPM_BUILD_ROOT/doc/sample rm -f $RPM_BUILD_ROOT/doc/sample/cgi.ad? # if [ -d ${RPM_BUILD_ROOT}%{AINC_DIR} ]; then find ${RPM_BUILD_ROOT}%{AINC_DIR} -type f -name '*.ad?' -exec chmod 0444 {} \; fi if [ -d ${RPM_BUILD_ROOT}%{ALIB_DIR} ]; then find ${RPM_BUILD_ROOT}%{ALIB_DIR} -type f -name '*.ali' -exec chmod 0444 {} \; find ${RPM_BUILD_ROOT}%{ALIB_DIR} -type f -name '*.a' -exec chmod 0444 {} \; fi if [ -d ${RPM_BUILD_ROOT}%{CFG_PREFIX}/lib ]; then find ${RPM_BUILD_ROOT}%{CFG_PREFIX}/lib -type f -name '*.so*' -exec chmod 0755 {} \; fi if [ -d ${RPM_BUILD_ROOT}/doc ]; then find ${RPM_BUILD_ROOT}/doc -type f -exec chmod 0444 {} \; find ${RPM_BUILD_ROOT}/doc -type d -exec chmod 0755 {} \; fi # --------------------------------------------------------------------------- %pre if [ -f /etc/profile.d/%{BASE_NAME}-rts.sh ]; then source /etc/profile.d/%{BASE_NAME}-rts.sh if [ ! -z ${GNAT_ROOT} ]; then if [ "${GNAT_ROOT}" != "${RPM_INSTALL_PREFIX}" ]; then echo "%{BASE_NAME} was installed with --prefix=${GNAT_ROOT}" >&2 echo "You must use the same prefix with this package." >&2 exit 1 fi else if [ "${RPM_INSTALL_PREFIX}" != "%{CFG_PREFIX}" ]; then echo "%{BASE_NAME} was installed without the --prefix option." >&2 echo "You must do this also with this package." >&2 exit 1 fi fi fi # --------------------------------------------------------------------------- %files %defattr(-,%{DEF_USER},%{DEF_GROUP}) %doc $RPM_BUILD_ROOT/doc/* %dir %{CFG_PREFIX} %dir %{CFG_PREFIX}/doc %dir %{ADA_BASE} %dir %{AINC_DIR} %dir %{ALIB_DIR} %{AINC_DIR}/* %{ALIB_DIR}/* # # --------------------------------------------------------------------------- %clean rm -rf $RPM_BUILD_ROOT # # --------------------------------------------------------------------------- %changelog * Tue Sep 14 1999 David A. Wheeler - Updated to adacgi 1.4: + merged in Juergen Pfeifer's patch, + added cookie support + Expanded documentation + License change to be LGPL-like * Wed Mar 31 1999 Juergen Pfeifer - Changed description - Publised as Release 1 * Wed Mar 10 1999 Juergen Pfeifer - Created