%define build_compat_lib 0 %define majversion %(echo %version | cut -d. -f 1-2) Name: libslang Version: 2.2.4 Release: 2mamba Summary: The shared library for the S-Lang extension language Group: System/Libraries Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.s-lang.org Source0: ftp://ftp.fu-berlin.de/pub/unix/misc/slang/v%{majversion}/slang-%{version}.tar.bz2 Source1: ftp://ftp.fu-berlin.de/pub/unix/misc/slang/v1.4/slang-1.4.9.tar.gz Source2: %{name}-README.UTF-8 Patch0: %{name}-1.4.9-gcc4.patch Patch1: %{name}-1.4.9-suse.patch Patch2: %{name}-1.4.9-autoconf.patch Patch3: %{name}-1.4.9-fsuid.patch Patch4: %{name}-1.4.9-debian-utf8.patch Patch5: %{name}-1.4.9-utf8-acs.patch Patch6: %{name}-1.4.9-utf8-fix.patch Patch10: %{name}-2.0.5-makefile.patch Patch11: %{name}-2.0.5-SLutf8_enable.patch Patch12: %{name}-2.0.5-nointerlibc2.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel ## AUTOBUILDREQ-END BuildRequires: libpcre-devel >= 6.3 BuildRequires: libpng-devel >= 1.2.8 BuildRequires: libonig-devel BuildRoot: %{_tmppath}/%{name}-%{version}-root Obsoletes: libslang1 %description S-Lang is an interpreted language and a programming library. The S-Lang language was designed so that it can be easily embedded into a program to provide the program with a powerful extension language. The S-Lang library, provided in this package, provides the S-Lang extension language. S-Lang's syntax resembles C, which makes it easy to recode S-Lang procedures in C if you need to. %package -n slang Summary: S-Lang is an interpreted language and a programming library. Group: Applications/Development Requires: %{name} = %{version}-%{release} %description -n slang S-Lang is an interpreted language and a programming library. The S-Lang language was designed so that it can be easily embedded into a program to provide the program with a powerful extension language. The S-Lang library, provided in this package, provides the S-Lang extension language. S-Lang's syntax resembles C, which makes it easy to recode S-Lang procedures in C if you need to. %if %{build_compat_lib} %package -n %{name}1 Summary: The shared library for the S-Lang extension language Group: System/Libraries %description -n %{name}1 S-Lang is an interpreted language and a programming library. The S-Lang language was designed so that it can be easily embedded into a program to provide the program with a powerful extension language. The S-Lang library, provided in this package, provides the S-Lang extension language. This package contains the the shared libraries libslang, version 1.4.9. %endif %package devel Summary: The static library and header files for development using S-Lang Group: Development/Libraries Requires: %{name} = %{version}-%{release} Obsoletes: libslang1-devel %description devel This package contains the S-Lang extension language static libraries and header files which you'll need if you want to develop S-Lang based applications. Documentation which may help you write S-Lang based applications is also included. Install the slang-devel package if you want to develop applications based on the S-Lang extension language. %prep %setup -q -n slang-%{version} -a1 #%patch10 -p1 -b .makefile #%patch11 -p1 -b .SLutf8_enable #%patch12 -p1 -b .nointerlibc2 %if %{build_compat_lib} cd slang-1.4.9 %patch0 -p1 -b .gcc4 #%patch1 -p1 -b .suse #%patch2 -p1 -b .autoconf #%patch3 -p1 -b .fsuid #%patch4 -p1 -b .debian-utf8 #%patch5 -p1 -b .utf8-acs #%patch6 -p1 -b .utf8-fix # #cp -a %{S:2} ./README.UTF-8 # #mv autoconf/configure.in . #mv autoconf/aclocal.m4 autoconf/acinclude.m4 # #autoheader -I autoconf #aclocal -I autoconf --output=autoconf/aclocal.m4 #autoconf -I autoconf cd .. %endif %build perl -p -i -e \ 's/(ELF_CFLAGS=\"[^\"]*)-O2([^\"]*\".*)/$1'"$RPM_OPT_FLAGS"' $2/gs' \ configure %configure \ --includedir=%{_includedir}/slang %make all %if %{build_compat_lib} cd slang-1.4.9 ./configure --prefix=%{_prefix} --libdir=%{_libdir} --enable-wide-chars %make -j1 %make -j1 elf cd .. %endif %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" install -d %{buildroot}%{_includedir}/slang %makeinstall \ install_lib_dir=%{_libdir} \ install_include_dir=%{_includedir}/slang #ln -sf libslang.so.%{version} %{buildroot}%{_libdir}/libslang.so.2 #ln -sf libslang.so.%{version} %{buildroot}%{_libdir}/libslang-utf8.so #ln -sf libslang.a %{buildroot}%{_libdir}/libslang-utf8.a %if %{build_compat_lib} cp slang-1.4.9/src/elfobjs/libslang.so.1.4.9 \ %{buildroot}%{_libdir}/libslang.so.1.4.9 ln -sf /libslang.so.1.4.9 %{buildroot}%{_libdir}//libslang.so.1 %endif chmod 755 %{buildroot}%{_libdir}/*.so.* %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %if %{build_compat_lib} %post -n %{name}1 -p /sbin/ldconfig %postun -n %{name}1 -p /sbin/ldconfig %endif %files -n slang %defattr(-,root,root) %config %{_sysconfdir}/slsh.rc %{_bindir}/slsh %{_datadir}/slsh/* %{_mandir}/man1/slsh.1* %files %defattr(-,root,root) %{_libdir}/*.so.* %{_libdir}/slang/v2/modules/*-module.so %if %{build_compat_lib} %exclude %{_libdir}/libslang.so.1 %exclude %{_libdir}/libslang.so.1.4.9 %endif %doc COPYING %if %{build_compat_lib} %files -n %{name}1 %defattr(-,root,root) %{_libdir}/libslang.so.1 %{_libdir}/libslang.so.1.4.9 %endif %files devel %defattr(-,root,root) %{_includedir}/slang/*.h %{_libdir}/*.so %{_datadir}/doc/slang/v2/* %{_docdir}/slsh/html/slshfun*.html %{_libdir}/pkgconfig/slang.pc %doc doc README %changelog * Thu Jul 26 2012 Silvan Calarco 2.2.4-2mamba - rebuilt with --enable-wide-chars - build with libonig * Mon May 16 2011 Automatic Build System 2.2.4-1mamba - automatic update by autodist * Wed Feb 23 2011 Automatic Build System 2.2.3-1mamba - automatic update by autodist * Sun Apr 11 2010 Silvan Calarco 2.2.2-2mamba - removed broken libslang-utf8 library link * Tue Mar 23 2010 Silvan Calarco 2.2.2-1mamba - update to 2.2.2 * Tue Mar 23 2010 Silvan Calarco 2.1.4-2mamba - build requirements fixed - added slang subpackage * Fri Dec 12 2008 Silvan Calarco 2.1.4-1mamba - update to 2.1.4 * Sun May 18 2008 Silvan Calarco 2.0.7-1mamba - update to 2.0.7 - libslang1 legacy package: disabled and obsoleted * Tue Jan 31 2006 Davide Madrisan 2.0.5-1qilnx - update to version 2.0.5 by autospec - new compatiblity package libslang1 * Tue Jan 31 2006 Davide Madrisan 1.4.9-3qilnx - UTF-8 fixes * Mon Sep 12 2005 Davide Madrisan 1.4.9-2qilnx - specfile fixes and updates * Thu Apr 24 2003 Alessandro Ramazzina 1.4.9-1qilnx - creation of slang package