File enlightenment.spec of Package enlightenment
#
# spec file for package enlightenment
#
# Copyright (c) 2015 SUSE LINUX 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/
#
%define efl_version 1.15.2
%define systemd_present (0%{?suse_version} >= 1230 || 0%{?fedora} >= 18)
%define enable_wayland (0%{?suse_version} >= 1320 && 0)
%define generate_manpages 0
Name: enlightenment
Version: 0.19.12
Release: 0
Summary: The window manager
License: BSD-2-Clause
Group: System/X11/Displaymanagers
Url: http://enlightenment.org/
Source: %{name}-%{version}.tar.xz
Source2: e17
Source3: sysactions.conf-oS12.2
Source4: sysactions.conf-systemd
# PATCH-FEATURE_OPENSUSE feature-network-manager-wizard.patch simon@simotek.net adds nm-applet to startup apps if its present,
# this will be maybe upstreamed when upstream network manager applet supports app indicator - (1.1.0)
Source5: network_manager_wizard.c
# PATCH-FIX-OPENSUSE - enlightenment-0.16.999.65256-dont_require_suidbit.patch sleep_walker@suse.cz -- upstream insist on having suidbit
Patch0: enlightenment-0.16.999.65256-dont_require_suidbit.patch
# PATCH-FEATURE-OPENSUSE dont_offer_updates.patch -- don't offer updates, that's up to package manager -- sleep_walker@suse.cz
Patch1: dont_offer_updates.patch
Patch2: %{name}-0.19.1-fix-bashisms.patch
BuildRequires: alsa-devel
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: doxygen
BuildRequires: edje >= %{efl_version}
BuildRequires: gettext-devel
BuildRequires: libtool
BuildRequires: pam-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(ecore) >= %{efl_version}
BuildRequires: pkgconfig(ecore-con) >= %{efl_version}
BuildRequires: pkgconfig(ecore-evas) >= %{efl_version}
BuildRequires: pkgconfig(ecore-file) >= %{efl_version}
BuildRequires: pkgconfig(ecore-ipc) >= %{efl_version}
BuildRequires: pkgconfig(ecore-x) >= %{efl_version}
BuildRequires: pkgconfig(eet) >= %{efl_version}
BuildRequires: pkgconfig(efreet) >= %{efl_version}
BuildRequires: pkgconfig(efreet-mime) >= %{efl_version}
BuildRequires: pkgconfig(efreet-trash) >= %{efl_version}
BuildRequires: pkgconfig(eina) >= %{efl_version}
BuildRequires: pkgconfig(eio) >= %{efl_version}
BuildRequires: pkgconfig(eldbus) >= %{efl_version}
BuildRequires: pkgconfig(elementary) >= %{efl_version}
BuildRequires: pkgconfig(emotion) >= %{efl_version}
BuildRequires: pkgconfig(evas) >= %{efl_version}
BuildRequires: pkgconfig(freetype2) >= 2.1.7
BuildRequires: pkgconfig(xcb-keysyms)
BuildRequires: pkgconfig(xext)
%if %{enable_wayland}
BuildRequires: pkgconfig(ecore-wayland)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-egl)
BuildRequires: pkgconfig(wayland-server)
BuildRequires: pkgconfig(xkbcommon)
%endif
%if %{systemd_present}
BuildRequires: systemd-devel
%endif
# you'll need dbus-1 for default actions set in sysactions.conf
Requires: dbus-1
%if 0%{?suse_version}
BuildRequires: fdupes
%endif
Requires: edje
Requires: efl
Requires: elementary
Requires: evas-generic-loaders
# We use xdg-terminal, xdg-open and xdg-su in various places
Requires: xdg-utils
# Require a Icon theme that will be detected by enlghtenment
Requires: oxygen-icon-theme
%{?systemd_requires}
%if 0%{?fedora} >= 18
Requires: systemd
%endif
%if 0%{?suse_version}
# to have working automounting we need udisks
Recommends: udisks
%endif
# Recommend sni-qt to make Qt4/kde4 apps work with systray
Recommends: sni-qt
# Recommended to make NetworkManager Intergration work
Recommends: gnome-keyring
Recommends: NetworkManager-appindicator
Requires: enlightenment-branding = 0.1
Provides: e_module-notification = 0.2.1
Obsoletes: e_module-notification < 0.2.1
Conflicts: e17 > 0.17.3
# lets not have users complain about theme incompat
Conflicts: e17-theme
# Obsolete 12.3 and 13.1 users using e17.0 and e17.3 but not 13.2 users using e17.6 as they will
# have chosen e17 over e18 and later manually
# according to DimStar, obsoleting all will allow a smooth upgrade, only providing 0.17.4 or less will mean that
# older e17.3 users will update but anyone who manually installs e17.6 will stay
Obsoletes: e17
Provides: e17 > 0.17.4
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Enlightenment window manager and desktop environment is really fast, configurable and beautiful.
This package will provide the latest released version of enlightenment, as opposed to e16 or e17.
%package devel
Summary: Enightenment development files
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: efl-devel
Requires: elementary-devel
Requires: freetype2-devel >= 2.1.7
Requires: pam-devel
Requires: xorg-x11-libXext-devel
Requires: pkgconfig(dbus-1)
Obsoletes: e17-devel < 0.17.3
Provides: e17-devel = 0.17.3
Conflicts: e17-devel > 0.17.3
%description devel
Development files of Enlightenment package.
%package branding-upstream
Summary: Enlightenment files for upstream branding
Group: System/GUI/Other
%if 0%{?suse_version}
Supplements: packageand(enlightenment:branding-upstream)
Conflicts: otherproviders(e17-branding)
Conflicts: otherproviders(enlightenment-branding)
%endif
# this uses elementary version number not enlightenment
Requires: enlightenment-theme-upstream
Provides: enlightenment-branding = 0.1
Conflicts: terminology-theme-openSUSE
%description branding-upstream
Various files for Enlightenment provided by upstream but altered by openSUSE or Petite Linux.
%package doc-html
Summary: HTML documentation of Enlightenment
Group: Documentation/HTML
Conflicts: e17-doc-html
%description doc-html
Documentation of Enlightenment in form of HTML pages.
%if %generate_manpages
%package doc-man
Summary: Man documentation of Enlightenment
Group: Documentation/Man
%description doc-man
Documentation of Enlightenment in form of man pages.
%endif
%prep
%setup -q -n enlightenment-%{version}
%patch0
%patch1 -p1
%patch2 -p1
# Copy In new Network Wizard
rm src/modules/wizard/page_110.c
cp -v %{SOURCE5} src/modules/wizard/page_110.c
%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 \
%if %{enable_wayland}
--enable-wayland-clients \
--enable-wayland-egl \
--enable-wl-desktop-shell \
--enable-wl-x11 \
--enable-wl-fb \
--enable-wl-drm \
%endif
--disable-static \
--disable-silent-rules
make %{?_smp_mflags}
make doc
%install
make install DESTDIR="%{buildroot}" %{?_smp_mflags}
# copy documentation manually
echo "Copying HTML documentation"
mkdir -p %{buildroot}%{_docdir}/%{name}
/bin/cp -vr doc/html %{buildroot}%{_docdir}/%{name}
%if %generate_manpages
echo "Copying MAN pages"
/bin/cp -vr doc/man/ %{buildroot}%{_mandir}/
%endif
# remove duplicates
%if 0%{?suse_version}
%fdupes -s %{buildroot}%{_docdir}
%if %generate_manpages
%fdupes -s %{buildroot}%{_mandir}
%endif
%endif
find %{buildroot}%{_libdir} -name '*.la' -exec rm -v {} \;
%find_lang enlightenment
%if 0%{?suse_version}
%fdupes -s %{buildroot}
# remove setuid bits, enlightenment_backlight requires eeze-devel, which is not available for SLE
chmod -s %{buildroot}%{_libdir}/enlightenment/utils/enlightenment_sys \
%if 0%{?sles_version} != 11
%{buildroot}%{_libdir}/enlightenment/utils/enlightenment_backlight \
%endif
%{buildroot}%{_libdir}/enlightenment/modules/cpufreq/*/freqset
# remove duplicate files for SUSE
%fdupes -s %{buildroot}%{_libdir}/enlightenment/modules/
%fdupes -s %{buildroot}%{_datadir}/enlightenment/data/config
%endif
# copy PAM profile
mkdir -p %{buildroot}%{_sysconfdir}/pam.d
cp %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/enlightenment
%if 0%{?suse_version} >= 1220
# replace sysactions.conf with the distribution one
# if using systemd the upstream config is now more reasonable so keep that one
%if !%systemd_present
cp %{SOURCE3} %{buildroot}%{_sysconfdir}/enlightenment/sysactions.conf
%else
cp %{SOURCE4} %{buildroot}%{_sysconfdir}/enlightenment/sysactions.conf
%endif
%endif
# Remove unwanted wizard pages
# /usr/lib64/enlightenment/modules/wizard/linux-gnu-x86_64-ver-autocannoli-0.20/page_010.so
# Remove language / keyboard pages
rm %{buildroot}%{_libdir}/enlightenment/modules/wizard/*/page_010.so
rm %{buildroot}%{_libdir}/enlightenment/modules/wizard/*/page_011.so
# Remove connman page
rm %{buildroot}%{_libdir}/enlightenment/modules/wizard/*/page_110.so
# Don't remove Updates 170 (We have a patch to ensure its disabled)
# Remove tasks page, with our profile its not needed
rm %{buildroot}%{_libdir}/enlightenment/modules/wizard/*/page_180.so
# remove files from not wanted place
rm %{buildroot}%{_datadir}/enlightenment/{COPYING,AUTHORS}
%if %systemd_present
%pre
%if !0%{?fedora}
%service_add_pre enlightenment.service
%endif
%post
%if !0%{?fedora}
%service_add_post enlightenment.service
%endif
%preun
%if !0%{?fedora}
%service_del_preun enlightenment.service
%endif
%postun
%if !0%{?fedora}
%service_del_postun enlightenment.service
%endif
%endif
%files -f enlightenment.lang
%defattr(-,root,root)
%doc COPYING README AUTHORS
%exclude %{_docdir}/%{name}/html
%{_datadir}/xsessions/enlightenment.desktop
%{_datadir}/enlightenment/
%{_datadir}/applications/*.desktop
%{_libdir}/enlightenment
%config(noreplace) %{_sysconfdir}/enlightenment
%config(noreplace) %{_sysconfdir}/pam.d/enlightenment
%dir %{_sysconfdir}/xdg/menus
%config %{_sysconfdir}/xdg/menus/e-applications.menu
%{_bindir}/enlightenment*
%if %systemd_present
%{_prefix}/lib/systemd/user/enlightenment.service
%endif
# excluded to be branded
%exclude %{_libdir}/enlightenment/modules/wizard/def-ibar.txt
%files branding-upstream
%defattr(-, root, root)
%{_libdir}/enlightenment/modules/wizard/def-ibar.txt
%files devel
%defattr(-, root, root)
%{_libdir}/pkgconfig/*.pc
%{_includedir}/enlightenment
%files doc-html
%defattr(-, root, root)
%{_docdir}/%{name}
%if 0%{?centos_version} || 0%{?fedora_version} == 16
%exclude %{_docdir}/%{name}-%{version}/COPYING
%exclude %{_docdir}/%{name}-%{version}/README
%exclude %{_docdir}/%{name}-%{version}/AUTHORS
%else
%exclude %{_docdir}/%{name}/COPYING
%exclude %{_docdir}/%{name}/README
%exclude %{_docdir}/%{name}/AUTHORS
%endif
%if %generate_manpages
%files doc-man
%defattr(-, root, root)
%{_mandir}/*/*
%endif
%changelog