Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 71fb33d37070f90f37619ecb04f621b1 > files > 3

nautilus-pastebin-0.5.0-5.fc15.src.rpm

%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif

# The package should be a noarch, but the usage the %{_libdir} macro needs removal 
# noarch

%global         debug_package %{nil}

Name:           nautilus-pastebin
Version:        0.5.0
Release:        5%{?dist}
Summary:        Nautilus extension to send files to a pastebin

Group:          User Interface/Desktops
License:        GPLv2+
URL:            http://launchpad.net/nautilus-pastebin/
Source0:        http://launchpad.net/nautilus-pastebin/trunk/0.4.1/+download/%{name}-%{version}.tar.gz
# patch that makes fpaste.org default
Patch0:         nautilus-pastebin-default.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  gettext
BuildRequires:  desktop-file-utils
BuildRequires:  intltool
BuildRequires:  python2-devel
BuildRequires:  python-distutils-extra

# a user using this extension should also have
# fpaste installed which a default in F12 onwards
Requires:       fpaste
# python bindings needed
Requires:       nautilus-python
Requires(pre): GConf2
Requires(post): GConf2
Requires(preun): GConf2

%description
A Nautilus extension written in Python, which allows users to 
upload text-only files to a pastebin service just by 
right-clicking on them. Users can also add their favorite service 
just by creating new presets.

%prep
%setup -q

#removes the line from the desktop file since this is a meaningless tag for Fedora
sed -i 's|X-Ubuntu-Gettext-Domain=nautilus-pastebin||g' data/%{name}-configurator.desktop

sed -i -e '/^#!\//, 1d' pastebin/core.py
%patch0

%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build 

%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install --root=$RPM_BUILD_ROOT --install-scripts=/usr/share/nautilus-pastebin
install -p -D -m 0755 build/scripts-?.?/%{name}.py $RPM_BUILD_ROOT/%{_libdir}/nautilus/extensions-2.0/python/%{name}.py
%find_lang %{name}
desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}-configurator.desktop

# pinged upstream about schema location.
# using this for the time being.
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gconf
mv $RPM_BUILD_ROOT%{_datadir}/gconf $RPM_BUILD_ROOT%{_sysconfdir}

%clean
rm -rf $RPM_BUILD_ROOT

%pre
if [ "$1" -gt 1 ]; then
  export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
  gconftool-2 --makefile-uninstall-rule \
              %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
fi

%post
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 \
        --makefile-install-rule \
        %{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null || :

%preun
if [ "$1" -eq 0 ]; then
  export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
  gconftool-2 --makefile-uninstall-rule \
        %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
fi


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc ChangeLog GPL-2 NEWS PKG-INFO README
%{_libdir}/nautilus/extensions-2.0/python/*
%{python_sitelib}/pastebin/*.py*
%{python_sitelib}/nautilus_pastebin-*-py?.?.egg-info
%config(noreplace) %{_sysconfdir}/gconf/schemas/*
%{_datadir}/%{name}/*
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}-configurator.desktop

%changelog
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Jul 30 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.5.0-4
- when installing don't depend on the python version

* Fri Jul 30 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.5.0-3
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Fri Jun 18 2010 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.0-2
- Some quick fixes to 0.5.0-1
- Fixes bugs
- - https://bugs.launchpad.net/nautilus-pastebin/+bug/577571 
- - https://bugs.launchpad.net/nautilus-pastebin/+bug/577569 : informative error msg added
- New supported pastebins:
- - http://codepad.org
- Fix pastebin.com.conf preset.
- The following pastebins seem no longer to work and they will be dropped in the next release:
- - paste.lisp.org
- - pastebot.ltsp.org
- - pastebin.ws

* Fri Jun 18 2010 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.0-1
- updated to latest release

* Sun Jun 13 2010 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.1-8
- added nautilus-python as a Requires

* Sun May 09 2010 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.1-7
- add fpaste as requires
- comment for patch

* Wed May 05 2010 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.1-6
- Fixes according to #583141

* Tue May 04 2010 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.1-5
- patched the default schema file

* Mon May 03 2010 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.1-4
- corrected placement of files
- removed noarch since libdir macro has to be used in package

* Sun Apr 18 2010 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.1-3
- remove shebang
- correct schema file location
- correct buildarch

* Sat Apr 17 2010 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.1-2
- changed according to review request #583141

* Fri Apr 16 2010 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.1-1
- initial rpm build