File gnustep-base.spec of Package gnustep-base
Name: gnustep-base
Version: 1.31.0
Release: 0
License: GPL-3.0-or-later AND LGPL-2.1-or-later
Summary: GNUstep Base package
Url: https://github.com/gnustep/libs-base
Source: https://github.com/gnustep/libs-base/releases/download/base-1_31_0/%{name}-%{version}.tar.gz
Source1: %{name}.rpmlintrc
BuildRequires: fdupes
BuildRequires: clang
BuildRequires: llvm-gold
BuildRequires: lld
BuildRequires: gnustep-make
BuildRequires: libobjc2-devel
BuildRequires: libffi-devel
BuildRequires: libicu-devel
BuildRequires: libgnutls-devel
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: avahi-compat-mDNSResponder-devel
BuildRequires: zlib-devel
BuildRequires: libcurl-devel
BuildRequires: libdispatch-devel
Requires: gnustep-make
%description
The GNUstep Base Library is a library of general-purpose,
non-graphical Objective C classes, inspired by the
OpenStep API but implementing Apple and GNU additions to the API
as well.
%package -n libgnustep-base1_31
Summary: GNUstep Base library package
Group: System/Libraries
%description -n libgnustep-base1_31
The GNUstep Base Library is a library of general-purpose,
non-graphical Objective C classes, inspired by the
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.
%package devel
Summary: Devel package for the GNUstep Base Library
Group: Development/Libraries/C and C++
Requires: libgnustep-base1_31 = %{version}
Requires: %{name} = %{version}
%description devel
This package contains include files for developing applications
using the GNUstep Base Library.
%prep
%autosetup
%build
. %{_sysconfdir}/GNUstep/GNUstep.conf
GNUSTEP_SH_EXPORT_ALL_VARIABLES="yes"
. %{_datadir}/GNUstep/Makefiles/GNUstep.sh
%configure --libdir=%{_libdir} --enable-ffi --with-installation-domain=SYSTEM
make %{?_smp_mflags}
%install
. %{_sysconfdir}/GNUstep/GNUstep.conf
GNUSTEP_SH_EXPORT_ALL_VARIABLES="yes"
. %{_datadir}/GNUstep/Makefiles/GNUstep.sh
make DESTDIR=%{buildroot} \
GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \
install
# There's a swp file in NSTimeZone for some reason.
# FIXME: this should probably be a patch
rm %{buildroot}%{_libdir}/GNUstep/Libraries/gnustep-base/Versions/1.31/Resources/NSTimeZones/.preferred_abbreviations.plist.swp
# Rename pl to pllist to fix naming conflict
mv %{buildroot}%{_bindir}/pl %{buildroot}%{_bindir}/pllist
# Create scripts to source GNUstep environment variables,
# and update cache of services and applications, on user login.
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
cat > %{buildroot}%{_sysconfdir}/profile.d/GNUstep-start.sh << "EOF"
#!/bin/sh
. %{_sysconfdir}/GNUstep/GNUstep.conf
if [ -d ${HOME}/${GNUSTEP_USER_DIR} ]
then
# Run 'make_services' in background if possible. We run it in a subshell;
# otherwise, shells with job control (like bash) output an annoying
# message when make_services is done, while we want it to happen silently.
[ -x "${GNUSTEP_SYSTEM_TOOLS}/make_services" ] \
&& ("${GNUSTEP_SYSTEM_TOOLS}/make_services" &)
fi
EOF
chmod 755 %{buildroot}%{_sysconfdir}/profile.d/GNUstep-start.sh
%fdupes -s %{buildroot}
%post -n libgnustep-base1_31 -p /sbin/ldconfig
%postun -n libgnustep-base1_31 -p /sbin/ldconfig
%files
%license COPYING COPYING.LIB
%doc ANNOUNCE ChangeLog NEWS README.md
%{_bindir}/HTMLLinker
%{_bindir}/autogsdoc
%{_bindir}/classes
%{_bindir}/cvtenc
%{_bindir}/defaults
%{_bindir}/gdnc
%{_bindir}/gdomap
%{_bindir}/gspath
%{_bindir}/make_strings
%{_bindir}/pl2link
%{_bindir}/pldes
%{_bindir}/plget
%{_bindir}/pllist
%{_bindir}/plmerge
%{_bindir}/plparse
%{_bindir}/plser
%{_bindir}/plutil
%{_bindir}/sfparse
%{_bindir}/xmlparse
%{_libdir}/GNUstep
%{_datadir}/GNUstep/Makefiles
%{_mandir}/man1/HTMLLinker.1%{?ext_man}
%{_mandir}/man1/autogsdoc.1%{?ext_man}
%{_mandir}/man1/cvtenc.1%{?ext_man}
%{_mandir}/man1/defaults.1%{?ext_man}
%{_mandir}/man1/gdnc.1%{?ext_man}
%{_mandir}/man1/gspath.1%{?ext_man}
%{_mandir}/man1/make_strings.1%{?ext_man}
%{_mandir}/man1/pldes.1%{?ext_man}
%{_mandir}/man1/sfparse.1%{?ext_man}
%{_mandir}/man1/xmlparse.1%{?ext_man}
%{_mandir}/man1/plutil.1%{?ext_man}
%{_mandir}/man8/gdomap.8%{?ext_man}
%config(noreplace) %{_sysconfdir}/profile.d/GNUstep-start.sh
%files -n libgnustep-base1_31
%{_libdir}/libgnustep-base.so.*
%files devel
%{_includedir}/*
%{_libdir}/libgnustep-base.so
%{_libdir}/pkgconfig/gnustep-base.pc
%changelog