Blame SPECS/compat-guile18.spec

90e274
%bcond_without emacs
90e274
%global mver 1.8
90e274
90e274
Summary: A GNU implementation of Scheme for application extensibility
90e274
Name: compat-guile18
90e274
Version: %{mver}.8
90e274
Release: 22%{?dist}
90e274
Source: ftp://ftp.gnu.org/pub/gnu/guile/guile-%{version}.tar.gz
90e274
URL: http://www.gnu.org/software/guile/
90e274
Patch1: guile-1.8.7-multilib.patch
90e274
Patch2: guile-1.8.7-testsuite.patch
90e274
Patch3: guile-1.8.8-deplibs.patch
90e274
Patch4: guile-1.8.8-cve-2016-8605.patch
90e274
License: LGPLv2+
90e274
Group: Development/Languages
90e274
BuildRequires: libtool libtool-ltdl-devel gmp-devel readline-devel
90e274
BuildRequires: gettext-devel
90e274
%{?with_emacs:BuildRequires: emacs}
90e274
Provides: guile = 5:%{version}-7
90e274
Provides: guile%{?_isa} = 5:%{version}-7
90e274
Obsoletes: guile < 5:%{version}-7
90e274
90e274
%description
90e274
GUILE (GNU's Ubiquitous Intelligent Language for Extension) is a library
90e274
implementation of the Scheme programming language, written in C.  GUILE
90e274
provides a machine-independent execution platform that can be linked in
90e274
as a library during the building of extensible programs.
90e274
90e274
Install the compat-guile18 package if you'd like to add extensibility to
90e274
programs that you are developing.
90e274
90e274
%package devel
90e274
Summary: Libraries and header files for the GUILE extensibility library
90e274
Group: Development/Libraries
90e274
Requires: %{name}%{?_isa} = %{version}-%{release} gmp-devel
90e274
Requires: pkgconfig
90e274
Provides: guile-devel = 5:%{version}-7
90e274
Provides: guile-devel%{?_isa} = 5:%{version}-7
90e274
Obsoletes: guile-devel < 5:%{version}-7
90e274
Obsoletes: guile-devel%{?_isa} < 5:%{version}-7
90e274
90e274
%description devel
90e274
The compat-guile18-devel package includes the libraries, header files, etc.,
90e274
that you'll need to develop applications that are linked with the
90e274
GUILE extensibility library.
90e274
90e274
You need to install the compat-guile18-devel package if you want to develop
90e274
applications that will be linked to GUILE.  You'll also need to install the
90e274
compat-guile18 package.
90e274
90e274
%prep
90e274
%setup -q -n guile-%{version}
90e274
90e274
%patch1 -p1 -b .multilib
90e274
%patch2 -p1 -b .testsuite
90e274
%patch3 -p1 -b .deplibs
90e274
%patch4 -p1 -b .cve-2016-8605
90e274
90e274
%build
90e274
90e274
export CFLAGS="$RPM_OPT_FLAGS -fwrapv"
90e274
export LDFLAGS="$RPM_LD_FLAGS -Wl,--as-needed"
90e274
%configure --disable-static --disable-error-on-warning
90e274
90e274
# Remove RPATH
90e274
sed -i 's|" $sys_lib_dlsearch_path "|" $sys_lib_dlsearch_path %{_libdir} "|' \
90e274
    {,guile-readline/}libtool
90e274
90e274
make %{?_smp_mflags}
90e274
90e274
%install
90e274
make DESTDIR=$RPM_BUILD_ROOT install
90e274
90e274
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/guile/site
90e274
90e274
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libguile*.la
90e274
90e274
# Necessary renaming and removing
90e274
rm -rf ${RPM_BUILD_ROOT}%{_infodir}
90e274
mv ${RPM_BUILD_ROOT}%{_bindir}/guile{,%{mver}}
90e274
mv ${RPM_BUILD_ROOT}%{_bindir}/guile{,%{mver}}-tools
90e274
mv ${RPM_BUILD_ROOT}%{_mandir}/man1/guile{,%{mver}}.1
90e274
mv ${RPM_BUILD_ROOT}%{_bindir}/guile{,%{mver}}-config
90e274
mv ${RPM_BUILD_ROOT}%{_bindir}/guile{,%{mver}}-snarf
90e274
mv ${RPM_BUILD_ROOT}%{_datadir}/aclocal/guile{,%{mver}}.m4
90e274
sed -i -e 's|/usr/bin/guile|/usr/bin/guile%{mver}|' \
90e274
    ${RPM_BUILD_ROOT}%{_bindir}/guile%{mver}-config
90e274
sed -i -e 's|guile-tools|guile%{mver}-tools|g' \
90e274
    ${RPM_BUILD_ROOT}%{_bindir}/guile%{mver}-tools
90e274
sed -i -e 's|guile-snarf|guile%{mver}-snarf|g' \
90e274
    ${RPM_BUILD_ROOT}%{_bindir}/guile%{mver}-snarf
90e274
90e274
ac=${RPM_BUILD_ROOT}%{_datadir}/aclocal/guile%{mver}.m4
90e274
sed -i -e 's|,guile|,guile%{mver}|g' $ac
90e274
sed -i -e 's|guile-tools|guile%{mver}-tools|g' $ac
90e274
sed -i -e 's|guile-config|guile%{mver}-config|g' $ac
90e274
sed -i -e 's|GUILE_PROGS|GUILE1_8_PROGS|g' $ac
90e274
sed -i -e 's|GUILE_FLAGS|GUILE1_8_FLAGS|g' $ac
90e274
sed -i -e 's|GUILE_SITE_DIR|GUILE1_8_SITE_DIR|g' $ac
90e274
sed -i -e 's|GUILE_CHECK|GUILE1_8_CHECK|g' $ac
90e274
sed -i -e 's|GUILE_MODULE_CHECK|GUILE1_8_MODULE_CHECK|g' $ac
90e274
sed -i -e 's|GUILE_MODULE_AVAILABLE|GUILE1_8_MODULE_AVAILABLE|g' $ac
90e274
sed -i -e 's|GUILE_MODULE_REQUIRED|GUILE1_8_MODULE_REQUIRED|g' $ac
90e274
sed -i -e 's|GUILE_MODULE_EXPORTS|GUILE1_8_MODULE_EXPORTS|g' $ac
90e274
sed -i -e 's|GUILE_MODULE_REQUIRED_EXPORT|GUILE1_8_MODULE_REQUIRED_EXPORT|g' $ac
90e274
90e274
# Compress large documentation
90e274
bzip2 NEWS
90e274
90e274
touch $RPM_BUILD_ROOT%{_datadir}/guile/%{mver}/slibcat
90e274
ln -s ../../slib $RPM_BUILD_ROOT%{_datadir}/guile/%{mver}/slib
90e274
90e274
%check
90e274
make %{?_smp_mflags} check
90e274
90e274
%post -p /sbin/ldconfig
90e274
90e274
%postun -p /sbin/ldconfig
90e274
90e274
%triggerin -- slib
90e274
# Remove files created in guile < 1.8.3-2
90e274
rm -f %{_datadir}/guile/site/slib{,cat}
90e274
90e274
ln -sfT ../../slib %{_datadir}/guile/%{mver}/slib
90e274
rm -f %{_datadir}/guile/%{mver}/slibcat
90e274
export SCHEME_LIBRARY_PATH=%{_datadir}/slib/
90e274
90e274
# Build SLIB catalog
90e274
for pre in \
90e274
    "(use-modules (ice-9 slib))" \
90e274
    "(load \"%{_datadir}/slib/guile.init\")"
90e274
do
90e274
    %{_bindir}/guile%{mver} -c "$pre
90e274
        (set! implementation-vicinity (lambda ()
90e274
        \"%{_datadir}/guile/%{mver}/\"))
90e274
        (require 'new-catalog)" &> /dev/null && break
90e274
    rm -f %{_datadir}/guile/%{mver}/slibcat
90e274
done
90e274
:
90e274
90e274
%triggerun -- slib
90e274
if [ "$2" = 0 ]; then
90e274
    rm -f %{_datadir}/guile/%{mver}/slib{,cat}
90e274
fi
90e274
90e274
%files
90e274
%doc AUTHORS COPYING* ChangeLog HACKING NEWS.bz2 README THANKS
90e274
%{_bindir}/guile%{mver}
90e274
%{_bindir}/guile%{mver}-tools
90e274
%{_libdir}/libguile*.so.*
90e274
# The following unversioned libraries are needed in runtime
90e274
%{_libdir}/libguilereadline-*.so
90e274
%{_libdir}/libguile-srfi-srfi-*.so
90e274
%dir %{_datadir}/guile
90e274
%dir %{_datadir}/guile/%{mver}
90e274
%{_datadir}/guile/%{mver}/ice-9
90e274
%{_datadir}/guile/%{mver}/lang
90e274
%{_datadir}/guile/%{mver}/oop
90e274
%{_datadir}/guile/%{mver}/scripts
90e274
%{_datadir}/guile/%{mver}/srfi
90e274
%{_datadir}/guile/%{mver}/guile-procedures.txt
90e274
%ghost %{_datadir}/guile/%{mver}/slibcat
90e274
%ghost %{_datadir}/guile/%{mver}/slib
90e274
%dir %{_datadir}/guile/site
90e274
%if %{with emacs}
90e274
%dir %{_datadir}/emacs/site-lisp
90e274
%{_datadir}/emacs/site-lisp/*.el
90e274
%endif
90e274
%{_mandir}/man1/guile%{mver}.1*
90e274
90e274
%files devel
90e274
%{_bindir}/guile%{mver}-config
90e274
%{_bindir}/guile%{mver}-snarf
90e274
%{_datadir}/aclocal/*
90e274
%{_libdir}/libguile.so
90e274
%{_libdir}/pkgconfig/*.pc
90e274
%{_includedir}/guile
90e274
%{_includedir}/libguile
90e274
%{_includedir}/libguile.h
90e274
90e274
%changelog
90e274
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.8-22
90e274
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
90e274
90e274
* Thu Feb  1 2018 Florian Weimer <fweimer@redhat.com> - 1.8.8-21
90e274
- Use LDFLAGS from redhat-rpm-config
90e274
90e274
* Mon Jan 29 2018 Miroslav Lichvar <mlichvar@redhat.com> - 1.8.8-20
90e274
- Remove incorrect arch-specific Obsoletes (#1537209)
90e274
90e274
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 1.8.8-19
90e274
- Rebuilt for switch to libxcrypt
90e274
90e274
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.8-18
90e274
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
90e274
90e274
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.8-17
90e274
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
90e274
90e274
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.8-16
90e274
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
90e274
90e274
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.8.8-15
90e274
- Rebuild for readline 7.x
90e274
90e274
* Wed Oct 12 2016 Miroslav Lichvar <mlichvar@redhat.com> - 1.8.8-14
90e274
- Remove thread-unsafe umask modification in mkdir (CVE-2016-8605)
90e274
90e274
* Wed Feb 17 2016 Miroslav Lichvar <mlichvar@redhat.com> - 1.8.8-13
90e274
- Add -fwrapv to CFLAGS (#1307394)
90e274
90e274
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.8-12
90e274
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
90e274
90e274
* Wed Jul 15 2015 Miroslav Lichvar <mlichvar@redhat.com> - 1.8.8-11
90e274
- Fix building with new glibc (#1239406)
90e274
90e274
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.8-10
90e274
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
90e274
90e274
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.8-9
90e274
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
90e274
90e274
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.8-8
90e274
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
90e274
90e274
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.8-7
90e274
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
90e274
90e274
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.8-6
90e274
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
90e274
90e274
* Mon Jan 21 2013 Jan Synáček <jsynacek@redhat.com> - 1.8.8-5
90e274
- Add additional Provides and Obsoletes with %%{?_isa} to fix upgrade path
90e274
90e274
* Fri Jan 18 2013 Jan Synáček <jsynacek@redhat.com> - 1.8.8-4
90e274
- Bump Provides/Obsoletes by a release
90e274
- Add Provides/Obsoletes to -devel package as well
90e274
- Add a comment about unversion libraries
90e274
- Fix mixed tabs/spaces (remove tabs)
90e274
90e274
* Thu Jan 17 2013 Jan Synáček <jsynacek@redhat.com> - 5:1.8.8-3
90e274
- Move .so files back to the main package (needed in runtime)
90e274
90e274
* Thu Jan 17 2013 Jan Synáček <jsynacek@redhat.com> - 5:1.8.8-2
90e274
- Move unversioned .so files to -devel package
90e274
- Remove unnecessary %%clear
90e274
- Use %%global instead of %%define
90e274
- Remove unnecessary (compatible) licenses
90e274
- Fix %%post onliner
90e274
- Compile with --as-needed
90e274
- Add _isa flag where appropriate
90e274
- Correctly specify Provides and Obsoletes
90e274
- Rename to guile-compat18
90e274
90e274
* Fri Oct 19 2012 Jan Synáček <jsynacek@redhat.com> - 5:1.8.8-1
90e274
- Make compat-package