File qxmledit.spec of Package qxmledit

# spec file for package qxmledit
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define major   0

Name:           qxmledit
Version:        0.8.17
Release:        0
Summary:        Simple XML Editor and XSD Viewer
License:        LGPL-2.0+ and LGPL-3.0+
Group:          Productivity/Publishing/XML
Source99:       baselibs.conf
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
%if 0%{?suse_version} > 1320
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Sql)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5Xml)
BuildRequires:  pkgconfig(Qt5XmlPatterns)
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5PrintSupport)
BuildRequires:  pkgconfig(QtCore)
BuildRequires:  pkgconfig(QtGui)
BuildRequires:  pkgconfig(QtNetwork)
BuildRequires:  pkgconfig(QtSql)
BuildRequires:  pkgconfig(QtSvg)
BuildRequires:  pkgconfig(QtXml)
BuildRequires:  pkgconfig(QtXmlPatterns)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

QXmlEdit is a simple XML editor written in Qt4. Its main features are
unusual data visualization modes, nice XML manipulation and presentation and
it is multi platform. It can split very big XML files into fragments, and
compare XML files. It is one of the few graphical Open Source XSD viewers.

Main features:

* Hierarchical customizable view of XML elements.
* Fast XML hierarchy navigation.
* Split of big XML files.
* Search supporting XPath expressions.
* Base 64 data handling.
* Custom visualization styles.
* XML Schema (XSD) viewer.
* Columnar view.
* Sessions handling.
* Graphical XML file view.
* Map view of a XML document.
* Split and fragment extraction of big XML files.
* Visual compare of XML Schema files.
* Visual compare of XML files.
* XML Snippets.
* XSL specialized mode.
* Element display via user customizable rules.

%package -n libqxmledit%{major}
Summary:        Simple XML Editor Shared Libraries
Group:          System/Libraries

%description -n libqxmledit%{major}
QXmlEdit is a simple XML editor written in Qt4. It uses a tree based
interface to ease the edit of long files.

This package includes QXmlEdit shared libraries.

%package devel
Summary:        Simple XML Editor Development Files
Group:          Development/Libraries/C and C++
Requires:       libqxmledit%{major} = %{version}

%description devel
QXmlEdit is a simple XML editor written in Qt4. It uses a tree based
interface to ease the edit of long files.

This package includes QXmlEdit development files.

%setup -q

export QXMLEDIT_INST_DATA_DIR=%{_datadir}/%{name}/
export QXMLEDIT_INST_DIR=%{_bindir}/
export QXMLEDIT_INST_DOC_DIR=%{_defaultdocdir}/%{name}/
export QXMLEDIT_INST_INCLUDE_DIR=%{_includedir}/%{name}/
export QXMLEDIT_INST_LIB_DIR=%{_libdir}/
export QXMLEDIT_INST_TRANSLATIONSDIR=%{_datadir}/%{name}/translations/
%if 0%{?suse_version} > 1320
qmake-qt5 \
qmake \
    QMAKE_CFLAGS+="%{optflags}" \
    QMAKE_CXXFLAGS+="%{optflags}" \
make %{?_smp_mflags}

make INSTALL_ROOT=%{buildroot} install

cp %{SOURCE1} .

# Install icons.
install -Dm 0644 install_scripts/environment/icon/qxmledit_48x48.png \
install -Dm 0644 src/images/icon.svg \

# Install an appdata file.
install -Dm 0644 install_scripts/environment/desktop/QXmlEdit.appdata.xml \

# Install a desktop file.
install -Dm 0644 install_scripts/environment/desktop/QXmlEdit.desktop \

# Remove redundant files.
rm -f \

%suse_update_desktop_file %{name} TextEditor Development Documentation Qt



%post -n libqxmledit%{major} -p /sbin/ldconfig

%postun -n libqxmledit%{major} -p /sbin/ldconfig

%doc doc/QXmlEdit_manual.pdf xsltmode.pdf
%if 0%{?suse_version} && 0%{?suse_version} < 1320
%dir %{_datadir}/appdata/

%files -n libqxmledit%{major}

%files devel