File libt3highlight.spec of Package libt3highlight
#
# spec file for package libt3highlight
#
# Copyright (c) 2010 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
%define debug_package %{nil}
Name: libt3highlight
Version: 0.4.2
Release: 1
Summary: Syntax highlighting library
Group: Development/Libraries/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
License: GPL-3.0-only
URL: http://os.ghalkes.nl/t3/libt3highlight.html
Source0: http://os.ghalkes.nl/dist/libt3highlight-0.4.2.tar.bz2
BuildRequires: libtool, gettext, libt3config-devel >= 0.2.5
%if 0%{?suse_version}
BuildRequires: pkg-config, pcre-devel
%endif
%if 0%{?mdkversion}
BuildRequires: pkgconfig, libpcre-devel
%endif
%if 0%{?fedora}%{?rhel_version}%{?centos_version}%{?rhel}
BuildRequires: pkgconfig, pcre-devel
%endif
%description
libt3highlight is a library that provides functions for syntax highlighting
different types of text files.
%package -n %{name}2
Summary: Syntax highlighting library
Group: Development/Libraries/C and C++
%description -n %{name}2
libt3highlight is a library that provides functions for syntax highlighting
different types of text files.
%package devel
Group: Development/Libraries/C and C++
Summary: Development files for %{name}
Requires: %{name}2 = %{version}-%{release}, libt3config-devel >= 0.2.5
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package utils
Group: System/Base
Summary: The t3highlight program
%description utils
The %{name}-utils package contains the t3highlight program.
%prep
%setup -q
%build
./configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}2 --mandir=%{_mandir} --dump-log
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
find %{buildroot} '(' -name '*.la' -o -name '*.a' ')' -exec rm -f {} ';'
install -d %{buildroot}/%{_docdir}/%{name}-dev
cp %{buildroot}/%{_docdir}/%{name}2/COPYING %{buildroot}/%{_docdir}/%{name}-dev/
%if 0%{?fedora}%{?rhel_version}%{?centos_version}%{?rhel}
find %{buildroot}/%{_libdir} -type f -name '*.so.*' | xargs chmod +x
%endif
%clean
rm -rf %{buildroot}
%post -n %{name}2 -p /sbin/ldconfig
%postun -n %{name}2 -p /sbin/ldconfig
%files -n %{name}2
%defattr(-, root, root, -)
%{_libdir}/*.so.*
%{_datadir}/%{name}2
%docdir %{_docdir}/%{name}2
%{_docdir}/%{name}2
%files devel
%defattr(-, root, root, -)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{name}.pc
%docdir %{_docdir}/%{name}-dev
%{_docdir}/%{name}-dev
%files utils
%defattr(-, root, root, -)
%{_bindir}/*
%{_mandir}/man1/*