- Add patch to add some linker hardening:
* foma-harden-build.patch - Update to version 0.9.18+git20180511.bad2f09: * Various small fixes OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/foma?expand=0&rev=7
This commit is contained in:
committed by
Git OBS Bridge
parent
1fe21dadf6
commit
a75cfdb483
25
foma.spec
25
foma.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package foma
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -12,21 +12,23 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define libname libfoma0
|
||||
Name: foma
|
||||
Version: 0.9.18+git20170507.07bb944
|
||||
Version: 0.9.18+git20180511.bad2f09
|
||||
Release: 0
|
||||
Summary: Finite-state compiler and C library
|
||||
License: Apache-2.0
|
||||
Group: Productivity/Text/Utilities
|
||||
Url: https://fomafst.github.io/
|
||||
URL: https://fomafst.github.io/
|
||||
# Source must be from git tarball has different license than git, no idea why
|
||||
Source0: foma-%{version}.tar.xz
|
||||
BuildRequires: flex bison
|
||||
Patch0: foma-harden-build.patch
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: readline-devel
|
||||
@@ -61,12 +63,14 @@ Finite-state C library development files and headers for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}/%{name}
|
||||
%patch0 -p2
|
||||
sed -i '/^CFLAGS/c\CFLAGS = %{optflags} -Wl,--as-needed -D_GNU_SOURCE -std=c99 -fvisibility=hidden -fPIC' Makefile
|
||||
sed -i '/^LDFLAGS/c\LDFLAGS = -lreadline -lz -lreadline -fpic' Makefile
|
||||
sed -i '/^FLOOKUPLDFLAGS/c\FLOOKUPLDFLAGS = libfoma.a -lz -fpic' Makefile
|
||||
|
||||
%build
|
||||
# hand written Makefile that gets to be quite PITA
|
||||
make -j1 \
|
||||
CFLAGS="%{optflags} -D_GNU_SOURCE -std=c99 -fPIC" \
|
||||
LDFLAGS="-lreadline -lz"
|
||||
make -j1
|
||||
|
||||
%install
|
||||
%make_install \
|
||||
@@ -78,20 +82,17 @@ rm -rf %{buildroot}%{_libdir}/*.a
|
||||
%postun -n %{libname} -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc COPYING
|
||||
%{_bindir}/cgflookup
|
||||
%{_bindir}/flookup
|
||||
%{_bindir}/foma
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{_includedir}/fomalib.h
|
||||
%{_includedir}/fomalibconf.h
|
||||
%{_libdir}/libfoma.so
|
||||
|
||||
%files -n %{libname}
|
||||
%defattr(-,root,root)
|
||||
%license COPYING
|
||||
%{_libdir}/libfoma.so.*
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user