Re: PyPDF2 and stapler (RPM build error for stapler)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/16/2015 03:42 PM, Ranjan Maitra wrote:

So, these two files conflict:

/usr/share/doc/stapler
/usr/share/doc/stapler/CONTRIBUTORS

Not sure how to get around this.

You need to change your package's name, i.e. the value on the right-hand side of the "Name: "-tag inside of your rpm spec.


This is an untested re-write of your spec:
--- snip ---
# spec file for package pdfstapler
#

%global snapdate 20150128
%global commit 8b5f409afc9b35e0fe71ceb46d97292d79a7158b
%global shortcommit %(c=%{commit}; echo ${c:0:7})

%global realname stapler

Name:           pdf%{realname}
# The Version is hidden in the stapler script
Version:        0.3.0
Release:        0.%{snapdate}git%{shortcommit}%{?dist}
Summary:        Python-based PDF toolkit alternative to obsoleted pdftk

Group:          Applications/System
License:        BSD
URL:            https://github.com/hellerbarde/%{realname}
Source0: https://github.com/hellerbarde/%{realname}/archive/%{commit}/%{realname}-%{snapdate}git%{shortcommit}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel, PyPDF2, python-setuptools
Requires:       PyPDF2


%description
PDFtk was written in Java and C++, and is natively compiled with gcj.
Sadly, it has been discontinued a few years ago and bitrot is setting
in (e.g., it does not compile easily on a number of platforms).

Philip Stark decided to look for an alternative and found pypdf, a
PDF library written in pure Python. He couldn't find a tool which
actually used the library, so he started writing his own.

This version of stapler is Fred Wenzel's fork of the project, with
a completely refactored source code, tests, and added functionality.

Like pdftk, stapler is a command-line tool.


%prep
%setup -q -n %{realname}-%{commit}


%build
%{__python} setup.py build


%install
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
install -m 755 -d $RPM_BUILD_ROOT/%{_sbindir}

%files
%doc CONTRIBUTORS LICENSE
%{_bindir}/stapler
%{python2_sitelib}/*


%changelog
* Mon Feb 09 2015 stat.maitra@xxxxxxxxx
- initial packaging of 0.3 version
--- snip ---

Ralf

--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux