File pdfedit.spec of Package pdfedit

#
# spec file for package pdfedit (Version 0.4.2)
#
# Copyright (c) 2007-2008 Nikolay Derkach
# Copyright (c) 2009 Buschmann <buschmann23@opensuse.org>
#
# 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.
#

# norootforbuild

Name:           pdfedit
Version:        0.4.3
Release:        0
License:        GPLv2
URL:            http://pdfedit.petricek.net/index_e.html
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  qt3-devel qt3-devel-tools update-desktop-files boost-devel fdupes
BuildRequires:  docbook_4 docbook-xsl-stylesheets libxslt-devel
Source0:        %{name}-%{version}.tar.gz
#Patch0:         %{name}-%{version}-program-causes-undefined-operation.patch
Patch1:         pdfedit-gcc47.patch
Group:          Productivity/Publishing/PDF
Summary:        Complete PDF Editin Solution

%description
Free editor for PDF documents. Complete editing of PDF documents is possible with PDFedit.
You can change raw pdf objects (for advanced users) or use many gui functions.
Functionality can be easily extended using a scripting language (ECMAScript).


%package devel
License:        GPLv2
Group:          Development/Libraries/C and C++
Summary:        Include Files and Libraries Mandatory for Development
Requires:       %{name} = %{version}-%{release}

%description devel
Free editor for PDF documents. Complete editing of PDF documents is possible with PDFedit.
You can change raw pdf objects (for advanced users) or use many gui functions.
Functionality can be easily extended using a scripting language (ECMAScript).

%prep
%setup -n %{name}-%{version} -q
#%patch0
%patch1 -p1

%build
export EXTRA_UTILS_CFLAGS=$RPM_OPT_FLAGS
export EXTRA_KERNEL_CFLAGS=$RPM_OPT_FLAGS
export EXTRA_TESTS_CFLAGS=$RPM_OPT_FLAGS
export EXTRA_UTILS_CXXFLAGS=$RPM_OPT_FLAGS
export EXTRA_KERNEL_CXXFLAGS=$RPM_OPT_FLAGS
export EXTRA_TEST_CXXFLAGS=$RPM_OPT_FLAGS
export EXTRA_GUI_CXXFLAGS=$RPM_OPT_FLAGS
export QTDIR=/usr/lib/qt3
export PATH=$QTDIR/bin:$PATH
export QMAKESPEC=$QTDIR/mkspecs/linux-g++ 
%configure \
    --prefix=/usr \
    --with-qt-dir=$QTDIR \
    --with-qt-libraries=$QTDIR/%{_lib} \
    --with-qt-includes=$QTDIR/include \
    --enable-release \
    --enable-debug-info \
    --enable-pdfedit-core-dev \
    --enable-user-manual
make %{?jobs:-j%jobs}

%install
make install INSTALL_ROOT=$RPM_BUILD_ROOT

#icons
install -d \
  $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/{16x16,32x32,48x48,64x64}/apps
install -p -m 0644 src/gui/icon/pdfedit_icon_16.png \
  $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/16x16/apps/pdfedit.png
install -p -m 0644 src/gui/icon/pdfedit_icon_32.png \
  $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/32x32/apps/pdfedit.png
install -p -m 0644 src/gui/icon/pdfedit_icon_48.png \
  $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/48x48/apps/pdfedit.png
install -p -m 0644 src/gui/icon/pdfedit_icon_64.png \
  $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/64x64/apps/pdfedit.png

%fdupes $RPM_BUILD_ROOT/%_datadir

%suse_update_desktop_file -c %{name} "PDF editor" "Edit .pdf files" %{name} "%{name}" Office WordProcessor

%__chmod +x %{buildroot}%{_bindir}/pdfedit-core-dev-config
%__chmod -x %{buildroot}%{_includedir}/%{name}-%{version}/os/win.h

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%{_mandir}/man1/%{name}*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*.qs
%{_datadir}/%{name}/mode.conf
%{_datadir}/%{name}/operator.hint
%{_datadir}/%{name}/pdfeditrc
%{_datadir}/%{name}/icon
%{_datadir}/%{name}/scripts
%dir %{_datadir}/%{name}/lang
%lang(cs) %{_datadir}/%{name}/lang/%{name}_cs.qm
%lang(de) %{_datadir}/%{name}/lang/%{name}_de.qm
%lang(es) %{_datadir}/%{name}/lang/%{name}_es.qm
%lang(fr) %{_datadir}/%{name}/lang/%{name}_fr.qm
%lang(ru) %{_datadir}/%{name}/lang/%{name}_ru.qm
%lang(sk) %{_datadir}/%{name}/lang/%{name}_sk.qm
%lang(zh_TW) %{_datadir}/%{name}/lang/%{name}_zh_TW.qm
%dir %{_datadir}/%{name}/help
%doc %lang(cs) %{_datadir}/%{name}/help/cs
%{_datadir}/%{name}/help/images
%doc %lang(en) %{_datadir}/%{name}/help/index.html
%doc %lang(en) %{_datadir}/%{name}/help/keyboard.html
%doc %lang(en) %{_datadir}/%{name}/help/pdfedit.html
%doc %lang(en) %{_datadir}/%{name}/help/qsa-inputdialog.html
%doc %lang(en) %{_datadir}/%{name}/help/qsa-util.html
%doc %lang(en) %{_datadir}/%{name}/help/scripting.html
%{_datadir}/applications/*desktop
%{_datadir}/icons/hicolor
%doc %{_datadir}/doc/%{name}

%files devel
%defattr(-,root,root,-)
%{_bindir}/pdfedit-core-dev-config
%{_includedir}/%{name}-%{version}
%{_libdir}/%{name}-%{version}

%changelog -n pdfedit
* Tue Aug 10 2010 Ilya Chernykh
- fixing for Factory
* Fri Jan 29 2010 Javier Llorente <javier@opensuse.org> 0.4.3
- updated to 0.4.3
* Wed Mar 11 2009 Buschmann <buschmann23@opensuse.org> 0.4.2
- adding pdfedit-0.4.2-program-causes-undefined-operation.patch
- enabling build of user manual
- enabling build of devel files and create devel package
- adding more RPM_OPT_FLAGS
- adding docbook_4, docbook-xsl-stylesheets and libxslt-devel to the BuildRequires
* Mon Mar 09 2009 Buschmann <buschmann23@opensuse.org> 0.4.2
- adding qt3-devel-tools to the BuildRequires
* Thu Mar 05 2009 Buschmann <buschmann23@opensuse.org> 0.4.2
- update to version 0.4.2
  + dependency to boost-iostreams dropped
  + changed streams are encoded with FlateDecode compression
  + read-only support for encrypted documents added
  + Transformation matrix and page metrics can be changed for multiple
     pages at once in GUI.
  + Bugs 131, 157, 158, 195, 199, 207, 215, 217, 220, 222, 217, 226, 
    228, 233, 241, 246, 247, 249, 257, 258, 260, 262, 267, 270, 272 fixed
  + Internal changes
  ++ versioning updated - released and dirty or CVS builds cotain
     the timestamp of the most recently changed file
  ++ Removed unused obsolete code (QSA for Qt4) from source tree
  ++ smart pointers are used also for CPdf instance
  ++ support for stream encoding in the pdfwriter
  ++ JBIG2Stream::clone implemented
* Sun Apr 06 2008 - Nikolay Derkach <nderkach@gmail.com> 0.4.1
- fixed build errors
* Sun Feb 24 2008 - Nikolay Derkach <nderkach@gmail.com> 0.4.1
- update to 0.4.1
* Sat Sep 01 2007 - Nikolay Derkach <nderkach@gmail.com> 0.3.2
- update to 0.3.2
  - bugfix release, some bugs were fixed, including one vulnerability in xpdf, which can be exploited by malicious people to compromise a user's system, see changelog for details
* Thu May 15 2007 - Nikolay Derkach <nderkach@gmail.com> 0.3.1
- fixed .desktop file, added openmotif-devel to BuildRequires, added destdir patch (v0.3.1) - 2
* Wed May 14 2007 - Nikolay Derkach <nderkach@gmail.com> 0.3.1
- initial package (v0.3.1) - 1
openSUSE Build Service is sponsored by