Blob Blame History Raw
%global _internal_version  9e96f5d

%global glib2_version 2.28.0
%global pango_version 1.28
%global gtk3_version 3.0.2
%global gnome_icon_theme_version 1.1.5
%global libxml2_version 2.4.20
%global desktop_file_utils_version 0.7
%global gnome_desktop3_version 2.91.4
%global redhat_menus_version 0.25
%global libexif_version 0.5.12
%global exempi_version 1.99.5
%global gobject_introspection_version 0.9.5

Name:           nemo
Summary:        File manager for Cinnamon
Version:        1.0.3
Release:        2%{?dist}
License:        GPLv2+ and LGPLv2+
Group:          User Interface/Desktops
# To generate source
# wget https://github.com/linuxmint/nemo/tarball/%%{_internal_version} -O nemo-%%{version}.git%%{_internal_version}.tar.gz
Source0:        http://leigh123linux.fedorapeople.org/pub/nemo/source/nemo-%{version}.tar.gz
Source1:        nemo.css
Source2:        gtk.css
Source3:        gtk-dark.css

URL:            https://github.com/linuxmint/nemo
Requires:       redhat-menus >= %{redhat_menus_version}
Requires:       gvfs >= 1.4.0
Requires:       gnome-icon-theme >= %{gnome_icon_theme_version}
Requires:       libexif >= %{libexif_version}
Requires:       gsettings-desktop-schemas

BuildRequires:  glib2-devel >= %{glib2_version}
BuildRequires:  pango-devel >= %{pango_version}
BuildRequires:  gtk3-devel >= %{gtk3_version}
BuildRequires:  libxml2-devel >= %{libxml2_version}
BuildRequires:  gnome-desktop3-devel >= %{gnome_desktop3_version}
BuildRequires:  intltool >= 0.40.6-2
BuildRequires:  libX11-devel
BuildRequires:  desktop-file-utils >= %{desktop_file_utils_version}
BuildRequires:  libSM-devel
BuildRequires:  libtool >= 1.4.2-10
BuildRequires:  libexif-devel >= %{libexif_version}
BuildRequires:  exempi-devel >= %{exempi_version}
BuildRequires:  gettext
BuildRequires:  libselinux-devel
BuildRequires:  gtk-doc
BuildRequires:  scrollkeeper
BuildRequires:  gobject-introspection-devel >= %{gobject_introspection_version}
BuildRequires:  gsettings-desktop-schemas-devel
BuildRequires:  libnotify-devel

# needed for theme subpackage
BuildRequires:  gnome-themes-standard

# the main binary links against libnemo-extension.so
# don't depend on soname, rather on exact version
Requires:       nemo-extensions%{?_isa} = %{version}-%{release}


Patch0:         rtl-fix.patch
Patch1:         remove_open_terminal.patch


%description
Nemo is the file manager and graphical shell for the Cinnamon desktop
that makes it easy to manage your files and the rest of your system.
It allows to browse directories on local and remote filesystems, preview
files and launch applications associated with them.
It is also responsible for handling the icons on the Cinnamon desktop.

%package extensions
Summary: Nemo extensions library
License: LGPLv2+
Group: Development/Libraries
Requires:   %{name}%{?_isa} = %{version}-%{release}

%description extensions
This package provides the libraries used by nemo extensions.

%package devel
Summary: Support for developing nemo extensions
License: LGPLv2+
Group: Development/Libraries
Requires:   %{name}%{?_isa} = %{version}-%{release}


%description devel
This package provides libraries and header files needed
for developing nemo extensions.

%package -n adwaita-nemo
Summary: Nemo theme fix for Adwaita
Group: User Interface/Desktops
Buildarch: noarch
Requires:  gnome-themes-standard

%description -n adwaita-nemo
Nemo theme fix for Adwaita

%prep
%setup -q -n linuxmint-%{name}-%{_internal_version}


%patch0 -p1 -b .rtl-fix
%patch1 -p1


%build

gtkdocize
libtoolize
aclocal -I m4
autoconf
autoheader
automake

CFLAGS="$RPM_OPT_FLAGS -g -DNEMO_OMIT_SELF_CHECK" %configure --disable-more-warnings --disable-update-mimedb

# drop unneeded direct library deps with --as-needed
# libtool doesn't make this easy, so we do it the hard way
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool

export tagname=CC
make %{?_smp_mflags} V=1

%install
export tagname=CC
make install DESTDIR=$RPM_BUILD_ROOT LIBTOOL=/usr/bin/libtool

desktop-file-install --delete-original       \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications             \
  --add-only-show-in GNOME                                  \
  $RPM_BUILD_ROOT%{_datadir}/applications/*



rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/nemo/extensions-3.0/*.la
rm -f $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/icon-theme.cache
rm -f $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/.icon-theme.cache

# theme
mkdir -p $RPM_BUILD_ROOT%{_datadir}/themes/Adwaita-Nemo/gtk-3.0/apps
install -D -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/themes/Adwaita-Nemo/gtk-3.0/apps/
install -D -p -m 0644 %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/themes/Adwaita-Nemo/gtk-3.0/
ln -s %{_datadir}/themes/Adwaita/backgrounds $RPM_BUILD_ROOT%{_datadir}/themes/Adwaita-Nemo/
ln -s %{_datadir}/themes/Adwaita/gtk-2.0 $RPM_BUILD_ROOT%{_datadir}/themes/Adwaita-Nemo/
ln -s %{_datadir}/themes/Adwaita/gtk-3.0/{gtk.gresource,settings.ini} $RPM_BUILD_ROOT%{_datadir}/themes/Adwaita-Nemo/gtk-3.0/
ln -s %{_datadir}/themes/Adwaita/metacity-1 $RPM_BUILD_ROOT%{_datadir}/themes/Adwaita-Nemo/
ln -s %{_datadir}/themes/Adwaita/index.theme $RPM_BUILD_ROOT%{_datadir}/themes/Adwaita-Nemo/index.theme

%find_lang %name

%post
/sbin/ldconfig
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :

%postun
/sbin/ldconfig
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
if [ $1 -eq 0 ]; then
  /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
  /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
  /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
fi

%posttrans
/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :

%post extensions -p /sbin/ldconfig

%postun extensions -p /sbin/ldconfig

%files  -f %{name}.lang
%doc AUTHORS COPYING COPYING-DOCS COPYING.LIB NEWS README
%{_datadir}/nemo/
%{_datadir}/applications/*
%{_datadir}/mime/packages/nemo.xml
%{_bindir}/*
%{_datadir}/icons/hicolor/*/apps/nemo.png
%{_datadir}/icons/hicolor/scalable/apps/nemo.svg
%{_datadir}/dbus-1/services/org.Nemo.service
%{_mandir}/man1/nemo-connect-server.1.*
%{_mandir}/man1/nemo.1.*
%{_libexecdir}/nemo-convert-metadata/
%{_datadir}/GConf/gsettings/nemo.convert
%{_datadir}/glib-2.0/schemas/org.nemo.gschema.xml
%dir %{_libdir}/nemo/extensions-3.0/
%{_libdir}/nemo/extensions-3.0/libnemo-sendto.so
%{_sysconfdir}/xdg/autostart/nemo-autostart.desktop
%{_datadir}/dbus-1/services/org.freedesktop.NemoFileManager1.service

%files extensions
%{_libdir}/libnemo-extension.so.*
%{_libdir}/girepository-1.0/*.typelib
%dir %{_libdir}/nemo

%files -n adwaita-nemo
%{_datadir}/themes/Adwaita-Nemo/

%files devel
%{_includedir}/nemo/
%{_libdir}/pkgconfig/*
%{_libdir}/*.so
%{_datadir}/gir-1.0/*.gir
%doc %{_datadir}/gtk-doc/html/libnemo-extension/*

%changelog
* Mon Oct 08 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.3-2
- remove requires gnome-terminal
- patch to remove "open in terminal"

* Mon Oct 01 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.3-1
- update to 1.0.3 release

* Thu Sep 27 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.2-1
- update to 1.0.2 release
- add requires gnome-terminal

* Tue Sep 25 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.1-5
- add theme sub-package

* Tue Sep 25 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.1-4
- remove "open as root" option
- fix "open terminal" option

* Tue Sep 25 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.1-3
- validate desktop file

* Tue Sep 25 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.1-2
- add ldconfig to extensions
- fix comment in macro
- fix macro-in-comment
- remove obsolete provides/obsoletes
- fix licence tag

* Fri Sep 21 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.1-1
- initial build based on nautilus spec file