Blob Blame History Raw
%global _internal_version  3e366de

Name:           nemo-extensions
Version:        1.8.0
Release:        0.2.git%{_internal_version}%{?dist}
Summary:        Extensions for Nemo
# No cinnamon on ARM due to missing python-pexpect
# https://bugzilla.redhat.com/show_bug.cgi?id=999174
ExcludeArch:    armv7hl

License:        GPLv2+ and LGPLv2
URL:            http://cinnamon.linuxmint.com
# To generate tarball
# wget https://github.com/linuxmint/nemo-extensions/tarball/%%{_internal_version} -O nemo-extensions-%%{version}.git%%{_internal_version}.tar.gz        
Source0:        http://leigh123linux.fedorapeople.org/pub/nemo-extensions/source/nemo-extensions-%{version}.git%{_internal_version}.tar.gz

BuildRequires:  nemo-devel
BuildRequires:  python-distutils-extra
BuildRequires:  python2-devel
BuildRequires:  desktop-file-utils
BuildRequires:  gpgme-devel
BuildRequires:  libcryptui-devel
BuildRequires:  pygobject2-devel
BuildRequires:  pygobject3-devel
BuildRequires:  gnome-common
BuildRequires:  intltool
BuildRequires:  GConf2-devel
BuildRequires:  libgnome-keyring-devel
BuildRequires:  gtk-doc  
BuildRequires:  libnotify-devel    

%description
Extensions for Nemo

%package     -n nemo-seahorse
Summary:     PGP encryption and signing for Nemo
License:     GPLv2+ and LGPLv2
Requires:    seahorse

%description -n nemo-seahorse
Seahorse nemo is an extension for nemo which allows encryption
and decryption of OpenPGP files using GnuPG.

%package     -n nemo-pastebin
Summary:     Pastebin extension for Nemo
License:     GPLv2+
Requires:    pastebinit
Requires:    nemo-python

%description -n nemo-pastebin
nemo-pastebin is an extension for the Nemo file manager, which allows
users to send files to pastebins just a right-click away.

%package     -n nemo-fileroller
Summary:     File Roller extension for Nemo
License:     GPLv2+
Requires:    file-roller

%description -n nemo-fileroller
This package contains the file-roller extension for the Nemo.

%package     -n nemo-python
Summary:     Python bindings for Nemo
License:     GPLv2+
Requires:    pygobject3-base

%description -n nemo-python
Python bindings for Nemo

%package     -n nemo-python-devel
Summary:     Python bindings for Nemo
License:     GPLv2+
Requires:    nemo-python = %{version}-%{release}

%description -n nemo-python-devel
Python bindings for Nemo

%prep
%setup -q -n linuxmint-%{name}-%{_internal_version}
sed -i -e 's@nemo-pastebin-configurator@nemo-pastebin-configurator.py@g' nemo-pastebin/data/nemo-pastebin-configurator.desktop

%build
pushd nemo-seahorse
autoreconf -fi
%configure
make V=1 %{?_smp_mflags}
popd

pushd nemo-pastebin
%{__python} setup.py build
popd

pushd nemo-fileroller
rm missing
NOCONFIGURE=1 ./autogen.sh
%configure
make V=1 %{?_smp_mflags}
popd

pushd nemo-python
rm missing
mv configure.in configure.ac
NOCONFIGURE=1 ./autogen.sh
%configure --docdir=%{_datadir}/doc/nemo-python
make V=1 %{?_smp_mflags}
popd

%install
rm -rf %{buildroot}
pushd nemo-seahorse
%make_install
popd

pushd nemo-pastebin
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
mkdir -p %{buildroot}/%{_datadir}/nemo-python/extensions/
mv %{buildroot}/%{_bindir}/nemo-pastebin.py %{buildroot}/%{_datadir}/nemo-python/extensions/
popd

pushd nemo-fileroller
%make_install
popd

pushd nemo-python
%make_install
popd

# remove useless libtool archive files
rm %{buildroot}/%{_libdir}/nemo/extensions-3.0/libnemo-*.la
rm %{buildroot}/%{_libdir}/nemo/extensions-3.0/libnemo-*.a

desktop-file-install                                    \
 --delete-original                                      \
 --dir=%{buildroot}%{_datadir}/applications             \
 %{buildroot}/%{_datadir}/applications/seahorse-pgp-*.desktop

desktop-file-install                                    \
 --delete-original                                      \
 --dir=%{buildroot}%{_datadir}/applications             \
 %{buildroot}/%{_datadir}/applications/nemo-pastebin-configurator.desktop

%find_lang nemo-seahorse

%post -n nemo-seahorse
/usr/bin/update-desktop-database &> /dev/null || :

%postun -n nemo-seahorse
/usr/bin/update-desktop-database &> /dev/null || :

%postun -n nemo-pastebin
if [ $1 -eq 0 ] ; then
    /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
fi

%posttrans -n nemo-pastebin
    /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :


%files -n nemo-seahorse -f nemo-seahorse.lang
%doc nemo-seahorse/{AUTHORS,COPYING,README,NEWS,ChangeLog}
%{_bindir}/seahorse-tool
%{_libdir}/nemo/extensions-3.0/libnemo-seahorse.so
%{_datadir}/applications/seahorse-pgp-*.desktop
%{_datadir}/nemo-seahorse/
%{_mandir}/man1/seahorse-tool.1.*

%files -n nemo-pastebin
%doc nemo-pastebin/{README,NEWS}
%{_bindir}/nemo-pastebin-configurator.py
%{_datadir}/nemo-python/extensions/nemo-pastebin.py
%{python_sitelib}/nemo_pastebin-1.0.0-py?.?.egg-info
%{_datadir}/applications/nemo-pastebin-configurator.desktop
%{_datadir}/glib-2.0/schemas/nemo-pastebin.gschema.xml
%{_datadir}/nemo-pastebin/
%{_datadir}/pixmaps/nemo-pastebin.svg

%files -n nemo-fileroller
%doc nemo-fileroller/COPYING
%{_libdir}/nemo/extensions-3.0/libnemo-fileroller.so

%files -n nemo-python
%doc nemo-fileroller/COPYING
%{_libdir}/nemo/extensions-3.0/libnemo-python.so
%{_datadir}/nemo-python/
%{_datadir}/nemo-python/extensions/

%files -n nemo-python-devel
%{_libdir}/pkgconfig/nemo-python.pc

%changelog
* Tue Sep 24 2013 Leigh Scott <leigh123linux@googlemail.com> - 1.8.0-0.2.git3e366de
- fix nemo-pastebin
- add python extensions directory

* Tue Sep 24 2013 Leigh Scott <leigh123linux@googlemail.com> - 1.8.0-0.1.git3e366de
- Initial build