Summary: Fast, free, validating XML editor
Summary(ja): 高速な XML 検証エディタ
Name: xmlcopyeditor
Version: 1.2.1.3
Release: 2%{?_dist_release}

License: GPLv2
Group: Applications/Editors
URL: http://xml-copy-editor.sourceforge.net/

Source0: xmlcopyeditor-%{version}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: aspell-devel
BuildRequires: desktop-file-utils
BuildRequires: enchant-devel
BuildRequires: expat-devel
BuildRequires: libboost-devel
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: pcre-devel
BuildRequires: xerces-c-devel
BuildRequires: wxGTK-devel >= 2.8
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils

%description
XML Copy Editor is an XML editor focusing on editing document markup languages like DITA, DocBook, WordprocessingML. It features DTD/XML Schema/RELAX NG validation, XSLT, XPath, pretty-printing, syntax highlighting, folding, tag completion/locking, and a spelling/style check. 


%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

%build
%configure 
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

desktop-file-install \
    --dir $RPM_BUILD_ROOT%{_datadir}/applications \
    --remove-key=Icon \
    --set-key=Icon --set-value=xmlcopyeditor.png \
    $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

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

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


%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS
%{_bindir}/%{name}
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/%{name}
%{_mandir}/man1/*

%changelog
* Thu Sep 01 2016 Toshiaki Ara <ara_t@384.jp> - 1.2.1.3-2
- rebuild with gcc-5.4.0

* Sat Jan 24 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 1.2.1.3-1
- new upstream release
- built with xerces-c 3.1.1

* Wed Jul 11 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.2.0.6.2-2
- changed Buildrequires: wx-gtk2-devel >= 2.8 to wxGTK-devel >= 2.8

* Tue Feb 23 2010 Shu KONNO <owa@bg.wakwak.com> 1.2.0.6.2-1
- initial build for vine seed

