Sophie

Sophie

distrib > Mandriva > 9.0 > i586 > media > contrib-src > by-pkgid > bdb63fba623ed939af0544ca02cf95e1 > files > 2

gnustep-base-1.4.0-1mdk.src.rpm

%define gs_root         /usr/GNUstep/System
%define gs_install_dir  /usr/GNUstep/System
%define name         	gnustep-base
%define version      	1.4.0
 
Name: 		%{name}
Version: 	%{version}
Prefix: 	%{gs_install_dir}
Release: 	1mdk
Source: 	ftp://ftp.gnustep.org/pub/gnustep/core/%{name}-%{version}.tar.gz
License: 	LGPL
Group: 		Development/Other
Summary: 	GNUstep Base library package
URL:		http://www.gnustep.org/
Requires:	gnustep-make >= 1.3.0, gcc-objc
BuildRoot: 	%{_tmppath}/%{name}-%{version}

%description
The GNUstep Base Library is a powerful fast library of general-purpose,
non-graphical Objective C classes, inspired by the superb OpenStep API but
implementing Apple and GNU additions to the API as well.  It includes for
example classes for unicode strings, arrays, dictionaries, sets, byte
streams, typed coders, invocations, notifications, notification dispatchers,
scanners, tasks, files, networking, threading, remote object messaging
support (distributed objects), event loops, loadable bundles, attributed
unicode strings, xml, mime, user defaults. This package includes development
headers too.

%prep
%setup -n %{name}-%{version}

%build
if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
  . %{gs_root}/Makefiles/GNUstep.sh 
fi
# CFLAGS="$RPM_OPT_FLAGS" 
./configure --prefix=%{gs_root}
make

%install
if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
  . %{gs_root}/Makefiles/GNUstep.sh 
fi

make INSTALL_ROOT_DIR=$RPM_BUILD_ROOT \
  GNUSTEP_INSTALLATION_DIR=$RPM_BUILD_ROOT%{gs_install_dir} \
  filelist=yes install

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig
if [ $1 = 1 ]; then
#  if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
#     . %{gs_root}/Makefiles/GNUstep.sh 
#  fi
grep -q '^gdomap' /etc/services                                            \
   || (echo "gdomap 538/tcp # GNUstep distributed objects" >> /etc/services  \
       && echo "gdomap 538/udp # GNUstep distributed objects" >> /etc/services)
fi
echo "/usr/GNUstep/System/Libraries/ix86/linux-gnu/gnu-gnu-gnu" >> /etc/ld.so.conf

%postun -p /sbin/ldconfig
if [ $1 = 0 ]; then
#  if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
#     . %{gs_root}/Makefiles/GNUstep.sh 
#  fi
mv -f /etc/services /etc/services.orig
grep -v "^gdomap 538" /etc/services.orig > /etc/services
rm -f /etc/services.orig
fi
grep -v "/usr/GNUstep/System/Libraries/ix86/linux-gnu/gnu-gnu-gnu" /etc/ld.so.conf > /etc/ld.so.conf.sauv
cp -f /etc/ld.so.conf.sauv /etc/ld.so.conf

%files
%defattr (-,root,root)
/usr/GNUstep/*

%changelog
* Fri Aug 09 2002 Antoine Ginies <aginies@mandrakesoft.com> 1.4.0-1mdk
- first Mandrakesoft release
- based on Adam Fedor <fedor@gnu.org> spec