File slang.spec of Package slang
#
# spec file for package slang
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# 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/
#
Name: slang
Version: 2.2.4
Release: 0
Summary: Programming Library and Embeddable Extansion Language
License: GPL-2.0+
Group: System/Libraries
Url: http://www.jedsoft.org/
Source: ftp://space.mit.edu/pub/davis/slang/v2.2/slang-%{version}.tar.bz2
Source2: baselibs.conf
Patch0: slang.patch
Patch1: slang-autoconf.patch
Patch2: slang-fsuid.patch
Patch3: slang-2.2.2-makefile.patch
Patch4: slang-libpng12-linker-flag.patch
%if 0%{?suse_version} >= 1210
BuildRequires: oniguruma-devel >= 5.9.0
%endif
BuildRequires: pcre-devel
%if 0%{?suse_version} > 1120
BuildRequires: libpng12-devel
%else
BuildRequires: libpng-devel
%endif
BuildRequires: automake
BuildRequires: pkgconfig
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
S-Lang is a multi-platform programming library designed to allow a developer to
create robust multi-platform software. It provides facilities required by
interactive applications such as display/screen management, keyboard input,
keymaps etc. Another major feature of the library is the interpreter for the
S-Lang extension language which can be embedded into an application to make it
extensible. With slsh a standalone interpreter is available as well.
%package slsh
Summary: Interpreter for S-Lang Scripts
Group: Development/Languages/Other
Provides: slang = %version
Obsoletes: slang <= 2.1.1
# bug437293
%ifarch ppc64
Obsoletes: slang-64bit
%endif
#
%description slsh
slsh is a standalone interpreter of the S-Lang language. It can be used to
execute scripts or interactively.
%package -n libslang2
Summary: Programming Library and Embeddable Extension Language
Group: System/Libraries
%description -n libslang2
S-Lang is a multi-platform programming library designed to allow a developer to
create robust multi-platform software. It provides facilities required by
interactive applications such as display/screen management, keyboard input,
keymaps etc. Another major feature of the library is the interpreter for the
S-Lang extension language which can be embedded into an application to make it
extensible. With slsh a standalone interpreter is available as well.
%package devel
Summary: Programming Library and Embeddable Extension Language - Development Package
Group: Development/Languages/C and C++
Requires: libslang2 = %{version}
Provides: slang:/usr/include/slang.h
# bug437293
%ifarch ppc64
Obsoletes: slang-devel-64bit
%endif
#
%description devel
S-Lang is a multi-platform programming library designed to allow a developer to
create robust multi-platform software. It provides facilities required by
interactive applications such as display/screen management, keyboard input,
keymaps etc. Another major feature of the library is the interpreter for the
S-Lang extension language which can be embedded into an application to make it
extensible. With slsh a standalone interpreter is available as well.
This package contains all necessary include files and libraries needed to
develop applications that require it.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
#%%patch3 -p1
%patch4 -p1
%build
mv autoconf/configure.ac .
mv autoconf/aclocal.m4 autoconf/acinclude.m4
#autoheader -I autoconf
aclocal -I autoconf --output=autoconf/aclocal.m4
autoconf -I autoconf
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fstack-protector"
export ELF_CFLAGS="$CFLAGS"
%configure \
--docdir=%{_datadir}/doc/packages/slang-devel \
--with-pcre \
--with-pnginc=/usr/include/libpng12 \
--with-pnglib=/usr/lib \
--with-z
# --with-onig
# parallel make still broken in 2.2.2
make
make static
%install
%makeinstall install-static
rm -rf %{buildroot}%{_datadir}/doc/
%check
make check
%post -n libslang2 -p /sbin/ldconfig
%postun -n libslang2 -p /sbin/ldconfig
%files slsh
%defattr(-,root,root)
%doc COPYING slsh/README
%doc slsh/doc/html/
%config(noreplace) %{_sysconfdir}/slsh.rc
%{_bindir}/slsh
%{_libdir}/slang/
%{_datadir}/slsh/
%{_mandir}/man1/slsh.1*
%files -n libslang2
%defattr(-,root,root)
%{_libdir}/libslang.so.*
%files devel
%defattr(-,root,root)
%doc changes.txt COPYING NEWS README UPGRADE.txt demo/ examples/
%doc doc/grammar.txt doc/text/
%{_includedir}/*
%{_libdir}/pkgconfig/slang.pc
%{_libdir}/libslang.a
%{_libdir}/libslang.so
%changelog