Blob Blame History Raw
Name:           pdfedit
Version:        0.4.5
Release:        6%{?dist}
Summary:        A complete pdf document editing solution

Group:          Applications/Publishing
License:        GPLv2
URL:            http://sourceforge.net/projects/pdfedit/
Source0:        http://downloads.sourceforge.net/pdfedit/%{name}-%{version}.tar.bz2
Source1:        pdfedit.desktop
Source2:        pdfedit_event.conf
Patch1:         pdfedit-fixbuild.patch

BuildRequires:  boost-devel
BuildRequires:  openmotif-devel
BuildRequires:  libpaper-devel
BuildRequires:  libXpm-devel
BuildRequires:  t1lib-devel
BuildRequires:  desktop-file-utils
BuildRequires:  doxygen
BuildRequires:  qt3-devel

%description
Free pdf editing using PdfEdit. Complete editing of pdf documents is made
possible with PDFedit. You can change either raw pdf objects (for advanced
users) or use predefined gui functions. Functions can be easily added as
everything is based on a script.


%prep
%setup -q
%patch1 -p0 -b .fixbuild
# fix paths to be relative to rpm build root
sed -i 's/\(.path\s\+= \)/\1$(QMAKE_DESTDIR)\//' src/gui/pdfedit.pro


%build
export QMAKESPEC=linux-g++
export QTDIR=`pkg-config qt-mt --variable=prefix`
# Tools aren't actually installed, so not building them now
# --enable-pdfedit-core-dev --enable-tools
%configure
make %{?_smp_mflags}


%install
export QMAKESPEC=linux-g++
export QTDIR=`pkg-config qt-mt --variable=prefix`
# DESTDIR is reserved in qmake
make install INSTALL_ROOT=$RPM_BUILD_ROOT

# use rpm standard %{_docdir}/%{name}-%{version} directory for doc files
mv $RPM_BUILD_ROOT%{_docdir}/%{name} \
  $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}

# install desktop file
desktop-file-install \
  --dir=${RPM_BUILD_ROOT}%{_datadir}/applications  \
  %{SOURCE1}

# install 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

# Install abrt event handler to prevent abrt reports
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/abrt/events.d
cp -p %SOURCE2 $RPM_BUILD_ROOT/%{_sysconfdir}/abrt/events.d/


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

%postun
update-desktop-database &> /dev/null ||:
if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

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

%files
%config(noreplace) %{_sysconfdir}/abrt/events.d/pdfedit_event.conf
%{_bindir}/*
%{_mandir}/man1/*
%{_datadir}/%{name}
%{_datadir}/applications/*desktop
%{_datadir}/icons/hicolor/*/apps/pdfedit.png
%{_docdir}/%{name}-%{version}


%changelog
* Fri Dec 08 2012 Kai Engert <kaie@redhat.com> - 0.4.5-6
- address package re-review comments, bz#885467

* Fri Dec 07 2012 Kai Engert <kaie@redhat.com> - 0.4.5-5
- Fix the build on Fedora 17

* Mon May 16 2011 Orion Poplawski <orion@cora.nwra.com> - 0.4.5-4
- Prevent abrt reports

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

* Fri Jul 2 2010 Orion Poplawski <orion@cora.nwra.com> - 0.4.5-2
- Use openmotif-devel for EPEL

* Tue May 11 2010 Orion Poplawski <orion@cora.nwra.com> - 0.4.5-1
- Update to 0.4.5

* Tue Apr 13 2010 Orion Poplawski <orion@cora.nwra.com> - 0.4.4.1-1
- Update to 0.4.4.1
- Drop zlib and xpdf patches applied upstream
- Drop destdir patch, use INSTALL_ROOT
- Drop fix-includes patch
- Drop .png suffix from icon in .desktop file

* Mon Mar 1 2010 Orion Poplawski <orion@cora.nwra.com> - 0.4.3-5
- Fix directory ownership (bug #569389)

* Wed Feb 17 2010 Orion Poplawski <orion@cora.nwra.com> - 0.4.3-4
- Add patch from upstream to fix several security issues in xpdf code:
  CVE-2009-1188/CVE-2009-3603, CVE-2009-3604, CVE-2009-3606, CVE-2009-3608, 
  CVE-2009-3609

* Mon Feb 15 2010 Orion Poplawski <orion@cora.nwra.com> - 0.4.3-3
- Add patch from upstream to fix zlib link issue (bug #565061)
- Remove old configure option

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Jul 21 2009 Bernard Johnson <bjohnson@symetrix.com> - 0.4.3-1
- 0.4.3

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sun Dec 21 2008 Bernard Johnson <bjohnson@symetrix.com> - 0.4.2-1
- 0.4.2
- rediff patch from Makefile.in to Makefile

* Tue Sep 30 2008 Bernard Johnson <bjohnson@symetrix.com> - 0.4.1-2
- fix patch fuzz

* Sun Jun 29 2008 Bernard Johnson <bjohnson@symetrix.com> - 0.4.1-1
- 0.4.1

* Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.3.2-6
- fix license tag

* Fri Apr 11 2008 Bernard Johnson <bjohnson@symetrix.com> - 0.3.2-5
- build fix, now requires qt3-devel instead of qt-devel (bz #440291)

* Sun Feb 24 2008 Bernard Johnson <bjohnson@symetrix.com> - 0.3.2-4
- fix includes caught in new gcc-4.3 rebuild

* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.3.2-3
- Autorebuild for GCC 4.3

* Wed Aug 29 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.3.2-2
- doxygen patch no longer needed

* Wed Aug 29 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.3.2-1
- v 0.3.2

* Sun Apr 29 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.3.1-1
- v 0.3.1
- rediff destdir patch
- set QMAKESPEC environment variable

* Tue Apr 17 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.3.0-2
- don't allow doxygen to use /dev/null

* Sat Apr 14 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.3.0-1
- v 0.3.0-1

* Thu Mar 15 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.2.5-2
- add scriptlets to update icon cache
- add doxygen user docs

* Wed Mar 14 2007 Bernard Johnson <bjohnson@symetrix.com> - 0.2.5-1
- initial release