Name: scribus-stable Version: 1.3.3.13 Release: 1%{?dist} Summary: DeskTop Publishing application written in Qt Group: Applications/Productivity License: GPLv2+ URL: http://www.scribus.net/ Source0: http://downloads.sourceforge.net/%{name}/scribus-%{version}.tar.bz2 Patch0: scribus-1.3.3.13-manpages.patch Patch1: scribus-1.3.3.13-system-hyphen.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: cmake BuildRequires: cups-devel BuildRequires: desktop-file-utils BuildRequires: lcms-devel BuildRequires: libart_lgpl-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: libtiff-devel BuildRequires: libxml2-devel BuildRequires: openssl-devel BuildRequires: python-devel BuildRequires: python-imaging-devel BuildRequires: qt3-devel BuildRequires: zlib-devel BuildRequires: freetype-devel BuildRequires: gnutls-devel BuildRequires: cairo-devel BuildRequires: hyphen-devel Requires: ghostscript Requires: python Requires: python-imaging Requires: tkinter Requires: shared-mime-info Requires: %{name}-doc = %{version}-%{release} %description Scribus is an desktop open source page layout program with the aim of producing commercial grade output in PDF and Postscript, primarily, though not exclusively for Linux. While the goals of the program are for ease of use and simple easy to understand tools, Scribus offers support for professional publishing features, such as CMYK color, easy PDF creation, Encapsulated Postscript import/export and creation of color separations. %package doc Summary: Documentation files for Scribus Group: Development/Tools Requires: %{name} = %{version}-%{release} %if 0%{?fedora} > 9 BuildArch: noarch %endif %description doc %{summary} %prep %setup -q -n scribus-%{version} %patch0 -p1 -b .manpages %patch1 -p2 -b .system-hyphen # recode man page to UTF-8 pushd scribus/manpages iconv -f ISO8859-2 -t UTF-8 scribus.1.pl > tmp touch -r scribus.1.pl tmp mv tmp scribus.1.pl popd # drop shebang lines from python scripts for f in scribus/plugins/scriptplugin/{samples,scripts}/*.py do sed '1{/#!\/usr\/bin\/env\|#!\/usr\/bin\/python/d}' $f > $f.new touch -r $f $f.new mv $f.new $f done %build mkdir build pushd build %cmake -DTAG_VERSION=-stable .. make VERBOSE=1 %{?_smp_mflags} popd %install rm -rf ${RPM_BUILD_ROOT} pushd build make install DESTDIR=$RPM_BUILD_ROOT popd install -p -D -m0644 ${RPM_BUILD_ROOT}%{_datadir}/scribus-stable/icons/scribus.png ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/scribus-stable.png install -p -D -m0644 ${RPM_BUILD_ROOT}%{_datadir}/scribus-stable/icons/scribusdoc.png ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/x-scribus-stable.png find ${RPM_BUILD_ROOT} -type f -name "*.la" -exec rm -f {} ';' # install the global desktop file rm -f ${RPM_BUILD_ROOT}%{_datadir}/mimelnk/application/*scribus.desktop desktop-file-install --vendor="fedora" \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ scribus.desktop # rename from scribus to scribus-stable pushd ${RPM_BUILD_ROOT} mv ./%{_datadir}/applications/fedora-scribus.desktop ./%{_datadir}/applications/fedora-scribus-stable.desktop mv ./%{_datadir}/mime/packages/scribus.xml ./%{_datadir}/mime/packages/scribus-stable.xml # fix executable name in the desktop file sed -i -e 's/=scribus/=scribus-stable/g' ./%{_datadir}/applications/fedora-scribus-stable.desktop # clean unwanted files rm ./%{_datadir}/doc/%{name}/[A-Z]* popd %clean rm -rf ${RPM_BUILD_ROOT} %post update-mime-database %{_datadir}/mime > /dev/null 2>&1 || : %postun update-mime-database %{_datadir}/mime > /dev/null 2>&1 || : %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog ChangeLogSVN COPYING README TODO %{_bindir}/%{name} %{_libdir}/%{name} %{_datadir}/applications/fedora-%{name}.desktop %{_datadir}/mime/packages/%{name}.xml %{_datadir}/pixmaps/* %{_datadir}/%{name} %exclude %{_datadir}/%{name}/samples/*.py[co] %exclude %{_datadir}/%{name}/scripts/*.py[co] %{_mandir}/man1/* %{_mandir}/pl/man1/* %{_mandir}/de/man1/* %files doc %defattr(-,root,root,-) %dir %{_datadir}/doc/%{name} %lang(cs) %{_datadir}/doc/%{name}/cs %lang(de) %{_datadir}/doc/%{name}/de %lang(en) %{_datadir}/doc/%{name}/en %lang(fr) %{_datadir}/doc/%{name}/fr %lang(pl) %{_datadir}/doc/%{name}/pl %changelog * Wed Aug 19 2009 Dan HorĂ¡k - 1.3.3.13-1 - initial version for stable branch