Blob Blame History Raw
Name:           xmlcopyeditor
Version:        1.1.0.6
Release:        4%{?dist}
Summary:        A fast, free, validating XML editor

Group:          Applications/Editors
License:        GPLv2
URL:            http://xml-copy-editor.sourceforge.net/
Source0:        http://prdownloads.sourceforge.net/xml-copy-editor/%name-%version.tar.gz
Patch0:         xmlcopyeditor-1.1.0.6-defaultbrowser.patch
Patch1:         xmlcopyeditor-1.1.0.6-nuke.patch
Patch2:         xmlcopyeditor-1.1.0.6-gcc43.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  wxGTK-devel >= 2.8 pcre-devel aspell-devel boost-devel
BuildRequires:  xerces-c-devel libxslt-devel expat-devel desktop-file-utils

%description
XML Copy Editor is a fast, free, validating XML editor.

%prep
%setup -q
find src -type f -print0 | xargs -0 chmod a-x
tr -d '\r' < src/copying/gpl.txt > COPYING
chmod a-x AUTHORS COPYING NEWS
%patch0 -p 1 -b .defaultbrowser
%patch1 -p 1 -b .nuke
%patch2 -p 1 -b .gcc43

%build
%configure
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
desktop-file-install --vendor=fedora --remove-category Application \
  --delete-original \
  --dir=$RPM_BUILD_ROOT%{_datadir}/applications \
  $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
sed -i -e "s/\(Icon=[^.]\+\).[^.]\+/\1/" $RPM_BUILD_ROOT%{_datadir}/applications/*%{name}.desktop
#rm -r $RPM_BUILD_ROOT%{_datadir}/%{name}/po

%clean
rm -rf $RPM_BUILD_ROOT

%post
update-desktop-database &> /dev/null || :

%postun
update-desktop-database &> /dev/null || :

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS
%{_bindir}/*
%{_datadir}/%{name}
%{_datadir}/applications/*
%{_datadir}/pixmaps/*

%changelog
* Wed Feb 13 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> 1.1.0.6-4
- Fixed build under GCC 4.3

* Tue Jan 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> 1.1.0.6-3
- Removed locale files for now
- Removed spurious license files
- Fixed debuginfo permissions
- Fixed desktop file handling

* Mon Jan 28 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> 1.1.0.6-2
- Changed search list of default browsers

* Sun Jan 27 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> 1.1.0.6-1
- Initial RPM release