Name: kxstitch
Summary: Program to create cross stitch patterns
Version: 0.8.4.1
Release: 19%{?dist}
License: GPLv2+
Group: Amusements/Graphics
URL: http://sourceforge.net/apps/mediawiki/kxstitch/index.php
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
# Upstream still uses the mime type database for KDE 3. The needed xml file for
# gnome and KDE 4 was sent upstream via email 20101016; upstream is working on
# a KDE 4 version of KXStitch. However, right now the xml file has to be
# provided externally.
Source1: %{name}.xml
BuildRequires: kdelibs3-devel
BuildRequires: ImageMagick-c++-devel
BuildRequires: libXi-devel
BuildRequires: libXtst-devel
BuildRequires: libpng-devel
BuildRequires: gettext
BuildRequires: desktop-file-utils
%description
KXStitch can be used to create cross stitch patterns from scratch. It is also
possible to convert existing images to a cross stitch pattern or scan one with
a Sane supported scanner.
%prep
%setup -q
%build
%configure --disable-rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
# This matches more or less the upstream .desktop file but makes it compliant
# to the recent freedesktop standard. Sent upstream via email 20101016.
cat >%{name}.desktop <<EOF
[Desktop Entry]
Type=Application
Exec=kxstitch -caption "%c" %i
Icon=kxstitch
DocPath=kxstitch/index.html
MimeType=application/kxstitch;
Comment=
Comment[de]=
Terminal=false
Name=KXStitch
Name[de]=KXStitch
Name[ru]=KXStitch
GenericName=Cross-stitch pattern editor
GenericName[de]=Stickmuster Editor
GenericName[ru]=Редактор узоров для вышивания крестиком
EOF
%install
make install DESTDIR=%{buildroot}
# replace "old style" mime type definition by new xml file, see comment above
# for details
mkdir -m755 -p %{buildroot}%{_datadir}/mime/packages
install -p -m644 %{SOURCE1} %{buildroot}%{_datadir}/mime/packages/
rm %{buildroot}/%{_datadir}/mimelnk/application/%{name}.desktop
# we created a new .desktop file
rm -r %{buildroot}%{_datadir}/applnk/Graphics
mkdir -m755 -p %{buildroot}%{_datadir}/applications
install -p -m644 %{name}.desktop %{buildroot}%{_datadir}/applications/
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
# Upstream received an utf-8 version of the man page 20101016 and seems to be
# willing to include it soon.
gunzip %{buildroot}%{_mandir}/man1/kxstitch.1.gz
iconv --from=ISO-8859-1 --to=UTF-8 %{buildroot}%{_mandir}/man1/kxstitch.1 > %{buildroot}%{_mandir}/man1/kxstitch.1.new
mv %{buildroot}%{_mandir}/man1/kxstitch.1.new %{buildroot}%{_mandir}/man1/kxstitch.1
%find_lang %{name}
%post
update-desktop-database &> /dev/null || :
update-mime-database %{_datadir}/mime &> /dev/null || :
touch --no-create %{_datadir}/icons/{hicolor,locolor} &>/dev/null || :
%postun
update-desktop-database &> /dev/null || :
update-mime-database %{_datadir}/mime &> /dev/null || :
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/{hicolor,locolor} &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/{hicolor,locolor} &>/dev/null || :
fi
%posttrans
gtk-update-icon-cache %{_datadir}/icons/{hicolor,locolor} &>/dev/null || :
%files -f %{name}.lang
%defattr(-,root,root,-)
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/mime/packages/%{name}.xml
%{_datadir}/apps/%{name}/
%{_datadir}/config.kcfg/*
%{_datadir}/icons/hicolor/32x32/apps/*
%{_datadir}/icons/locolor/16x16/apps/*
%{_datadir}/icons/locolor/32x32/apps/*
%{_mandir}/man1/%{name}.1*
%{_kde4_docdir}/HTML/en/%{name}/
%{_kde4_docdir}/HTML/nl/%{name}/
%doc AUTHORS ChangeLog COPYING README TODO
%changelog
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.4.1-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Apr 13 2014 Pavel Alexeev <Pahan@Hubbitus.info> - 0.8.4.1-18
- ImageMagick 6.8.8.10-3 rebuild.
* Sun Oct 27 2013 Golo Fuchert <packages@golotop.de> - 0.8.4.1-17
- Rebuilt for new ImageMagick
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.4.1-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Sat Mar 30 2013 Kevin Fenzi <kevin@scrye.com> - 0.8.4.1-15
- Rebuild for broken deps in rawhide
* Fri Mar 24 2013 Golo Fuchert <packages@golotop.de> - 0.8.4.1-14
- Rebuild for new ImageMagick
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.4.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Tue Jul 31 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 0.8.4.1-12
- Add libXi-devel dependency
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.4.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Apr 13 2012 Tom Callaway <spot@fedoraproject.org> - 0.8.4.1-10
- rebuild for new ImageMagick
* Fri Mar 01 2012 Golo Fuchert <packages@golotop.de> - 0.8.4.1-9
- Rebuild for new libpng
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.4.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 0.8.4.1-7
- Rebuild for new libpng
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.4.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Nov 24 2010 Golo Fuchert <packages@golotop.de> - 0.8.4.1-5
- changed _defaultdocdir to _kde4_docdir
- instead of using sed on the faulty desktopfile, a new one is installed with a heredoc
- used name macro in the files list
* Mon Nov 08 2010 Golo Fuchert <packages@golotop.de> - 0.8.4.1-4
- Minor changes to summary and description
* Sat Nov 06 2010 Golo Fuchert <packages@golotop.de> - 0.8.4.1-3
- Made summary section more concise
- Dropped manual compression of manpage
- Removed BR qt3-devel, ImageMagick-devel, libjpeg-devel, kernel-headers
- Made the source URL compliant to the Packaging Guidelines
- Included updating of the GTK icon cache
- Made use of the SOURCE1 macro
- No inclusion of the upstream INSTALL instructions
* Wed Oct 27 2010 Golo Fuchert <packages@golotop.de> - 0.8.4.1-2
- Corrected the files section (folders were not owned correctly)
* Fri Oct 01 2010 Golo Fuchert <packages@golotop.de> - 0.8.4.1-1
- Initial packaging