File scintilla.spec of Package scintilla
#
# spec file for package scintilla
#
# Copyright (c) 2011 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/
#
# norootforbuild
Name: scintilla
Summary: A free source code editing component
Version: 2.29
Release: 1
Group: Development/Libraries/C and C++
License: MIT
Url: http://www.scintilla.org
Source: %{name}229.tar.bz2
Patch0: %{name}-shared.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++ gtk2-devel libtool
%if 0%{?suse_version}
BuildRequires: fdupes
%endif
%description
Scintilla is a free source code editing component. It comes with
complete source code and a license that permits use in any free project
or commercial product.
As well as features found in standard text editing components,
Scintilla includes features especially useful when editing and
debugging source code. These include support for syntax styling, error
indicators, code completion and call tips. The selection margin can
contain markers like those used in debuggers to indicate breakpoints
and the current line. Styling choices are more open than with many
editors, allowing the use of proportional fonts, bold and italics,
multiple foreground and background colours and multiple fonts.
%package -n libscintilla2
License: MIT
Summary: A free source code editing component
Group: Development/Libraries/C and C++
%description -n libscintilla2
Scintilla is a free source code editing component. It comes with
complete source code and a license that permits use in any free project
or commercial product.
As well as features found in standard text editing components,
Scintilla includes features especially useful when editing and
debugging source code. These include support for syntax styling, error
indicators, code completion and call tips. The selection margin can
contain markers like those used in debuggers to indicate breakpoints
and the current line. Styling choices are more open than with many
editors, allowing the use of proportional fonts, bold and italics,
multiple foreground and background colours and multiple fonts.
%package -n libscintilla-devel
License: MIT
Group: Development/Libraries/C and C++
Requires: libscintilla2 = %{version}
Summary: A free source code editing component
%description -n libscintilla-devel
Scintilla is a free source code editing component. It comes with
complete source code and a license that permits use in any free project
or commercial product.
As well as features found in standard text editing components,
Scintilla includes features especially useful when editing and
debugging source code. These include support for syntax styling, error
indicators, code completion and call tips. The selection margin can
contain markers like those used in debuggers to indicate breakpoints
and the current line. Styling choices are more open than with many
editors, allowing the use of proportional fonts, bold and italics,
multiple foreground and background colours and multiple fonts.
%prep
%setup -n %{name}
%patch0
find . -name 'CVS' -type d -exec rm -rf \{\} \; 2> /dev/null || :
%build
cd gtk
make %{?jobs:-j%jobs} LIBDIR=%{_libdir} VERSION=`echo %{version} | sed 's|\.0*|:|'`
%install
mkdir -p %{buildroot}%{_includedir}/%{name}/src
mkdir -p %{buildroot}%{_libdir}
cp include/* %{buildroot}%{_includedir}/%{name}
cp src/*.h %{buildroot}%{_includedir}/%{name}/src
mkdir -p lib
libtool --mode=install install bin/*.la `pwd`/lib
install lib/*.so* %{buildroot}%{_libdir}
rm -f %{buildroot}%{_libdir}/libscintilla.so.2
rm -f %{buildroot}%{_libdir}/libscintilla.so
ln -sf libscintilla.so.2.0.`echo %{version} | sed 's|.*\.0*||'` %{buildroot}%{_libdir}/libscintilla.so.2
ln -sf libscintilla.so.2.0.`echo %{version} | sed 's|.*\.0*||'` %{buildroot}%{_libdir}/libscintilla.so
mkdir -p %{buildroot}/%{_defaultdocdir}
mv doc %{buildroot}/%{_defaultdocdir}/%{name}
cp License.txt %{buildroot}/%{_defaultdocdir}/%{name}
rmdir %{buildroot}%{_includedir}/%{name}/src || :
%if 0%{?suse_version}
%fdupes -s %{buildroot}/%{_defaultdocdir}/%{name}
%endif
find %{buildroot}
%clean
rm -rf %{buildroot}
%post -n libscintilla2 -p /sbin/ldconfig
%postun -n libscintilla2 -p /sbin/ldconfig
%files -n libscintilla2
%defattr(-,root,root)
%{_libdir}/*.so.*
%dir %{_defaultdocdir}/%{name}
%{_defaultdocdir}/%{name}/License.txt
%files -n libscintilla-devel
%defattr(-,root,root)
%{_libdir}/*.so
%dir %{_defaultdocdir}/%{name}
%{_defaultdocdir}/%{name}/*
%exclude %{_defaultdocdir}/%{name}/License.txt
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%changelog