Blob Blame History Raw
Name: libcss
Version: 0.2.0
Release: 2%{?dist}
Summary: A CSS parser and selection engine

Group: System Environment/Libraries
License: MIT
URL: http://www.netsurf-browser.org/projects/libcss/
Source: http://download.netsurf-browser.org/libs/releases/%{name}-%{version}-src.tar.gz

BuildRequires: check-devel
BuildRequires: libparserutils-devel
BuildRequires: libwapcaplet-devel
BuildRequires: netsurf-buildsystem

Patch0: 0001-print-size_t-values-in-a-portable-way.patch

%description
LibCSS is a CSS (Cascading Style Sheet) parser and selection engine,
written in C. It was developed as part of the NetSurf project. For
further details, see README.

Features:
* Parses CSS, good and bad
* Simple C API
* Low memory usage
* Fast selection engine
* Portable

%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}

%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%global make_vars COMPONENT_TYPE=lib-shared PREFIX=%{_prefix} Q=
%global build_envvars CFLAGS='%{optflags}' LDFLAGS="$RPM_LD_FLAGS"

%prep
%setup -q -n %{name}-%{version}
%patch0 -p1

sed -i -e s@/lib/@/%{_lib}/@ -e s@/lib:@/%{_lib}:@ Makefile %{name}.pc.in

%build
%{build_envvars} make %{?_smp_mflags} %{make_vars}

%install
make install DESTDIR=%{buildroot} %{make_vars}

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%check
%{build_envvars} make %{?_smp_mflags} test %{make_vars}

%files
%doc COPYING README
%{_libdir}/%{name}.so.*

%files devel
%doc docs/*
%{_includedir}/%{name}
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

%changelog
* Wed Jan 08 2014 David Tardon <dtardon@redhat.com> - 0.2.0-2
- build with correct flags

* Wed Dec 25 2013 David Tardon <dtardon@redhat.com> - 0.2.0-1
- initial import