File edje.spec of Package edje

#
# spec file for package edje
#
# Copyright (c) 2013 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:           edje
Version:        1.7.8
Release:        0
Summary:        Abstract GUI layout and animation object library
License:        BSD-2-Clause and GPL-2.0
Group:          Development/Libraries/C and C++
Url:            http://www.enlightenment.org
Source:         %{name}-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  doxygen
BuildRequires:  ecore-devel >= %{version}
BuildRequires:  eet-devel >= %{version}
BuildRequires:  eina-devel >= %{version}
BuildRequires:  eio-devel >= %{version}
BuildRequires:  embryo-devel >= %{version}
BuildRequires:  evas-devel >= %{version}
%if 0%{?suse_version}
BuildRequires:  fdupes
%endif
BuildRequires:  fontconfig-devel
BuildRequires:  freetype2-devel
BuildRequires:  lua-devel
BuildRequires:  pkgconfig
BuildRequires:  python >= 2.5
Requires:       edje-utils = %version
Requires:       embryo

%description
Abstract GUI layout and animation object library. Part of Enlightenment Foundation Libraries.

%package -n libedje1
Summary:        Edje Dynamic Libraries
Group:          System/Libraries

%description -n libedje1
Headers, static libraries, test programs and documentation for edje

%package devel
Summary:        Edje headers, static libraries, documentation and test programs
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       edje-utils = %{version}
Requires:       libedje1 = %{version}
%if 0%{?suse_version} > 1210
Requires:       lua51-devel
%else
Requires:       lua-devel < 5.2
%endif
Requires:       ecore-devel >= %{version}
Requires:       eet-devel >= %{version}
Requires:       eina-devel >= %{version}
Requires:       embryo-devel >= %{version}
Requires:       evas-devel >= %{version}

%description devel
Headers, static libraries, test programs and documentation for eina

%package utils
Summary:        Edje utils script to convert import from gimp and inkscape
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       python >= 2.5

%description utils
Edje utils script to convert import from gimp and inkscape. Part of edje library.

%package doc-html
Summary:        HTML documentation of Edje
Group:          Documentation/HTML

%description doc-html
Documentation of Edje library in form of HTML pages.

%package examples
Summary:        Examples of Edje usage
Group:          Documentation/Man

%description examples
Examples of usage of Edje library.

%prep
%setup -q

%build
%configure --disable-static --disable-silent-rules --enable-install-examples --enable-edje-watch
make %{?_smp_mflags}
make doc

%install
make install DESTDIR="%buildroot"

# copy documentation manually
echo "Copying HTML documentation"
mkdir -p %{buildroot}%{_docdir}/%{name}
/bin/cp -vr doc/html %{buildroot}%{_docdir}/%{name}
# fix line endings
find %{buildroot}%{_docdir} -name '*.eps' | xargs sed -i 's@\r@\n@g'
# remove duplicates
%if 0%{?suse_version}
%fdupes -s %{buildroot}%{_docdir}
%fdupes -s %{buildroot}%{_mandir}
%endif

find %{buildroot}%{_libdir} -name '*.la' -exec rm -v {} \;

%post -n libedje1 -p /sbin/ldconfig

%postun -n libedje1 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_bindir}/edje_*
%{_datadir}/mime/packages/edje.xml
%dir %{_libdir}/edje
%dir %{_datadir}/edje
%{_datadir}/edje/include

%files -n libedje1
%defattr(-, root, root)
%{_libdir}/libedje.so.1*

%files devel
%defattr(-, root, root)
%{_includedir}/edje-1/
%{_libdir}/pkgconfig/edje.pc
%{_libdir}/libedje.so

%files utils
%defattr(-,root,root)
%{_bindir}/inkscape2edc
%{_libdir}/edje/utils

%files doc-html
%defattr(-, root, root)
%{_docdir}/%{name}

%files examples
%defattr(-, root, root)
%{_datadir}/%{name}/examples

%changelog
openSUSE Build Service is sponsored by