File embryo.spec of Package embryo
#
# spec file for package embryo
#
# 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: embryo
Version: 1.7.8
Release: 0
Summary: Small Pawn based virtual machine and compiler
License: BSD-2-Clause and Zlib
Group: Development/Tools/Building
Url: http://enlightenment.org/
Source: %{name}-%{version}.tar.bz2
BuildRequires: doxygen
BuildRequires: eina-devel >= %version
%if 0%{?suse_version}
BuildRequires: fdupes
%endif
BuildRequires: pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Embryo is a tiny library designed to interpret limited small programs compiled
by the included compiler, embryo_cc. It is mostly a cleaned up and smaller
version of the original Small abstract machine. The compiler is mostly
untouched.
%package -n libembryo1
Summary: Embryo Dynamic Library
Group: System/Libraries
%description -n libembryo1
Main embryo dynamic library.
%package devel
Summary: Embryo development files
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: eina-devel >= %version
Requires: libembryo1 = %{version}
%description devel
Development files for embryo. Part of Enlightenment Foundation Libraries.
%package doc-html
Summary: HTML documentation of Embryo
Group: Documentation/HTML
%description doc-html
Documentation of Eet library in form of HTML pages.
%prep
%setup -q
%build
# fake time used for documentation
FAKE_DOCDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%a %%b %%d %%Y')
FAKE_DOCYEAR=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%Y')
FAKE_DOCDATETIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%a %%b %%d %%Y %T')
sed -i "s/\$datetime/$FAKE_DOCDATETIME/g;s/\$date/$FAKE_DOCDATE/g;s/\$year/$FAKEDOCYEAR/g" doc/*.html
%configure --disable-static --disable-silent-rules
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 permissions
find %{buildroot}%{_docdir} -type f | xargs chmod 0644
find %{buildroot}%{_docdir} -type d | xargs chmod 0755
# remove duplicates
%if 0%{?suse_version}
%fdupes -s %{buildroot}%{_docdir}
%endif
find %{buildroot}%{_libdir} -name '*.la' -exec rm -v {} \;
%clean
%{?buildroot:rm -rf %{buildroot}}
%post -n libembryo1 -p /sbin/ldconfig
%postun -n libembryo1 -p /sbin/ldconfig
%files
%defattr(-, root, root)
%{_bindir}/embryo_cc
%{_datadir}/embryo/
%files -n libembryo1
%defattr(-,root,root)
%{_libdir}/libembryo.so.1*
%files devel
%defattr(-, root, root)
%{_includedir}/embryo-1/
%{_libdir}/libembryo.so
%{_libdir}/pkgconfig/embryo.pc
%files doc-html
%defattr(-, root, root)
%{_docdir}/%{name}
%changelog